Remove dead RESOURCE_SATELLITE_CONFIG (dotnet/coreclr#20639)
authorSteve MacLean <stmaclea@microsoft.com>
Sat, 27 Oct 2018 02:57:42 +0000 (22:57 -0400)
committerJan Kotas <jkotas@microsoft.com>
Sat, 27 Oct 2018 02:57:42 +0000 (19:57 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/ca08a38bcab9bdc87eaa129e5960e4169442f72c

src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.cs
src/coreclr/src/System.Private.CoreLib/src/System/Resources/ResourceManager.cs

index a6a321d..b3ca6ce 100644 (file)
@@ -30,7 +30,7 @@
     <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
     <SignAssembly>true</SignAssembly>
     <DelaySign>true</DelaySign>
-    <DefineConstants>$(DefineConstants);CORECLR;_USE_NLS_PLUS_TABLE;RESOURCE_SATELLITE_CONFIG;CODE_ANALYSIS_BASELINE;netcoreapp</DefineConstants>
+    <DefineConstants>$(DefineConstants);CORECLR;_USE_NLS_PLUS_TABLE;CODE_ANALYSIS_BASELINE;netcoreapp</DefineConstants>
     <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
          the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
     <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
index 22d5445..ba1f2a8 100644 (file)
@@ -69,13 +69,6 @@ namespace System.Resources
                 // don't bother looking in satellites in this case
                 satellite = _mediator.MainAssembly;
             }
-#if RESOURCE_SATELLITE_CONFIG
-            // If our config file says the satellite isn't here, don't ask for it.
-            else if (!lookForCulture.HasInvariantCultureName && !_mediator.TryLookingForSatellite(lookForCulture))
-            {
-                satellite = null;
-            }
-#endif
             else
             {
                 satellite = GetSatelliteAssembly(lookForCulture, ref stackMark);
index 6bb4af2..6c7f6e7 100644 (file)
@@ -141,13 +141,6 @@ namespace System.Resources
 
         private bool UseManifest;  // Use Assembly manifest, or grovel disk.
 
-#if RESOURCE_SATELLITE_CONFIG
-        private static volatile Hashtable _installedSatelliteInfo;  // Give the user the option  
-                                                                    // to prevent certain satellite assembly probes via a config file.
-                                                                    // Note that config files are per-appdomain, not per-assembly nor process
-        private static volatile bool _checkedConfigFile;  // Did we read the app's config file?
-#endif
-
         // Whether to fall back to the main assembly or a particular 
         // satellite for the neutral resources.
         private UltimateResourceFallbackLocation _fallbackLoc;
@@ -1137,45 +1130,6 @@ namespace System.Resources
             return ums;
         }
 
-#if RESOURCE_SATELLITE_CONFIG
-        // Internal helper method - gives an end user the ability to prevent
-        // satellite assembly probes for certain cultures via a config file.
-        private bool TryLookingForSatellite(CultureInfo lookForCulture)
-        {
-            if (!_checkedConfigFile)
-            {
-                lock (this)
-                {
-                    if (!_checkedConfigFile)
-                    {
-                        _checkedConfigFile = true;
-                        _installedSatelliteInfo = GetSatelliteAssembliesFromConfig();
-                    }
-                }
-            }
-
-            if (_installedSatelliteInfo == null)
-                return true;
-
-            string[] installedSatellites = (string[])_installedSatelliteInfo[MainAssembly.FullName];
-
-            if (installedSatellites == null)
-                return true;
-
-            // The config file told us what satellites might be installed.
-            int pos = Array.IndexOf(installedSatellites, lookForCulture.Name);
-
-            return pos >= 0;
-        }
-
-        // Note: There is one config file per appdomain.  This is not 
-        // per-process nor per-assembly.
-        private Hashtable GetSatelliteAssembliesFromConfig()
-        {
-            return null;
-        }
-#endif  // RESOURCE_SATELLITE_CONFIG
-
         internal class ResourceManagerMediator
         {
             private ResourceManager _rm;
@@ -1262,15 +1216,6 @@ namespace System.Resources
             {
                 get { return _rm.BaseName; }
             }
-
-
-#if RESOURCE_SATELLITE_CONFIG
-            internal bool TryLookingForSatellite(CultureInfo lookForCulture)
-            {
-                return _rm.TryLookingForSatellite(lookForCulture);
-            }
-#endif
-
         }
     }
 }