public void RegisterSetting( string name, string section, string description, OrganizationSettingType type) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } if (string.IsNullOrWhiteSpace(section)) { throw new ArgumentNullException(nameof(section)); } if (string.IsNullOrWhiteSpace(description)) { throw new ArgumentNullException(nameof(description)); } var key = NormalizeKey(section, name); if (_entries.ContainsKey(key)) { throw new DuplicateException($"Duplicate settings key {name} in section {section}"); } _entries.Add(key, new OrganizationSettingEntry(name, section, description, type)); }
public OrganizationSettingEntry( string name, string section, string description, OrganizationSettingType type) { Name = name; Section = section; Description = description; Type = type; }