File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/Common/src/CoreLib/System/Resources Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ protected ResourceSet()
3636 {
3737 // To not inconvenience people subclassing us, we should allocate a new
3838 // hashtable here just so that Table is set to something.
39- CommonInit ( ) ;
39+ Table = new Hashtable ( ) ;
4040 }
4141
4242 // For RuntimeResourceSet, ignore the Table parameter - it's a wasted
@@ -50,9 +50,9 @@ internal ResourceSet(bool junk)
5050 // on disk.
5151 //
5252 public ResourceSet ( string fileName )
53+ : this ( )
5354 {
5455 Reader = new ResourceReader ( fileName ) ;
55- CommonInit ( ) ;
5656 ReadResources ( ) ;
5757 }
5858
@@ -61,26 +61,21 @@ public ResourceSet(string fileName)
6161 // of data.
6262 //
6363 public ResourceSet ( Stream stream )
64+ : this ( )
6465 {
6566 Reader = new ResourceReader ( stream ) ;
66- CommonInit ( ) ;
6767 ReadResources ( ) ;
6868 }
6969
7070 public ResourceSet ( IResourceReader reader )
71+ : this ( )
7172 {
7273 if ( reader == null )
7374 throw new ArgumentNullException ( nameof ( reader ) ) ;
7475 Reader = reader ;
75- CommonInit ( ) ;
7676 ReadResources ( ) ;
7777 }
7878
79- private void CommonInit ( )
80- {
81- Table = new Hashtable ( ) ;
82- }
83-
8479 // Closes and releases any resources used by this ResourceSet, if any.
8580 // All calls to methods on the ResourceSet after a call to close may
8681 // fail. Close is guaranteed to be safely callable multiple times on a
You can’t perform that action at this time.
0 commit comments