Skip to content

Commit

Permalink
2009-03-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
Browse files Browse the repository at this point in the history
	* ResourceSet.cs: for custom resource sets without a reader, pretende
	that's we've already read the stream.


svn path=/branches/mono-2-4/mcs/; revision=128815
  • Loading branch information
gonzalop committed Mar 7, 2009
1 parent 15c1fae commit 11cd4f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions mcs/class/corlib/System.Resources/ChangeLog
@@ -1,3 +1,8 @@
2009-03-06 Gonzalo Paniagua Javier <gonzalo@novell.com>

* ResourceSet.cs: for custom resource sets without a reader, pretende
that's we've already read the stream.

2009-02-27 Gonzalo Paniagua Javier <gonzalo@novell.com>

* ResourceSet.cs: populating the resource should be locked because the
Expand Down
7 changes: 4 additions & 3 deletions mcs/class/corlib/System.Resources/ResourceSet.cs
Expand Up @@ -63,6 +63,7 @@ public class ResourceSet : IDisposable
protected ResourceSet ()
{
Table = new Hashtable ();
resources_read = true;
}

public ResourceSet (IResourceReader reader)
Expand Down Expand Up @@ -211,15 +212,15 @@ public virtual string GetString (string name, bool ignoreCase)

protected virtual void ReadResources ()
{
if (resources_read)
return;

if (Reader == null)
#if NET_2_0
throw new ObjectDisposedException ("ResourceSet is closed.");
#else
throw new InvalidOperationException ("ResourceSet is closed.");
#endif
if (resources_read)
return;

lock (Table) {
if (resources_read)
return;
Expand Down

0 comments on commit 11cd4f0

Please sign in to comment.