File tree Expand file tree Collapse file tree
TS3QueryLib.Core.Silverlight/Server/Notification/EventArgs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ public ChannelDeletedEventArgs(CommandParameterGroupList commandParameterGroupLi
2525 if ( commandParameterGroupList == null )
2626 throw new ArgumentNullException ( nameof ( commandParameterGroupList ) ) ;
2727
28- ChannelId = commandParameterGroupList . GetParameterValue < int ? > ( "cid" ) ;
28+ List < int > channelIds = commandParameterGroupList . Select ( pg => pg . GetParameterValue < int > ( "cid" ) ) . ToList ( ) ;
29+
30+ ChannelId = channelIds . Count > 0 ? ( int ? ) channelIds . Last ( ) : null ;
2931 InvokerId = commandParameterGroupList . GetParameterValue < int ? > ( "invokerid" ) ;
3032 InvokerName = commandParameterGroupList . GetParameterValue < string > ( "invokername" ) ;
3133
32- SubChannelIdList = commandParameterGroupList . Skip ( 1 ) . Select ( pg => pg . GetParameterValue < int > ( "cid" ) ) . ToList ( ) ;
34+ SubChannelIdList = channelIds . GetRange ( 0 , Math . Max ( 0 , channelIds . Count - 1 ) ) ;
3335 }
3436
3537 #endregion
You can’t perform that action at this time.
0 commit comments