/// <summary> /// Creates an encapsulated setting logic and parameters. /// </summary> /// <param name="name">WebUI name of the setting.</param> /// <param name="type">Type of value represented.</param> /// <param name="get">Delegate to handle retrieval of the setting's value.</param> /// <param name="set">Delegate to handle setting the setting's value.</param> public Setting(string name, WebSettingType type, SettingGetter get, SettingSetter set) { this.Name = name; this.Type = type; this.Get = get; this.Set = set; }
public SettingGetter ReadLocalSetting(string settingName) { if (!_customSettingCache.ContainsKey(settingName)) { var p = new ProgramSetting { Name = settingName }; var getter = new SettingGetter(p); _customSettingCache.Add(settingName, getter); } return(_customSettingCache[settingName]); }
public SettingGetter GetPhoneNumberInputMask() { return(_phoneNumberInputMask ?? (_phoneNumberInputMask = GetSetting("PhoneNumberInputMask"))); }
public SettingGetter GetWeightBarcodeItemFormat() { return(_weightBarcodeItemFormat ?? (_weightBarcodeItemFormat = GetSetting("WeightBarcodeItemFormat"))); }
private SettingGetter GetWeightBarcodeItemLength() { return(_weightBarcodeItemLength ?? (_weightBarcodeItemLength = GetSetting("WeightBarcodeItemLength"))); }
private SettingGetter GetAutoRoundDiscount() { return(_autoRoundDiscount ?? (_autoRoundDiscount = GetSetting("AutoRoundDiscount"))); }
private SettingGetter GetWeightBarcodePrefix() { return(_weightBarcodePrefix ?? (_weightBarcodePrefix = GetSetting("WeightBarcodePrefix"))); }