Esempio n. 1
0
 private static Packet DoAction(GSLiveMediaOption.VoiceOption option)
 {
     return(new Packet(
                CommandHandler.PlayerHash,
                CommandConst.ActionCreateVoiceChannel,
                JsonConvert.SerializeObject(new VoicePayload(
                                                key: option.UniqueKey, name: option.Name, desc: option.Desc
                                                )
                                            , new JsonSerializerSettings
     {
         NullValueHandling = NullValueHandling.Ignore,
         DefaultValueHandling = DefaultValueHandling.Ignore
     })));
 }
        internal override void CreateChannel(GSLiveMediaOption.VoiceOption option)
        {
            if (GameService.IsGuest)
            {
                throw new GameServiceException("This Function Not Working In Guest Mode").LogException <GsLiveVoice>(
                          DebugLocation.Voice, "CreateChannel");
            }

            if (option == null)
            {
                throw new GameServiceException("option Cant Be Null").LogException <GsLiveVoice>(
                          DebugLocation.Voice, "CreateChannel");
            }

            GameService.GSLive.GetGsHandler().CommandHandler.Send(CreateVoiceChannelHandler.Signature, option);
        }
 /// <summary>
 ///     Create Voice Channel With Options
 /// </summary>
 /// <param name="option">(NOTNULL)Voice Option</param>
 internal abstract void CreateChannel(GSLiveMediaOption.VoiceOption option);