public static void LoadFromClusterManifest(string traceType, ref StoreSettings storeSettings) { Diagnostics.Assert(storeSettings != null, traceType, "storeSettings"); ConfigStoreUtility.InitializeConfigStore(); var sectionName = StoreSettingsConfigurationNames.SectionName; SetSweepThreshold(traceType, ref storeSettings, sectionName); SetEnableStrict2PL(traceType, ref storeSettings, sectionName); ValidateSettings(traceType, storeSettings); }
private static void SetEnableStrict2PL(string traceType, ref StoreSettings storeSettings, string sectionName) { Diagnostics.Assert(string.IsNullOrEmpty(sectionName) == false, traceType, "section name cannot be null or empty"); if (!storeSettings.EnableStrict2PL.HasValue) { storeSettings.EnableStrict2PL = ConfigStoreUtility.GetUnencryptedBoolConfigValue( sectionName, StoreSettingsConfigurationNames.EnableStrict2PL.Item1, StoreSettingsConfigurationNames.EnableStrict2PL.Item2); } Diagnostics.Assert(storeSettings.EnableStrict2PL.HasValue, traceType, "EnableStrict2PL must have a value"); }
private static void SetSweepThreshold(string traceType, ref StoreSettings storeSettings, string sectionName) { Diagnostics.Assert(string.IsNullOrEmpty(sectionName) == false, traceType, "section name cannot be null or empty"); if (!storeSettings.SweepThreshold.HasValue) { storeSettings.SweepThreshold = ConfigStoreUtility.GetUnencryptedIntConfigValue( sectionName, StoreSettingsConfigurationNames.SweepThreshold.Item1, StoreSettingsConfigurationNames.SweepThreshold.Item2); } Diagnostics.Assert(storeSettings.SweepThreshold.HasValue, traceType, "SweepThreshold must have a value"); }