public void RegisterSpecificCondition(string action, IActionCondition actionCondition) { Guard.ArgumentNotNullOrEmptyString(action, "action"); Guard.ArgumentNotNull(actionCondition, "actionCondition"); List <IActionCondition> conditions = null; if (_specificActionConditions.TryGetValue(action, out conditions)) { IActionCondition registered = conditions.Find(delegate(IActionCondition test) { return(test.GetType() == actionCondition.GetType()); }); if (registered != null) { throw new ActionCatalogException(); } conditions.Add(actionCondition); } else { _specificActionConditions.Add(action, new List <IActionCondition>()); _specificActionConditions[action].Add(actionCondition); } }
public void RegisterGeneralCondition(IActionCondition actionCondition) { Guard.ArgumentNotNull(actionCondition, "actionCondition"); IActionCondition registered = _generalActionConditions.Find(delegate(IActionCondition test) { return test.GetType() == actionCondition.GetType(); }); if (registered != null) throw new ActionCatalogException(); _generalActionConditions.Add(actionCondition); }
public void RemoveSpecificCondition(string action, IActionCondition actionCondition) { Guard.ArgumentNotNullOrEmptyString(action, "action"); Guard.ArgumentNotNull(actionCondition, "actionCondition"); List<IActionCondition> conditions; if (_specificActionConditions.TryGetValue(action, out conditions)) { conditions.Remove(actionCondition); } }
public void RemoveSpecificCondition(string action, IActionCondition actionCondition) { Guard.ArgumentNotNullOrEmptyString(action, "action"); Guard.ArgumentNotNull(actionCondition, "actionCondition"); List <IActionCondition> conditions; if (_specificActionConditions.TryGetValue(action, out conditions)) { conditions.Remove(actionCondition); } }
public void RegisterGeneralCondition(IActionCondition actionCondition) { Guard.ArgumentNotNull(actionCondition, "actionCondition"); IActionCondition registered = _generalActionConditions.Find(delegate(IActionCondition test) { return(test.GetType() == actionCondition.GetType()); }); if (registered != null) { throw new ActionCatalogException(); } _generalActionConditions.Add(actionCondition); }
public void RegisterSpecificCondition(string action, IActionCondition actionCondition) { Guard.ArgumentNotNullOrEmptyString(action, "action"); Guard.ArgumentNotNull(actionCondition, "actionCondition"); List<IActionCondition> conditions = null; if (_specificActionConditions.TryGetValue(action, out conditions)) { IActionCondition registered = conditions.Find(delegate(IActionCondition test) { return test.GetType() == actionCondition.GetType(); }); if (registered != null) throw new ActionCatalogException(); conditions.Add(actionCondition); } else { _specificActionConditions.Add(action, new List<IActionCondition>()); _specificActionConditions[action].Add(actionCondition); } }
public void RemoveGeneralCondition(IActionCondition actionCondition) { Guard.ArgumentNotNull(actionCondition, "actionCondition"); _generalActionConditions.Remove(actionCondition); }
public void RemoveGeneralCondition(IActionCondition actionCondition) { throw new Exception("The method or operation is not implemented."); }
public void RemoveSpecificCondition(string action, IActionCondition actionCondition) { throw new Exception("The method or operation is not implemented."); }