System.Resources.RuntimeResourceSet.ResolveResourceLocator C# (CSharp) Méthode

ResolveResourceLocator() private méthode

private ResolveResourceLocator ( ResourceLocator resLocation, String key, ResourceLocator>.Dictionary copyOfCache, bool keyInWrongCase ) : Object
resLocation ResourceLocator
key String
copyOfCache ResourceLocator>.Dictionary
keyInWrongCase bool
Résultat Object
        private Object ResolveResourceLocator(ResourceLocator resLocation, String key, Dictionary<String, ResourceLocator> copyOfCache, bool keyInWrongCase)
        {
            // We need to explicitly resolve loosely linked manifest
            // resources, and we need to resolve ResourceLocators with null objects.
            Object value = resLocation.Value;
            if (value == null) {
                ResourceTypeCode typeCode;
                lock(Reader) {
                    value = _defaultReader.LoadObject(resLocation.DataPosition, out typeCode);
                }
                if (!keyInWrongCase && ResourceLocator.CanCache(typeCode)) {
                    resLocation.Value = value;
                    copyOfCache[key] = resLocation;
                }
            }
            return value;
        }
    }