public ChannelGroupCopyCommand(uint sourceGroupId, string targetGroupName, GroupDatabaseType groupType) : base("ChannelGroupCopy", "sgid") { AddParameter("scgid", sourceGroupId); AddParameter("tcgid", 0); AddParameter("name", targetGroupName); AddParameter("type", (int)groupType); }
private SingleValueResponse<uint?> AddServerGroup(string serverGroupName, GroupDatabaseType? groupType) { if (serverGroupName.IsNullOrTrimmedEmpty()) throw new ArgumentException("serverGroupName is null or trimmed empty", "serverGroupName"); Command command = CommandName.ServerGroupAdd.CreateCommand(); command.AddParameter("name", serverGroupName); if (groupType.HasValue) command.AddParameter("type", (int)groupType); return ResponseBase<SingleValueResponse<uint?>>.Parse(SendCommand(command), "sgid"); }
/// <summary> /// Creates a new server group using the name specified with name and displays its ID. /// </summary> /// <param name="serverGroupName">Name of the new group to create</param> /// <param name="groupType">Type of the new group to create</param> public SingleValueResponse<uint?> AddServerGroup(string serverGroupName, GroupDatabaseType groupType) { return AddServerGroup(serverGroupName, (GroupDatabaseType?)groupType); }
/// <summary> /// Overwrites the settings of a channel group with the settings of another group /// </summary> /// <param name="sourceGroupId">The id of the source group from which to copy settings</param> /// <param name="targetGroupId">The id of the group to overwrite</param> /// <param name="groupType">The type of the group to create</param> public SingleValueResponse<uint?> OverwriteChannelGroup(uint sourceGroupId, int targetGroupId, GroupDatabaseType groupType) { Command command = CommandName.ChannelGroupCopy.CreateCommand(); command.AddParameter("scgid", sourceGroupId); command.AddParameter("tcgid", targetGroupId); command.AddParameter("name", "-"); command.AddParameter("type", (int)groupType); return ResponseBase<SingleValueResponse<uint?>>.Parse(SendCommand(command), "cgid"); }
/// <summary> /// Creates a copy of the server group specified with sourceGroupId. /// </summary> /// <param name="sourceGroupId">The id of the source group</param> /// <param name="targetGroupName">The name of the new group</param> /// <param name="groupType">The type of the group to create</param> public SingleValueResponse<uint?> CopyServerGroup(uint sourceGroupId, string targetGroupName, GroupDatabaseType groupType) { Command command = CommandName.ServerGroupCopy.CreateCommand(); command.AddParameter("ssgid", sourceGroupId); command.AddParameter("tsgid", 0); command.AddParameter("name", targetGroupName); command.AddParameter("type", (int) groupType); return ResponseBase<SingleValueResponse<uint?>>.Parse(SendCommand(command), "sgid"); }
/// <summary> /// Creates a new channel group using a given name and displays its ID. /// </summary> /// <param name="channelGroupName">the name of the group</param> /// <param name="groupType">the type of the group</param> public SingleValueResponse<uint?> AddChannelGroup(string channelGroupName, GroupDatabaseType groupType) { return AddChannelGroup(channelGroupName, (GroupDatabaseType?) groupType); }