* ResourceWriter.cs: Implement 4.0 TypeNameConverter.
[mono.git] / mcs / class / corlib / System.Resources / ChangeLog
1 2010-07-05  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2
3         * ResourceWriter.cs: Implement 4.0 TypeNameConverter.
4
5 2010-07-05  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6
7         * ResourceWriter.cs: Implement 4.0 AddResource overloads taking a
8         Stream, as well as implement the same support in our AddResource that
9         takes an object too.
10
11 2010-03-16  Jb Evain  <jbevain@novell.com>
12
13         * ResourceManager.cs: use MOONLIGHT symbol to disambiguate
14         MonoTouch and Moonlight code.
15
16 2010-03-01  Miguel de Icaza  <miguel@novell.com>
17
18         * Win32Resources.cs: Prevent infinite loops if the resource that
19         we are reading is invalid.   Fixes the mscorlib part of #327500
20
21 2009-11-01  Sebastien Pouliot  <sebastien@ximian.com>
22
23         * ResourceManager.cs (GetResourceFilePath): Don't use 
24         'resourceDir' which should always be null for Moonlight
25
26 2009-10-19  Jb Evain  <jbevain@novell.com>
27
28         * ResourceReader.cs: fix the build.
29
30 2009-10-18  Sebastien Pouliot  <sebastien@ximian.com>
31
32         * ResourceReader.cs, ResourceSet.cs, RuntimeResourceSet.cs: Use 
33         UnmanagedMemoryStream (instead of IntPtrStream)
34
35 2009-04-16  Geoff Norton  <gnorton@novell.com>
36
37         * ResourceWriter.cs: The magic internal type here is required to match
38         Microsofts for SL2 resource deserialization.
39
40 2009-03-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
41
42         * ResourceSet.cs: for custom resource sets without a reader, pretende
43         that's we've already read the stream.
44
45 2009-02-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
46
47         * ResourceSet.cs: populating the resource should be locked because the
48         resourceset could be shared.
49
50 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
51
52         * ResourceManager.cs: don't throw every time we try to load a resource
53         satellite assembly that does not exist.
54
55 2008-12-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
56
57         * ResourceManager.cs: cache negative results too.
58
59 2008-12-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
60
61         * ResourceManager.cs: avoid duplication of keys if more than one
62         thread is creating the ResourceSet.
63
64 2008-12-17 Gonzalo Paniagua Javier <gonzalo@novell.com>
65
66         * ResourceManager.cs: cache ResourceSets instead of loading them from
67         their assembly every time they are needed.
68
69 2008-08-11  Larry Ewing  <lewing@novell.com>
70
71         * ResourceReader.cs: fix reading/writing beyond the end of the
72         current resource when the resource is larger than 1024 bytes.
73
74 2008-06-30  Marek Safar  <marek.safar@gmail.com>
75
76         * ResourceReader.cs: Cache resources enumerator in ResourceReader.
77
78 2008-06-30  Marek Safar  <marek.safar@gmail.com>
79
80         * ResourceReader.cs: Sealed ResourceEnumerator.
81
82 2008-06-28  Rodrigo Kumpera  <rkumpera@novell.com>
83
84         * ResourceReader.cs (LoadResourceValues): Kill ununsed local.
85
86         * ResourceReader.cs (CreateResourceInfo): Don't return a big
87         struct on stack, pass it as a reference argument.
88
89 2008-06-27  Rodrigo Kumpera  <rkumpera@novell.com>
90
91         * ResourceReader.cs: Avoid an extra array copy for the resource arrays.
92
93 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
94
95         * ResourceManager.cs: Add a negative cache for culture->resource set mappings
96         which caches lookup failures.
97
98         * ResourceSet.cs (GetObjectInternal): Search the hash table in the ignoreCase
99         case too.
100
101 2008-06-27  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
102
103         * MissingManifestResourceException.cs:
104         * MissingSatelliteAssemblyException.cs:
105         * ResourceManager.cs: Fix parameter names
106
107 2008-05-27  Marek Habersack  <mhabersack@novell.com>
108
109         * ResourceReader.cs: reimplement the way resources are read when
110         enumerator is used. The resource indexes and names are read in
111         ReadHeaders when ResourceReader is created and the resource values
112         are read and cached when the enumerator is created. This removed a
113         lot of unnecessary locking and made the whole process more
114         efficient and faster (a test application would acquire the locks
115         40000 times durng a 1.7s run, right now it acquires the lock 1
116         time).
117
118 2008-05-08  Miguel de Icaza  <miguel@novell.com>
119
120         * ResourceSet.cs: Pass the ignoreCase argument, needed to
121         implement ResourceManager.IgnoreCase.
122
123         Silverlight 2.0 applications store "page.xaml" as the key in the
124         resource keys, but request Page.xaml ones.
125
126         * ResourceManager.cs: Avoid exception throwing and catching.
127
128         * RutimeResourceSet.cs: Add a constructor that is required to
129         deserialize Silverlight 2.0 applications when deserializing the
130         resources that contains the XAML files in assemblies.
131
132         We do not take advantage of this new constructor that uses an
133         IntPtrStream, instead we stick to the Stream API.
134
135 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
136
137         * Win32Resources.cs: On 2.0 profile, initiale fixed info to zero-length
138         string when emitting versioninfo in compiler context. Default to
139         neutral language in compiler context. On 1.0 profile, use 0xffff as
140         default value for version parts. In Version, abort on first invalid
141         version part and also set FileVersion string. In ProductVersion and
142         FileVersion, parse version string and abort on first invalid version
143         part.  
144
145 2008-03-15  Gert Driesen  <drieseng@users.sourceforge.net>
146
147         * ResourceManager.cs: Default to RuntimeResourceSet for all ctors.
148         * ResourceSet.cs: Avoid duplicate argument checks. On 2.0 profile,
149         throw ObjectDisposedException when ResourceSet is disposed.
150         * RuntimeResourceSet.cs: On 2.0 profile, throw ObjectDisposedException
151         when ResourceSet is disposed.
152
153 2008-03-04  Sebastien Pouliot  <sebastien@ximian.com>
154
155         * ResourceManager.cs: Use RuntimeResourceSet, an internal type, just
156         like MS does (and tell us indirectly with a Type property).
157         * ResourceSet.cs: Fix a few problems found with new unit tests. Also
158         fix some exception parameters.
159         * RuntimeResourceSet.cs: New. Internal type used by ResourceManager.
160         ResouceSet cannot be used, as is, because it does not clone objects,
161         when possible, leading to problems when those objects are disposed.
162
163 2008-01-26  Gert Driesen  <drieseng@users.sourceforge.net>
164
165         * ResourceWriter.cs: On 2.0 profile, do not mistakenly identify an
166         enum as a predefined type. Fixes bug #325223.
167
168 2007-11-10  Gert Driesen  <drieseng@users.sourceforge.net>
169
170         * ResourceWriter.cs: On 2.0 profile, use case-insensitive SortedList.
171         Changed exception messages and params to match MS. Allow null values
172         in AddResource overloads. In Dispose (bool), also generate resources
173         (header) if no resources were added. Fixes bug #339074. When Generate
174         is done, reset resources to null to prevent further editing.  This
175         also avoids the need for a separate bool to indicate whether generate
176         was already invoked. Code formatting.
177
178 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
179
180         * ResourceManager.cs: Removed temporary workaround for bug #43567.
181         Reworked basename to only throw ArgumentException if resource with
182         name ending on ".resources" does not actually exist. Fixes bug
183         #336283. Do not throw exception in GetStream since this is already
184         done in InternalGetResourceSet. In InternalGetResourceSet, do not
185         throw MissingManifestResourceException when culture is null. Fixed
186         MissingManifestResourceException message to match MS. When using
187         file-based ResourceManager, then also throw an exception when file
188         does not exist for neutral culture.
189
190 2007-09-17  Gert Driesen  <drieseng@users.sourceforge.net>
191
192         * ResourceManager.cs: Move code for determining manifest resource
193         name into separate method. Only use satellite assemblies for
194         non-invariant cultures. For invariant culture, only load resources
195         from main assembly.
196
197 2007-09-17  Gert Driesen  <drieseng@users.sourceforge.net>
198
199         * ResourceManager.cs: BaseName(Field) should return only the name.
200         Added resourceSource field to store the actual type, which we need for
201         the namespace. Added CheckBaseName method to avoid code duplication.
202         Only check whether basename does not end in '.resources' on 1.0
203         profile. Fixed paramname of ArgumentNullExceptions to match MS.
204         Modified GetManifestResourceStreamNoCase to use resourceSource field
205         to construct manifest resource name. Modified GetStream to use
206         CurrentUICulture when culture is null. Fixed InternalGetResourceSet
207         to use invariant resources when culture is the neutral culture.
208         Code formatting.
209 >
210 2007-08-24  Gert Driesen  <drieseng@users.sourceforge.net>
211
212         * ResourceReader.cs: Fixed exception message to match MS. Removed
213         duplicate checks from string ctor.
214
215 2007-08-09  Atsushi Enomoto  <atsushi@ximian.com>
216
217         * ResourceReader.cs : implemented GetResourceData(). Resources with
218           unresolvable types could still be parsed, so hold type names
219           instead of types.
220
221 2007-07-16  Rodrigo Kumpera  <rkumpera@novell.com>
222
223         * ResourceReader.cs (ResourceValue): Put the null resource check
224           before the resource version 2 check, this fixes bug #81757
225
226 2007-05-28  Atsushi Enomoto  <atsushi@ximian.com>
227
228         * ResourceWriter.cs : fix for runtime serialization type index.
229           Fixed bug #81759.
230
231 2007-05-28  Atsushi Enomoto  <atsushi@ximian.com>
232
233         * ResourceWriter.cs : temporarily disable 2.0 output until I get
234           bug #81759 fixed.
235
236 2007-05-28  Atsushi Enomoto  <atsushi@ximian.com>
237
238         * IResourceWriter.cs NeutralResourcesLanguageAttribute.cs
239           SatelliteContractVersionAttribute.cs ResourceManager.cs
240           IResourceReader.cs ResourceSet.cs ResourceWriter.cs
241           ResourceReader.cs UltimateResourceFallbackLocation.cs
242           MissingManifestResourceException.cs :
243           implemented 2.0 resource support (write, and remaining read bits)
244           and GetStream(). Cosmetic attributes fixes.
245
246 2007-05-25  Atsushi Enomoto  <atsushi@ximian.com>
247
248         * MissingSatelliteAssemblyException.cs : new file.
249
250 2007-02-16  Gert Driesen  <drieseng@users.sourceforge.net>
251
252         * ResourceReader.cs: Fixed typo.
253
254 2006-12-30  Alexander Olk  <alex.olk@googlemail.com>
255
256         * ResourceManager.cs: Don't create the ResourceSets hashtable in the
257         protected ctor, instead move it to the public ctors. Fixes some not
258         working nunit tests. Also, return a closed ResourceSet instead of
259         creating a new one. Fixes one more test. If only BaseNameField is
260         provided, try to create a resource set from the BaseNameField. One
261         more test that passes now.
262         * ResourceSet.cs: Remove isDisposed. Not needed anymore.
263
264 2006-12-30  Alexander Olk  <alex.olk@googlemail.com>
265
266         * ResourceManager.cs: Iterate through the values of the ResourceSets
267         hashtable in ReleaseAllResources instead through the hashtable itself.
268
269 2006-12-30  Gert Driesen  <drieseng@users.sourceforge.net>
270
271         * ResourceReader.cs: Support reading byte arrays in v2 resource files.
272         Patch provided by Red Forks. Fixes bug #79976.
273
274 2006-10-29  Alexander Olk  <alex.olk@googlemail.com>
275
276         * ResourceSet.cs, ResourceManager.cs: Calling ResourceSet.Close()
277           disposes a resource set. A closed resource set will now be
278           removed from ResourceSets. Fixes bug #79182.
279
280 2006-03-14  Robert Jordan  <robertj@gmx.net>
281
282         * ResourceManager.cs: Don't stop the resource set lookup until
283         the invariant culture is reached. Fixes bug #77242.
284
285 2005-11-19  Zoltan Varga  <vargaz@gmail.com>
286
287         * Win32Resources.cs: Add a new 'FileVersion' property.
288
289 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
290
291         *  ResourceReader.cs: Implemented reading of primitives for version 2.
292
293 2005-03-31  Sebastien Pouliot  <sebastien@ximian.com>
294
295         *  ResourceReader.cs, ResourceSet.cs: Added a LinkDemand for 
296         SerializationFormatter when using a Stream constructor (other ctors
297         have different security - e.g. FileIOPermission for opening a file).
298
299 2005-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
300
301         * ResourceManager.cs: use culture.Equals in InternalGetResourceSet().
302
303 2005-02-12  Geoff Norton  <gnorton@customerdna.com>
304
305         * ResourceReader.cs: If a resource type index is -1 return null 
306         instead of throwing an exception
307         * ResourceWriter.cs: If an object is null; encode it with type index
308         -1 instead of throwing an exception.
309         
310 2005-02-11  Zoltan Varga  <vargaz@freemail.hu>
311
312         * Win32Resources.cs: Fix warning.
313
314 2004-12-06  Ben Maurer  <bmaurer@ximian.com>
315
316         * ResourceManager.cs (InternalResourceManager): on msft, they
317         search for a case-insenstitive match too here.
318
319 2004-05-02  Sebastien Pouliot  <sebastien@ximian.com>
320
321         * ResourceManager.cs: Avoid endless recursion when a resource file
322         isn't found.
323
324 2004-04-08  Lluis Sanchez <lluis@ximian.com>
325
326         * ResourceSet.cs: Added minor null check.
327
328 2004-02-03  Jackson Harper <jackson@ximian.com>
329
330         * ResourceSet.cs: Do not throw an exception for null strings.
331         
332 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
333
334         * Win32Resources.cs (Win32VersionInfoResource): Add more properties.
335
336 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
337
338         * Win32Resources.cs (Win32VersionInfoResource:WriteTo): Add padding
339         at the end of each string entry.
340
341         * Win32Resources.cs: Fix warnings not detected by mcs.
342
343 2004-01-08  Zoltan Varga  <vargaz@freemail.hu>
344
345         * Win32Resources.cs: Organize win32 resources into a class hierarchy
346         with the class Win32Resource as the abstract superclass. Add 
347         Win32ResFileReader and Win32IconFileReader classes and the 
348         corresponding resource types.
349
350         * Win32Resources.cs (Win32VersionInfoResource): Fix version number 
351         calculation. Add Language property.
352
353 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
354
355         * Win32Resources.cs: New file.
356
357         * Win32Resources.cs: The value of properties can't be empty.
358
359         * Win32Resources.cs: Add Win32ResourceType enumeration. Add accessors
360         for well-known property names. Add missing namespace declaration.
361
362 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
363
364         * ResourceWriter.cs (Stream): New internal property used by Ref.Emit.
365
366 2003-11-28  Dick Porter  <dick@ximian.com>
367
368         * ResourceSet.cs: Do string compares with the Invariant culture.
369
370 2003-11-18  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
371
372         * ResourceSet.cs: Implemented v1.1 updates
373
374 2003-09-07  Dick Porter  <dick@ximian.com>
375
376         * Temporary workaround for bug 43567, so that Npgsql at least
377         can run.
378
379 2003-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
380
381         * ResourceManager.cs: fixed infinite loop when the resource is not
382         found. Also fixes bug #34196.
383
384 2003-05-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
385
386         * ResourceManager.cs: enabled the code that calls GetSatelliteAssembly
387         and ignore the exception thrown if the assembly cannot be loaded.
388
389 2003-05-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
390
391         * ResourceManager.cs: fixed the name for the file when the culture is
392         not de invariant culture. Commented out the GetSatelliteAssembly code
393         to avoid NotImplementedException being thrown.
394
395 2002-08-19  Dick Porter  <dick@ximian.com>
396
397         * ResourceWriter.cs: Implemented all methods
398
399         * ResourceReader.cs: Cope with our ResourceSet class name, as well
400         as theirs
401
402 2002-08-18  Dick Porter  <dick@ximian.com>
403
404         * ResourceReader.cs: Finished basic implementation.  Some
405         optimisation in conjunction with ResourceSet still possible though
406
407 2002-08-14  Dick Porter  <dick@ximian.com>
408
409         * ResourceSet.cs: Throw the correct exceptions
410
411         * ResourceManager.cs: Implemented all unfinished methods
412
413 2002-03-12  Duncan Mak  <duncan@ximian.com>
414
415         * MissingManifestResourceException.cs: This should inherit from
416         SystemException, not Exception.
417
418 2002-01-26  Nick Drochak  <ndrochak@gol.com>
419
420         * ResourceReader.cs: Finsished reading resource files with just strings
421         in them.  Need to figure out other types, and also resources with
422         multiple types in the same file.
423
424 2002-01-24  Nick Drochak  <ndrochak@gol.com>
425
426         * ResourceReader.cs: Implemented constructors. Started on the 
427         GetEnumerator() method.  Not done yet, but comitting for 
428         'disaster recovery' purposes.
429
430 2002-01-19  Duncan Mak  <duncan@ximian.com>
431
432         * *.cs: Fixed indentation. There was a stupid bug in my .emacs file.
433
434 2002-1-17  Duncan Mak  <duncan@duncan@ximian.com>
435
436         * ResourceSet.cs: Implemented GetObject (string, bool) and GetString
437         (string, bool). ResourceSet has no more MonoTODOs! Also added in the
438         Serializable attribute.
439         
440         * *.cs: convert to Miguel's brace style.
441
442 2002-01-17  Duncan Mak  <duncan@ximian.com>
443
444         * ResourceManager.cs: Fixed GetNeutralResourcesLanguage () and added
445         new attributes documented in 1.0 SDK.
446
447 2002-01-17  Duncan Mak  <duncan@ximian.com>
448
449         * ResourceWriter.cs: Added MonoTODO decorations.
450
451         * SatelliteContractVersionAttribute.cs: added new attributes in 1.0 SDK.
452
453         * NeutralResoucesLanguageAttribute.cs: added new attributes in 1.0 SDK
454         
455 2002-01-16  Duncan Mak  <duncan@ximian.com>
456
457         * ResourceReader.cs: Fixed some typos.
458
459         * ResourceManager.cs: After reading the tutorial from the SDK,
460         finished all the ResourceManager constructors and removed those
461         MonoTODO tags.
462         
463         Removed MonoTODO from GetNeutralResourcesLanguage (Assembly)
464         because Miguel just implemented the whole class, including the
465         constructor that I needed (CultureInfo (string)).
466
467         Updated fields after reading the new docs from the final SDK.
468
469         * ResXFileRef.cs, ResXResourceReader.cs: Removed. They are part of
470         Windows.Forms and require System.Xml, which we don't have access to.
471
472 2002-01-13  Duncan Mak  <duncan@ximian.com>
473
474         * ResourceManager.cs: Added more MonoTODOs and cleaned up some 
475         indenting.
476
477 2002-01-09  Duncan Mak  <duncan@ximian.com>
478
479         * ResourceManager.cs: Fixed the GetSatelliteContractVersion()
480         method. It was missing a cast before. Removed MonoTODO
481         attribute. ;-) It was tested by John Barnette, so this shouldn't break
482         the build.
483
484         * ResourceManager.cs: Removed MonoTODO attribute on GetString
485         (string), as I believe it's correct. However, GetString
486         (string, CultureInfo) is definitely broken, so I'm marking it with
487         MonoTODO there. I also added MonoTODO to IntenalGetResourceSet().
488
489 2002-01-06  Duco Fijma <duco@lorentz.xs4all.nl>
490         * Finalizing IResourceReader and IResourceWriter interfaces: 
491           Added "new"-modifier to IResourceReader.GetEnumerator
492         * Fixed compilation issues in other *.cs, so that the 
493           System.Resources namespaces can be included in the corlib build.
494
495 2002-01-05  Ravi Pratap  <ravi@ximian.com>
496
497         * ResourceManager.cs : MonoTODO attribute decoration.
498         
499 Tue Dec 18 13:18:32 CET 2001 Paolo Molaro <lupus@ximian.com>
500
501         * *.cs: fixed some of the compilation issues: missing
502         using directives, typos.
503
504 2001-12-11  Duncan Mak  <duncan@ximian.com>
505
506         * Checked in to CVS.
507
508 2001-12-10  Duncan Mak  <duncan@ximian.com>
509
510         * ResourceManager.cs (GetNeutralResourcesLanguage):
511         (GetSatelliteContractVersion): Implemented.
512         
513 2001-12-09  Duncan Mak  <duncan@ximian.com>
514
515         * ResXResourceReader.cs: Initial attempt.
516
517         * ResXFileRef.cs: Initial attempt.
518
519         * ResourceWriter.cs: Initial attempt.
520
521         * ResourceSet.cs (ReadResources): Implemented, with help from Radek Doulik.
522
523 2001-11-28  Duncan Mak <duncan@ximian.com>      
524
525         * ResourceManager.cs: First attempt.
526
527 2001-11-27  Duncan Mak <duncan@ximian.com>
528
529         * ResourceSet.cs:
530         First attempt, can't continue until ResourceReader and ResourceWriter are implemented.
531                 
532         * SatelliteContractVersionAttribute.cs: First attempt. The spec is quite amibiguous here.
533
534         * NeutralResoucesLanguageAttribute.cs: Complete.
535
536         * MissingManifestResourceException.cs: Complete.
537
538         * IResourceReader.cs: Complete.
539
540         * IResourceWriter.cs: Complete.