Commit Graph
36 Commits
Author SHA1 Message Date
Marek Safar 6391925927 Keep only single Dispose implementation in ResourceReader 2010-12-15 11:36:24 +00:00
Carlos Alberto Cortez 508ef19c50 2010-07-07 Carlos Alberto Cortez <[email protected]>
4.0 updates.

	* ResourceManager.cs: Mark ResourceSets as obsolete.
	* ResourceReader.cs: New public Dispose method.


svn path=/trunk/mcs/; revision=160005
2010-07-07 13:20:13 +00:00
Miguel de Icaza dd82b6b192 More removal of old defines
svn path=/trunk/mcs/; revision=145612
2009-11-06 21:29:51 +00:00
Jb Evain 288a6a3d9e 2009-10-19 Jb Evain <[email protected]>
* ResourceReader.cs: fix the build.


svn path=/trunk/mcs/; revision=144356
2009-10-19 08:43:52 +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
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Larry Ewing b26f5b08cd 2008-08-11 Larry Ewing <[email protected]>
* ResourceReader.cs: fix reading/writing beyond the end of the
        current resource when the resource is larger than 1024 bytes.


svn path=/trunk/mcs/; revision=110159
2008-08-11 20:11:16 +00:00
Marek Safar fd5f828b6e 2008-06-30 Marek Safar <[email protected]>
* ResourceReader.cs: Cache resources enumerator in ResourceReader.


svn path=/trunk/mcs/; revision=106880
2008-06-30 11:38:02 +00:00
Marek Safar afb97c23b3 2008-06-30 Marek Safar <[email protected]>
* ResourceReader.cs: Sealed ResourceEnumerator.


svn path=/trunk/mcs/; revision=106879
2008-06-30 10:44:40 +00:00
Rodrigo Kumpera 53950f9e2c In .:
2008-06-28  Rodrigo Kumpera  <[email protected]>

	* ResourceReader.cs (LoadResourceValues): Kill ununsed local.

	* ResourceReader.cs (CreateResourceInfo): Don't return a big
	struct on stack, pass it as a reference argument.


svn path=/trunk/mcs/; revision=106825
2008-06-28 17:10:47 +00:00
Rodrigo Kumpera 8a35085cbe In .:
2008-06-27  Rodrigo Kumpera  <[email protected]>

	* ResourceReader.cs: Avoid an extra array copy for the resource arrays.


svn path=/trunk/mcs/; revision=106808
2008-06-28 03:18:14 +00:00
Marek Habersack e999470c5c 2008-05-28 Marek Habersack <[email protected]>
* ResourceReader.cs: use structs instead of classes for the
	internal ResourceInfo and ResourceCacheItem data items. Patch from
	Andreas Nahr <[email protected]>, thanks!

svn path=/trunk/mcs/; revision=104334
2008-05-28 21:33:46 +00:00
Marek Habersack b19cf7ba52 2008-05-27 Marek Habersack <[email protected]>
* ResourceReader.cs: reimplement the way resources are read when
	enumerator is used. The resource indexes and names are read in
	ReadHeaders when ResourceReader is created and the resource values
	are read and cached when the enumerator is created. This removed a
	lot of unnecessary locking and made the whole process more
	efficient and faster (a test application would acquire the locks
	40000 times durng a 1.7s run, right now it acquires the lock 1
	time).

svn path=/trunk/mcs/; revision=104224
2008-05-28 01:38:23 +00:00
Gert Driesen f20bb3562f * ResourceReader.cs: Fixed exception message to match MS. Removed
duplicate checks from string ctor.


svn path=/trunk/mcs/; revision=84799
2007-08-24 11:22:04 +00:00
Atsushi Eno df8743aab1 2007-08-09 Atsushi Enomoto <[email protected]>
* 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
2007-08-09 15:10:58 +00:00
Rodrigo Kumpera 2f188f9c68 2007-07-16 Rodrigo Kumpera <[email protected]>
* ResourceReader.cs (ResourceValue): Put the null resource check
	  before the resource version 2 check, this fixes bug #81757


svn path=/trunk/mcs/; revision=82066
2007-07-16 23:40:51 +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
Miguel de Icaza 51784e0b01 Assist in debugging
svn path=/trunk/mcs/; revision=74209
2007-03-13 21:29:47 +00:00
Gert Driesen b10b15c73d * ResourceReader.cs: Fixed typo.
svn path=/trunk/mcs/; revision=72979
2007-02-16 07:56:21 +00:00
Gert Driesen 209ed36ee8 * ResourceReader.cs: Support reading byte arrays in v2 resource files.
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-12-29 23:40:46 +00:00
Marek Safar eb747338c8 2005-07-25 Marek Safar <[email protected]>
*  ResourceReader.cs: Implemented reading of primitives for version 2.

svn path=/trunk/mcs/; revision=47640
2005-07-25 13:10:50 +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
Geoff Norton fd7d7eaae5 2005-02-12 Geoff Norton <[email protected]>
* 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
2005-02-12 23:23:20 +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
Dick Porter 0a4551c1ae 2002-08-19 Dick Porter <[email protected]>
* MonoType.cs: Add a space before the Assembly name in
	AssemblyQualifiedName (needed for resource files so the MS runtime
	can load types)

2002-08-19  Dick Porter  <[email protected]>

	* BinaryWriter.cs: The length of a string is counted in bytes, not
	chars

2002-08-19  Dick Porter  <[email protected]>

	* ResourceWriter.cs: Implemented all methods

	* ResourceReader.cs: Cope with our ResourceSet class name, as well
	as theirs

svn path=/trunk/mcs/; revision=6748
2002-08-19 10:56:32 +00:00
Dick Porter 16d25f7466 2002-08-18 Dick Porter <[email protected]>
* ResourceReader.cs: Finished basic implementation.  Some
	optimisation in conjunction with ResourceSet still possible though

svn path=/trunk/mcs/; revision=6720
2002-08-18 11:18:03 +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
Nick Drochak e0da9e6d82 2002-01-26 Nick Drochak <[email protected]>
* ResourceReader.cs: Finsished reading resource files with just strings
	in them.  Need to figure out other types, and also resources with
	multiple types in the same file.

svn path=/trunk/mcs/; revision=2162
2002-01-25 11:45:54 +00:00
Nick Drochak a764729de3 2002-01-24 Nick Drochak <[email protected]>
* ResourceReader.cs: Implemented constructors. Started on the
	GetEnumerator() method.  Not done yet, but comitting for
	'disaster recovery' purposes.

svn path=/trunk/mcs/; revision=2130
2002-01-23 19:36:47 +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
Miguel de Icaza 13a04d9f60 Small fixes for Duncan
svn path=/trunk/mcs/; revision=2009
2002-01-16 20:57: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