示例#1
0
 public Library(
     TransmogrifyConfig transmogrifyConfig,
     IEnumerable <ILanguageResolver> languageResolvers,
     ILibraryFactory libraryFactory)
 {
     _transmogrifyConfig = transmogrifyConfig;
     _languageResolvers  = languageResolvers;
     _library            = libraryFactory.GetOrLoad();
 }
示例#2
0
        protected LibraryFactoryBase(TransmogrifyConfig transmogrifyConfig)
        {
            if (string.IsNullOrWhiteSpace(transmogrifyConfig.LanguagePath))
            {
                throw new
                      TransmogrifyInvalidLanguagePath($"Language path: {transmogrifyConfig.LanguagePath} is not valid");
            }

            _languagePath  = transmogrifyConfig.LanguagePath;
            _cachedLibrary = new Dictionary <string, Dictionary <string, Dictionary <string, string> > >();
            _loaded        = false;
        }