|
| 1 | +using System; |
| 2 | +using TS3QueryLib.Core.CommandHandling; |
| 3 | +using TS3QueryLib.Core.Common; |
| 4 | + |
| 5 | +namespace TS3QueryLib.Core.Server.Notification.EventArgs |
| 6 | +{ |
| 7 | + public class ChannelCreatedEventArgs : System.EventArgs, IDump |
| 8 | + { |
| 9 | + #region Properties |
| 10 | + |
| 11 | + public int? ChannelId { get; protected set; } |
| 12 | + public int? ParentId { get; protected set; } |
| 13 | + public string Name { get; protected set; } |
| 14 | + public string Topic { get; protected set; } |
| 15 | + public string NamePhonetic { get; protected set; } |
| 16 | + public int? Codec { get; protected set; } |
| 17 | + public int? CodecQuality { get; protected set; } |
| 18 | + public int? Order { get; protected set; } |
| 19 | + public int? FlagPassword { get; protected set; } |
| 20 | + public int? FlagSemiPermanent { get; protected set; } |
| 21 | + public int? DeleteDelay { get; protected set; } |
| 22 | + public int? FlagPermanent { get; protected set; } |
| 23 | + public int? FlagDefault { get; protected set; } |
| 24 | + public int? CodecIsUnencrypted { get; protected set; } |
| 25 | + public int? NeededTalkPower { get; protected set; } |
| 26 | + public int? MaxClients { get; protected set; } |
| 27 | + public int? MaxFamilyClients { get; protected set; } |
| 28 | + public int? FlagMaxClientsUnlimited { get; protected set; } |
| 29 | + public int? FlagMaxFamilyClientsUnlimited { get; protected set; } |
| 30 | + public int? FlagMaxFamilyClientsInherited { get; protected set; } |
| 31 | + public int? InvokerId { get; protected set; } |
| 32 | + public string InvokerName { get; protected set; } |
| 33 | + public string InvokerUniqueId { get; protected set; } |
| 34 | + |
| 35 | + #endregion |
| 36 | + |
| 37 | + #region Constructors |
| 38 | + |
| 39 | + |
| 40 | + public ChannelCreatedEventArgs(CommandParameterGroupList commandParameterGroupList) |
| 41 | + { |
| 42 | + if (commandParameterGroupList == null) |
| 43 | + throw new ArgumentNullException(nameof(commandParameterGroupList)); |
| 44 | + |
| 45 | + ChannelId = commandParameterGroupList.GetParameterValue<int?>("cid"); |
| 46 | + ParentId = commandParameterGroupList.GetParameterValue<int?>("cpid"); |
| 47 | + Name = commandParameterGroupList.GetParameterValue<string>("channel_name"); |
| 48 | + Topic = commandParameterGroupList.GetParameterValue<string>("channel_topic"); |
| 49 | + NamePhonetic = commandParameterGroupList.GetParameterValue<string>("channel_name_phonetic"); |
| 50 | + Codec = commandParameterGroupList.GetParameterValue<int?>("channel_codec"); |
| 51 | + CodecQuality = commandParameterGroupList.GetParameterValue<int?>("channel_codec_quality"); |
| 52 | + FlagPermanent = commandParameterGroupList.GetParameterValue<int?>("channel_flag_permanent"); |
| 53 | + FlagDefault = commandParameterGroupList.GetParameterValue<int?>("channel_flag_default"); |
| 54 | + NeededTalkPower = commandParameterGroupList.GetParameterValue<int?>("channel_needed_talk_power"); |
| 55 | + Order = commandParameterGroupList.GetParameterValue<int?>("channel_order"); |
| 56 | + CodecIsUnencrypted = commandParameterGroupList.GetParameterValue<int?>("channel_codec_is_unencrypted"); |
| 57 | + FlagMaxFamilyClientsUnlimited = commandParameterGroupList.GetParameterValue<int?>("channel_flag_maxfamilyclients_unlimited"); |
| 58 | + FlagMaxFamilyClientsInherited = commandParameterGroupList.GetParameterValue<int?>("channel_flag_maxfamilyclients_inherited"); |
| 59 | + InvokerId = commandParameterGroupList.GetParameterValue<int?>("invokerid"); |
| 60 | + InvokerName = commandParameterGroupList.GetParameterValue<string>("invokername"); |
| 61 | + InvokerUniqueId = commandParameterGroupList.GetParameterValue<string>("invokeruid"); |
| 62 | + DeleteDelay = commandParameterGroupList.GetParameterValue<int?>("channel_delete_delay"); |
| 63 | + FlagPassword = commandParameterGroupList.GetParameterValue<int?>("channel_flag_password"); |
| 64 | + FlagPermanent = commandParameterGroupList.GetParameterValue<int?>("channel_flag_permanent"); |
| 65 | + FlagSemiPermanent = commandParameterGroupList.GetParameterValue<int?>("channel_flag_semi_permanent"); |
| 66 | + MaxClients = commandParameterGroupList.GetParameterValue<int?>("channel_maxclients"); |
| 67 | + MaxFamilyClients = commandParameterGroupList.GetParameterValue<int?>("channel_maxfamilyclients"); |
| 68 | + FlagMaxClientsUnlimited = commandParameterGroupList.GetParameterValue<int?>("channel_flag_maxclients_unlimited"); |
| 69 | + } |
| 70 | + |
| 71 | + #endregion |
| 72 | + } |
| 73 | +} |
0 commit comments