enum as a predefined type. Fixes bug #325223.
* ResourceWriterTest.cs: Enabled test for writing enum value on 2.0
profile.
svn path=/trunk/mcs/; revision=94016
overloads. Added test for argument null checks. Added test for bug
#339074. Added test for invoking Generate () multiple times.
* ResourceWriter.cs: On 2.0 profile, use case-insensitive SortedList.
Changed exception messages and params to match MS. Allow null values
in AddResource overloads. In Dispose (bool), also generate resources
(header) if no resources were added. Fixes bug #339074. When Generate
is done, reset resources to null to prevent further editing. This
also avoids the need for a separate bool to indicate whether generate
was already invoked. Code formatting.
svn path=/trunk/mcs/; revision=89412
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
* ResourceReader.cs : implemented GetResourceData(). Resources with
unresolvable types could still be parsed, so hold type names
instead of types.
* ResourceReaderTest.cs : added tests for GetResourceData()
svn path=/trunk/mcs/; revision=83761
* ResourceReader.cs (ResourceValue): Put the null resource check
before the resource version 2 check, this fixes bug #81757
svn path=/trunk/mcs/; revision=82066
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
Patch provided by Red Forks. Fixes bug #79976.
* ResourceReaderTest.cs: Added test for reading byte array.
No longer derive from Assertion class.
svn path=/trunk/mcs/; revision=70246
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
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)
svn path=/trunk/mcs/; revision=44558
* ResourceReader.cs, ResourceSet.cs: Added a LinkDemand for
SerializationFormatter when using a Stream constructor (other ctors
have different security - e.g. FileIOPermission for opening a file).
svn path=/trunk/mcs/; revision=42422
* ResourceReader.cs: If a resource type index is -1 return null
instead of throwing an exception
* ResourceWriter.cs: If an object is null; encode it with type index
-1 instead of throwing an exception.
svn path=/trunk/mcs/; revision=40569
* Win32Resources.cs: Organize win32 resources into a class hierarchy
with the class Win32Resource as the abstract superclass. Add
Win32ResFileReader and Win32IconFileReader classes and the
corresponding resource types.
svn path=/trunk/mcs/; revision=21850