Exemple #1
0
 public LanguageProvider(IPersistentStorage storage, Random rand, ILogger logger)
 {
     _langCollection = storage.RestoreSingle <LanguageResourceCollection>(Collection, LangKey);
     _rand           = rand;
     _logger         = logger;
     AssertNotNull(_langCollection);
 }
Exemple #2
0
 private void AssertNotNull(LanguageResourceCollection langCollection)
 {
     if (!(langCollection is null))
     {
         return;
     }
     _logger.LogError("LanguageResources could not restore the ResourceCollection from the Persistent Storage.");
     throw new NoNullAllowedException("LanguageResourceCollection is null.");
 }