private ITypeSetting <DatabaseCommandSetting> GetTypeSetting( INamespaceSetting <DatabaseCommandSetting> namespaceSetting, Type type) { // check if it has a type setting. return(namespaceSetting.Types?.SingleOrDefault(x => x.Name == type.FullName)); }
/// <summary> /// returns true if the given setting is on in this namespace /// </summary> /// <param name="setting">The setting to test for</param> /// <returns>True if the setting is on</returns> public bool IsSettingSet(INamespaceSetting setting) { if (!IsSetup) { throw new InvalidOperationException("Setup hasn't been run yet."); } return(settings.Any(s => s.GetType() == setting.GetType())); }
public void AddSetting(INamespaceSetting setting) { settings.Add(setting); }