Commit Graph
36 Commits
Author SHA1 Message Date
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Marek Safar 8fd1f765d7 Fix ResourceSet regression caused by 4a17e24982 2011-09-06 11:58:59 +01:00
Marek Habersack 4a17e24982 [corlib] Do not cache disposed resource sets. 2011-05-04 23:30:57 +02:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Gonzalo Paniagua Javier 4043ebef2c Add a case-insensitive hashtable
Use a hashtable instead of a loop when 'ignoreCase' is set.
	Based on a patch by Curtis Wensley.
2011-01-03 17:20:21 -05:00
Miguel de Icaza dd82b6b192 More removal of old defines
svn path=/trunk/mcs/; revision=145612
2009-11-06 21:29:51 +00:00
Sebastien Pouliot 365294284f In .:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* corlib.dll.sources: Remove System.IO.IntPtrStream since it can
	be replaced by (public in 2.0+) UnmanagedMemoryStream
	* net_2_1_raw_corlib.dll.sources: Remove System.IO.IntPtrStream 
	since it can be replaced by UnmanagedMemoryStream

In System.Resources:
2009-10-18  Sebastien Pouliot  <[email protected]>

	* ResourceReader.cs, ResourceSet.cs, RuntimeResourceSet.cs: Use 
	UnmanagedMemoryStream (instead of IntPtrStream)


svn path=/trunk/mcs/; revision=144322
2009-10-18 15:01:04 +00:00
Gonzalo Paniagua Javier bf33585141 2009-03-06 Gonzalo Paniagua Javier <[email protected]>
* ResourceSet.cs: for custom resource sets without a reader, pretende
	that's we've already read the stream.


svn path=/trunk/mcs/; revision=128814
2009-03-07 00:06:04 +00:00
Gonzalo Paniagua Javier d98635e2ce 2009-02-27 Gonzalo Paniagua Javier <[email protected]>
* ResourceSet.cs: populating the resource should be locked because the
	resourceset could be shared.


svn path=/trunk/mcs/; revision=128215
2009-02-27 17:32:18 +00:00
Zoltan Varga 6f1004d26c 2008-06-27 Zoltan Varga <[email protected]>
* 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
2008-06-27 23:23:39 +00:00
Miguel de Icaza d05e5cd463 2008-05-08 Miguel de Icaza <[email protected]>
* 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
2008-05-08 22:20:07 +00:00
Gert Driesen 9c2eeebe7e * ResourceManager.cs: Default to RuntimeResourceSet for all ctors.
* 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
2008-03-15 12:41:37 +00:00
Sebastien Pouliot bf1c061517 2008-03-04 Sebastien Pouliot <[email protected]>
* 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
2008-03-04 13:44:30 +00:00
Miguel de Icaza e12b3020bc A few more changes from Jesse Jones, use SupressFinalize on
Dispose(true) cases


svn path=/trunk/mcs/; revision=82916
2007-07-28 16:10:50 +00:00
Atsushi Eno c98ee48759 2007-05-28 Atsushi Enomoto <[email protected]>
* IResourceWriter.cs NeutralResourcesLanguageAttribute.cs
	  SatelliteContractVersionAttribute.cs ResourceManager.cs
	  IResourceReader.cs ResourceSet.cs ResourceWriter.cs
	  ResourceReader.cs UltimateResourceFallbackLocation.cs
	  MissingManifestResourceException.cs :
	  implemented 2.0 resource support (write, and remaining read bits)
	  and GetStream(). Cosmetic attributes fixes.

	* UnmanagedMemoryStream.cs : added Closed event for sys.Resources use.
	* IntPtrStream.cs : added internal get_BaseAddress(), for the same.

	* ResourceManagerTest.cs : added tests for GetStream() (including
	  2.0 resource format tests).


