+2002-01-17 Duncan Mak <duncan@ximian.com>
+
+ * ResourceManager.cs: Fixed GetNeutralResourcesLanguage () and added
+ new attributes documented in 1.0 SDK.
+
2002-01-17 Duncan Mak <duncan@ximian.com>
* ResourceWriter.cs: Added MonoTODO decorations.
using System.Globalization;
namespace System.Resources {
+
+ [Serializable]
public class ResourceManager {
public static readonly int HeaderVersionNumber;
- // public static readonly int MagicNumber = 0xBEEFCACE;
+ // public static readonly int MagicNumber = 0xBEEFCACE;
protected string BaseNameField;
protected Assembly MainAssembly;
return null;
}
- [MonoTODO]
protected virtual string GetResourceFileName (CultureInfo culture) {
- return culture.Name + ".resources"; // TODO check for correctness.
+ return culture.Name + ".resources";
}
[MonoTODO]
r.Close();
}
- [MonoTODO]
protected static CultureInfo GetNeutralResourcesLanguage (Assembly a) {
foreach (Attribute attribute in a.GetCustomAttributes (false)) {
-// if (attribute is NeutralResourcesLanguageAttribute)
-// return new CultureInfo (attribute.CultureName);
+ if (attribute is NeutralResourcesLanguageAttribute)
+ return new CultureInfo ((attribute as NeutralResourcesLanguageAttribute).CultureName);
}
return null;
}
- public static Version GetSatelliteContractVersion (Assembly a) {
+ protected static Version GetSatelliteContractVersion (Assembly a) {
foreach (Attribute attribute in a.GetCustomAttributes (false)) {
if (attribute is SatelliteContractVersionAttribute)
return new Version ((attribute as SatelliteContractVersionAttribute).Version);