/// <summary>
        /// Intended for testing purposes only.
        /// </summary>
        public ResourceManagerStringLocalizer(
            ResourceManager resourceManager,
            AssemblyWrapper resourceAssemblyWrapper,
            string baseName,
            IResourceNamesCache resourceNamesCache)
        {
            if (resourceManager == null)
            {
                throw new ArgumentNullException(nameof(resourceManager));
            }

            if (resourceAssemblyWrapper == null)
            {
                throw new ArgumentNullException(nameof(resourceAssemblyWrapper));
            }

            if (baseName == null)
            {
                throw new ArgumentNullException(nameof(baseName));
            }

            if (resourceNamesCache == null)
            {
                throw new ArgumentNullException(nameof(resourceNamesCache));
            }

            _resourceAssemblyWrapper = resourceAssemblyWrapper;
            _resourceManager = resourceManager;
            _resourceBaseName = baseName;
            _resourceNamesCache = resourceNamesCache;
        }
Exemple #2
0
 public AssemblyResourceStringProvider(
     IResourceNamesCache resourceCache,
     AssemblyWrapper resourceAssembly,
     string resourceBaseName)
 {
     _resourceNamesCache = resourceCache;
     _assembly           = resourceAssembly;
     _resourceBaseName   = resourceBaseName;
 }