4.0 updates.
* ResourceManager.cs: Mark ResourceSets as obsolete.
* ResourceReader.cs: New public Dispose method.
svn path=/trunk/mcs/; revision=160005
* ResourceManager.cs: Add a negative cache for culture->resource set mappings
which caches lookup failures.
* ResourceSet.cs (GetObjectInternal): Search the hash table in the ignoreCase
case too.
svn path=/trunk/mcs/; revision=106787
* ResourceSet.cs: Pass the ignoreCase argument, needed to
implement ResourceManager.IgnoreCase.
Silverlight 2.0 applications store "page.xaml" as the key in the
resource keys, but request Page.xaml ones.
* ResourceManager.cs: Avoid exception throwing and catching.
* RutimeResourceSet.cs: Add a constructor that is required to
deserialize Silverlight 2.0 applications when deserializing the
resources that contains the XAML files in assemblies.
We do not take advantage of this new constructor that uses an
IntPtrStream, instead we stick to the Stream API.
svn path=/trunk/mcs/; revision=102841
* ResourceSet.cs: Avoid duplicate argument checks. On 2.0 profile,
throw ObjectDisposedException when ResourceSet is disposed.
* RuntimeResourceSet.cs: On 2.0 profile, throw ObjectDisposedException
when ResourceSet is disposed.
* ResourceManagerTest.cs: Enabled and added ResourceSetType asserts.
Added test for disposed ResourceSet. Avoid using ExpectedException.
* ResourceSetTest.cs: Improved tests for ctor argument checks. Avoid
using ExpectedException.
svn path=/trunk/mcs/; revision=98387
* ResourceManager.cs: Use RuntimeResourceSet, an internal type, just
like MS does (and tell us indirectly with a Type property).
* ResourceSet.cs: Fix a few problems found with new unit tests. Also
fix some exception parameters.
* RuntimeResourceSet.cs: New. Internal type used by ResourceManager.
ResouceSet cannot be used, as is, because it does not clone objects,
when possible, leading to problems when those objects are disposed.
svn path=/trunk/mcs/; revision=97297
Reworked basename to only throw ArgumentException if resource with
name ending on ".resources" does not actually exist. Fixes bug
#336283. Do not throw exception in GetStream since this is already
done in InternalGetResourceSet. In InternalGetResourceSet, do not
throw MissingManifestResourceException when culture is null. Fixed
MissingManifestResourceException message to match MS. When using
file-based ResourceManager, then also throw an exception when file
does not exist for neutral culture.
* ResourceManager.cs: Added tests for null argument checks. Added test
for GetStream with resource file that does not exist.
svn path=/trunk/mcs/; revision=88308
name into separate method. Only use satellite assemblies for
non-invariant cultures. For invariant culture, only load resources
from main assembly.
svn path=/trunk/mcs/; revision=85900
Added resourceSource field to store the actual type, which we need for
the namespace. Added CheckBaseName method to avoid code duplication.
Only check whether basename does not end in '.resources' on 1.0
profile. Fixed paramname of ArgumentNullExceptions to match MS.
Modified GetManifestResourceStreamNoCase to use resourceSource field
to construct manifest resource name. Modified GetStream to use
CurrentUICulture when culture is null. Fixed InternalGetResourceSet
to use invariant resources when culture is the neutral culture.
Code formatting.
* ResourceManagerTest.cs: Restore the original UI Culture on TearDown.
Added ctor tests. Added tests for CreateFileBasedResourceManager.
Added tests for GetObject, GetString and GetResourceFileName.
Improved tests for GetStream. Added test for IgnoreCase.
svn path=/trunk/mcs/; revision=85866
protected ctor, instead move it to the public ctors. Fixes some not
working nunit tests. Also, return a closed ResourceSet instead of
creating a new one. Fixes one more test. If only BaseNameField is
provided, try to create a resource set from the BaseNameField. One
more test that passes now.
* ResourceSet.cs: Remove isDisposed. Not needed anymore.
2006-12-30 Alexander Olk <[email protected]>
svn path=/trunk/mcs/; revision=70271
* ResourceManager.cs: Iterate through the values of the ResourceSets
hashtable in ReleaseAllResources instead through the hashtable itself.
svn path=/trunk/mcs/; revision=70258
2006-10-29 Alexander Olk <[email protected]>
* ComponentResourceManager.cs: Don't close the resource set in
ApplyResources, it is possible to call ApplyResources multiple
times. Closing the resource set means that it gets disposed.
Fixes bug #79182.
In corlib/System.Resources:
2006-10-29 Alexander Olk <[email protected]>
* ResourceSet.cs, ResourceManager.cs: Calling ResourceSet.Close()
disposes a resource set. A closed resource set will now be
removed from ResourceSets. Fixes bug #79182.
svn path=/trunk/mcs/; revision=67076
* ResourceManager.cs: Don't stop the resource set lookup until
the invariant culture is reached. Fixes bug #77242.
svn path=/trunk/mcs/; revision=57937
* ResourceManager.cs: Fixed GetString/GetObject's recursion
which never fall back to the invariant or neutral culture if
the key was not found in a specific culture. Fixes bug #77242.
svn path=/trunk/mcs/; revision=55573
* System.Reflection/Assembly.cs: implemented GetSatelliteAssembly.
* System.Resources/ResourceManager.cs: enabled the code that calls
GetSatelliteAssembly and ignore the exception thrown if the assembly
cannot be loaded.
svn path=/trunk/mcs/; revision=14252
* ResourceManager.cs: fixed the name for the file when the culture is
not de invariant culture. Commented out the GetSatelliteAssembly code
to avoid NotImplementedException being thrown.
svn path=/trunk/mcs/; revision=14234
* ResourceManager.cs: Removed MonoTODO from GetNeutralResourcesLanguage (Assembly)
because Miguel just implemented the whole class, including the constructor that
I needed (CultureInfo (string)).
svn path=/trunk/mcs/; revision=2007
* ResourceManager.cs: After reading the tutorial from the SDK,
finished all the ResourceManager constructors and removed those
MonoTODO tags. Updated fields after reading the new docs from the
final SDK.
* ResXFileRef.cs, ResXResourceReader.cs: Removed. They are part of
Windows.Forms and require System.Xml, which we don't have access to.
2002-01-13 Duncan Mak <[email protected]>
* ResourceManager.cs: Added more MonoTODOs and cleaned up some
indenting.
svn path=/trunk/mcs/; revision=2005
(string), as I believe it's correct. However, GetString
(string, CultureInfo) is definitely broken, so I'm marking it with
MonoTODO there. I also added MonoTODO to IntenalGetResourceSet().
svn path=/trunk/mcs/; revision=1935
* ResourceManager.cs: Fixed the GetSatelliteContractVersion()
method. It was missing a cast before. Removed MonoTODO
attribute. ;-) It was tested by John Barn, so this shouldn't
break the build.
svn path=/trunk/mcs/; revision=1934