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