{
// To not inconvenience people subclassing us, we should allocate a new
// hashtable here just so that Table is set to something.
- CommonInit();
+ Table = new Hashtable();
}
// For RuntimeResourceSet, ignore the Table parameter - it's a wasted
// on disk.
//
public ResourceSet(string fileName)
+ : this()
{
Reader = new ResourceReader(fileName);
- CommonInit();
ReadResources();
}
// of data.
//
public ResourceSet(Stream stream)
+ : this()
{
Reader = new ResourceReader(stream);
- CommonInit();
ReadResources();
}
public ResourceSet(IResourceReader reader)
+ : this()
{
if (reader == null)
throw new ArgumentNullException(nameof(reader));
Reader = reader;
- CommonInit();
ReadResources();
}
- private void CommonInit()
- {
- Table = new Hashtable();
- }
-
// Closes and releases any resources used by this ResourceSet, if any.
// All calls to methods on the ResourceSet after a call to close may
// fail. Close is guaranteed to be safely callable multiple times on a