diff options
Diffstat (limited to 'src/mscorlib/src/System/Resources/ResourceManager.cs')
-rw-r--r-- | src/mscorlib/src/System/Resources/ResourceManager.cs | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs index 15f6af7bcf..f17a7c8f8e 100644 --- a/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -23,7 +23,6 @@ namespace System.Resources { using System.Reflection; using System.Runtime.Serialization; using System.Security; - using System.Security.Permissions; using System.Threading; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; @@ -149,7 +148,6 @@ namespace System.Resources { // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class ResourceManager { @@ -162,7 +160,7 @@ namespace System.Resources { // Sets is a many-to-one table of CultureInfos mapped to ResourceSets. // Don't synchronize ResourceSets - too fine-grained a lock to be effective [Obsolete("call InternalGetResourceSet instead")] - protected Hashtable ResourceSets; + internal Hashtable ResourceSets; // don't serialize the cache of ResourceSets @@ -738,48 +736,9 @@ namespace System.Resources { } Contract.EndContractBlock(); -#if !FEATURE_WINDOWSPHONE - String v = null; - if (a.ReflectionOnly) { - foreach (CustomAttributeData data in CustomAttributeData.GetCustomAttributes(a)) { - if (data.Constructor.DeclaringType == typeof(SatelliteContractVersionAttribute)) { - v = (String)data.ConstructorArguments[0].Value; - break; - } - } - - if (v == null) - return null; - } - else { - Object[] attrs = a.GetCustomAttributes(typeof(SatelliteContractVersionAttribute), false); - if (attrs.Length == 0) - return null; - Debug.Assert(attrs.Length == 1, "Cannot have multiple instances of SatelliteContractVersionAttribute on an assembly!"); - v = ((SatelliteContractVersionAttribute)attrs[0]).Version; - } - Version ver; - try { - ver = new Version(v); - } - catch(ArgumentOutOfRangeException e) { - // Note we are prone to hitting infinite loops if mscorlib's - // SatelliteContractVersionAttribute contains bogus values. - // If this assert fires, please fix the build process for the - // BCL directory. - if (a == typeof(Object).Assembly) { - Debug.Assert(false, System.CoreLib.Name+"'s SatelliteContractVersionAttribute is a malformed version string!"); - return null; - } - - throw new ArgumentException(Environment.GetResourceString("Arg_InvalidSatelliteContract_Asm_Ver", a.ToString(), v), e); - } - return ver; -#else - // On the phone return null. The calling code will use the assembly version instead to avoid potential type + // Return null. The calling code will use the assembly version instead to avoid potential type // and library loads caused by CA lookup. NetCF uses the assembly version always. return null; -#endif } protected static CultureInfo GetNeutralResourcesLanguage(Assembly a) @@ -1285,12 +1244,10 @@ namespace System.Resources { return null; } - [ComVisible(false)] public UnmanagedMemoryStream GetStream(String name) { return GetStream(name, (CultureInfo)null); } - [ComVisible(false)] public UnmanagedMemoryStream GetStream(String name, CultureInfo culture) { Object obj = GetObject(name, culture, false); UnmanagedMemoryStream ums = obj as UnmanagedMemoryStream; |