示例#1
0
 public SqlStringLocalizerFactory(
     LocalizationModelContext context,
     DevelopmentSetup developmentSetup,
     IOptions <SqlLocalizationOptions> localizationOptions)
 {
     _options          = localizationOptions ?? throw new ArgumentNullException(nameof(localizationOptions));
     _context          = context ?? throw new ArgumentNullException(nameof(LocalizationModelContext));
     _developmentSetup = developmentSetup;
 }
示例#2
0
 public SqlStringLocalizer(string defaultCulture, Dictionary <string, string> localizations, DevelopmentSetup developmentSetup, string resourceKey, bool returnKeyOnlyIfNotFound, bool createNewRecordWhenLocalisedStringDoesNotExist)
 {
     this._defaultCulture     = defaultCulture;
     _localizations           = localizations;
     _developmentSetup        = developmentSetup;
     _resourceKey             = resourceKey;
     _returnKeyOnlyIfNotFound = returnKeyOnlyIfNotFound;
     _createNewRecordWhenLocalisedStringDoesNotExist = createNewRecordWhenLocalisedStringDoesNotExist;
 }
 public SqlStringLocalizer(Dictionary <string, string> localizations, DevelopmentSetup developmentSetup,
                           string resourceKey, bool returnKeyOnlyIfNotFound, bool createNewRecordWhenLocalisedStringDoesNotExist)
 {
     _localizations           = localizations;
     _developmentSetup        = developmentSetup;
     _fullStop                = developmentSetup?._sqlContextOptions?.Value?.FullStop ?? ".";
     _resourceKey             = resourceKey;
     _returnKeyOnlyIfNotFound = returnKeyOnlyIfNotFound;
     _createNewRecordWhenLocalisedStringDoesNotExist = createNewRecordWhenLocalisedStringDoesNotExist;
 }