Exemple #1
0
 public static SettingsFactory <TSettings, SubApp, Tier, DataCenter> CreateFactory <TSettings>(
     string globalAppName        = GLOBAL_APP_1,
     Tier tier                   = Tier.Local,
     DataCenter dataCenter       = DataCenter.Local,
     ISettingEncryptor encryptor = null,
     Dictionary <Type, object> additionalConverters = null)
     where TSettings : class, INFigSettings <SubApp, Tier, DataCenter>, new()
 {
     return(new SettingsFactory <TSettings, SubApp, Tier, DataCenter>(globalAppName, tier, dataCenter, encryptor, additionalConverters));
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new in-memory NFig store.
 /// </summary>
 /// <param name="globalAppName">The name of the global application. If you are using sub apps, this may represent the name of the umbrella "parent" application.</param>
 /// <param name="tier">Tier the application is running on (cannot be the default "Any" value).</param>
 /// <param name="dataCenter">DataCenter the application is running in (cannot be the default "Any" value).</param>
 /// <param name="logger">The logger which events will be sent to.</param>
 /// <param name="encryptor">
 /// Object which will provide encryption/decryption for encrypted settings. Only required if there are encrypted settings in use.
 /// </param>
 /// <param name="additionalDefaultConverters">
 /// Allows you to specify additional (or replacement) default converters for types. Each key/value pair must be in the form of
 /// (typeof(T), <see cref="ISettingConverter{T}"/>).
 /// </param>
 public NFigMemoryStore(
     string globalAppName,
     TTier tier,
     TDataCenter dataCenter,
     SettingsLogger <TSubApp, TTier, TDataCenter> logger = null,
     ISettingEncryptor encryptor = null,
     Dictionary <Type, object> additionalDefaultConverters = null)
     : base(globalAppName, tier, dataCenter, logger, encryptor, additionalDefaultConverters, pollingInterval: 0)
 {
 }