/// <summary> /// Resolves a CommandSet list given its type. /// </summary> /// <param name="csType">The type of list CommandSet list to get.</param> /// <returns></returns> private IEnumerable <CommandSet> ResolveCommandSet(CommandSetType csType) { switch (csType) { case CommandSetType.CSTYPE_PHONE_CALL: return(PhoneCallSet); case CommandSetType.CSTYPE_WEBCHAT: return(WebchatSet); case CommandSetType.CSTYPE_EMAIL: return(EmailSet); case CommandSetType.CSTYPE_PERSONAL: return(PersonalSet); default: throw new InvalidOperationException("CommandSet Type not supported!"); } }
/// <summary> /// Removes a CommandSet from the SetList in the service layer. /// </summary> /// <param name="csType">The type of command to remove.</param> /// <param name="data">The CommandSet to remove.</param> public void RemoveCommandSet(CommandSetType csType, CommandSet data) { CommandService.RemoveCommandSet(csType, data); }
/// <summary> /// Adds a CommandSet to the SetList in the service layer. /// </summary> /// <param name="csType">The type of command to add.</param> /// <param name="data">The CommandSet data.</param> public void AddCommandSet(CommandSetType csType, CommandSet data) { CommandService.AddCommandSet(csType, data); }
/// <summary> /// Removes a CommandSet from the given SetType. /// </summary> /// <param name="csType">The SetType to remove the CommandSet from.</param> /// <param name="data">The CommandSet to remove from the SetType.</param> public void RemoveCommandSet(CommandSetType csType, CommandSet data) { List <CommandSet> SetList = ResolveCommandSet(csType) as List <CommandSet>; SetList.Remove(data); }
/// <summary> /// Adds a CommandSet to the given SetType. /// </summary> /// <param name="csType">The SetType to add the command to.</param> /// <param name="data">The data to add to the SetType.</param> public void AddCommandSet(CommandSetType csType, CommandSet data) { List <CommandSet> SetList = ResolveCommandSet(csType) as List <CommandSet>; SetList.Add(data); }
/// <summary> /// Gets a CommandSet list given its type. /// </summary> /// <param name="csType">The type of list CommandSet list to get.</param> /// <returns></returns> public IEnumerable <CommandSet> GetCommandSet(CommandSetType csType) { return(ResolveCommandSet(csType)); }
public static bool LoadFromFile(string fileName, out CommandSetType obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an CommandSetType object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output CommandSetType object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out CommandSetType obj, out System.Exception exception) { exception = null; obj = default(CommandSetType); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public static bool Deserialize(string xml, out CommandSetType obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); }
/// <summary> /// Deserializes workflow markup into an CommandSetType object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output CommandSetType object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out CommandSetType obj, out System.Exception exception) { exception = null; obj = default(CommandSetType); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } }