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