svn path=/trunk/mcs/; revision=78024
2007-05-28 03:35:21 +00:00
Alexander Olk e988c2faeb * ResourceManager.cs: Don't create the ResourceSets hashtable in the
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
2006-12-30 21:51:30 +00:00
Alexander Olk 31181ed8f3 In System/System.ComponentModel:
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
2006-10-29 10:02:00 +00:00
Sebastien Pouliot 9f5941f64b 2005-03-31 Sebastien Pouliot <[email protected]>
*  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
2005-03-31 13:40:08 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Lluis Sanchez ab1391e476 * ResourceSet.cs: Added minor null check.
svn path=/trunk/mcs/; revision=25232
2004-04-08 19:57:47 +00:00
Jackson Harper 947c30e6d8 * ResourceSet.cs: Do not throw an exception for null strings.
svn path=/trunk/mcs/; revision=22746
2004-02-03 19:23:26 +00:00
Dick Porter f204bdc417 Do string compares with the Invariant culture.
Use the char forms of IndexOf and LastIndexOf, so that the comparison is
done with the Invariant culture.

svn path=/trunk/mcs/; revision=20593
2003-11-28 18:22:08 +00:00
Andreas N a43df02714 2003-11-18 Andreas Nahr <[email protected]>
* ResourceSet.cs: Implemented v1.1 updates

svn path=/trunk/mcs/; revision=20192
2003-11-18 21:19:54 +00:00
Dick Porter 9de46ebb4b 2002-08-14 Dick Porter <[email protected]>
* ResourceSet.cs: Throw the correct exceptions

	* ResourceManager.cs: Implemented all unfinished methods

svn path=/trunk/mcs/; revision=6627
2002-08-14 10:29:20 +00:00
Piers Haken cc63806f23 minor CLS conformance tweaks (visibility, virtual, abstract, sealed, etc...)
svn path=/trunk/mcs/; revision=3568
2002-04-03 06:28:53 +00:00
Piers Haken 84187bf9a6 fixed member accessibility to match MS (corcompare).
svn path=/trunk/mcs/; revision=3531
2002-04-01 06:07:43 +00:00
Duncan Mak 1f356938bb Huge indentation fix. Don't worry, I tested so no typos were introduced. ;-)
svn path=/trunk/mcs/; revision=2077
2002-01-20 13:58:36 +00:00
Duncan Mak 37b2d59da6 Some more minor fixes
svn path=/trunk/mcs/; revision=2036
2002-01-18 00:57:49 +00:00
Duncan Mak 152841a79f Minor fixes
svn path=/trunk/mcs/; revision=2035
2002-01-18 00:43:18 +00:00
Duncan Mak 7ef49ff877 indentation fix
svn path=/trunk/mcs/; revision=2033
2002-01-18 00:17:59 +00:00
Duncan Mak 28ff4b98fc 2002-1-17 Duncan Mak <duncan@[email protected]>
* *.cs: convert to Miguel's brace style.

svn path=/trunk/mcs/; revision=2032
2002-01-18 00:17:08 +00:00
Duncan Mak fd1d18a15a 2002-1-17 Duncan Mak <[email protected]>
* ResourceSet.cs: Implemented GetObject (string, bool) and GetString
	     (string, bool). ResourceSet has no more MonoTODOs! Also added in the
	     Serializable attribute.

svn path=/trunk/mcs/; revision=2029
2002-01-17 22:56:28 +00:00
Duco Fijma e69cd3906c Added some MonoTODO attributes
svn path=/trunk/mcs/; revision=1902
2002-01-07 18:28:58 +00:00
Duco Fijma 31f5fff339 Finalized IResourceReader and IResourceWriter. Made other files compileable
svn path=/trunk/mcs/; revision=1873
2002-01-06 17:49:47 +00:00
Paolo Molaro 6b79777d40 Tue Dec 18 13:18:32 CET 2001 Paolo Molaro <[email protected]>
* *.cs: fixed some of the compilation issues: missing
	using directives, typos.

svn path=/trunk/mcs/; revision=1618
2001-12-18 08:25:22 +00:00
Duncan Mak 4277468058 2001-12-11 Duncan Mak <[email protected]>
* Checked in to CVS.

svn path=/trunk/mcs/; revision=1554
2001-12-11 15:04:20 +00:00