69 private void CommonInit()
82 protected virtual void Dispose(
bool disposing)
91 _caseInsensitiveTable =
null;
121 return GetEnumeratorHelper();
128 return GetEnumeratorHelper();
138 return table.GetEnumerator();
149 object objectInternal = GetObjectInternal(name);
152 return (
string)objectInternal;
167 public virtual string GetString(
string name,
bool ignoreCase)
169 object objectInternal = GetObjectInternal(name);
173 text = (string)objectInternal;
179 if (text !=
null || !ignoreCase)
183 objectInternal = GetCaseInsensitiveObjectInternal(name);
186 return (
string)objectInternal;
201 return GetObjectInternal(name);
210 public virtual object GetObject(
string name,
bool ignoreCase)
212 object objectInternal = GetObjectInternal(name);
213 if (objectInternal !=
null || !ignoreCase)
215 return objectInternal;
217 return GetCaseInsensitiveObjectInternal(name);
226 object value = enumerator.
Value;
231 private object GetObjectInternal(
string name)
245 private object GetCaseInsensitiveObjectInternal(
string name)
250 throw new ObjectDisposedException(
null, Environment.GetResourceString(
"ObjectDisposed_ResourceSet"));
252 Hashtable hashtable = _caseInsensitiveTable;
253 if (hashtable ==
null)
255 hashtable =
new Hashtable(StringComparer.OrdinalIgnoreCase);
261 _caseInsensitiveTable = hashtable;
263 return hashtable[name];
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
virtual void Add(object key, object value)
Adds an element with the specified key and value into the T:System.Collections.Hashtable.
virtual string GetString(string name, bool ignoreCase)
Searches for a T:System.String resource with the specified name in a case-insensitive manner,...
bool MoveNext()
Advances the enumerator to the next element of the collection.
object Key
Gets the key of the current dictionary entry.
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
The exception that is thrown for invalid casting or explicit conversion.
IResourceReader Reader
Indicates the T:System.Resources.IResourceReader used to read the resources.
new IDictionaryEnumerator GetEnumerator()
Returns a dictionary enumerator of the resources for this reader.
void Dispose()
Disposes of the resources (other than memory) used by the current instance of T:System....
Provides the base functionality for reading data from resource files.
ResourceSet(string fileName)
Creates a new instance of the T:System.Resources.ResourceSet class using the system default T:System....
The exception that is thrown when an operation is performed on a disposed object.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
Provides information about, and means to manipulate, the current environment and platform....
virtual Type GetDefaultReader()
Returns the preferred resource reader class for this kind of T:System.Resources.ResourceSet.
virtual IDictionaryEnumerator GetEnumerator()
Returns an T:System.Collections.IDictionaryEnumerator that can iterate through the T:System....
Represents a collection of key/value pairs that are organized based on the hash code of the key....
void Close()
Closes the resource reader after releasing any resources associated with it.
virtual object GetObject(string name, bool ignoreCase)
Searches for a resource object with the specified name in a case-insensitive manner,...
Represents type declarations: class types, interface types, array types, value types,...
ResourceSet()
Initializes a new instance of the T:System.Resources.ResourceSet class with default properties.
IEnumerator GetEnumerator()
Returns an enumerator that iterates through a collection.
Enumerates the resources in a binary resources (.resources) file by reading sequential resource name/...
Hashtable Table
The T:System.Collections.Hashtable in which the resources are stored.
Writes resources in the system-default format to an output file or an output stream....
virtual string GetString(string name)
Searches for a T:System.String resource with the specified name.
ResourceSet(IResourceReader reader)
Creates a new instance of the T:System.Resources.ResourceSet class using the specified resource reade...
virtual void ReadResources()
Reads all the resources and stores them in a T:System.Collections.Hashtable indicated in the F:System...
object Value
Gets the value of the current dictionary entry.
Specifies that the class can be serialized.
Stores all the resources localized for one particular culture, ignoring all other cultures,...
Enumerates the elements of a nongeneric dictionary.
The exception that is thrown when a method call is invalid for the object's current state.
virtual void Dispose(bool disposing)
Releases resources (other than memory) associated with the current instance, closing internal managed...
ResourceSet(Stream stream)
Creates a new instance of the T:System.Resources.ResourceSet class using the system default T:System....
virtual object GetObject(string name)
Searches for a resource object with the specified name.
Supports a simple iteration over a non-generic collection.
virtual void Close()
Closes and releases any resources used by this T:System.Resources.ResourceSet.
Provides a generic view of a sequence of bytes. This is an abstract class.To browse the ....
virtual Type GetDefaultWriter()
Returns the preferred resource writer class for this kind of T:System.Resources.ResourceSet.