コード例 #1
0
        public override void PushEventById(string memberId, string data,
                                           PushEventBufferType pushEventBufferType = PushEventBufferType.NoBuffering)
        {
            if (GameService.IsGuest)
            {
                throw new GameServiceException("This Function Not Working In Guest Mode").LogException <GsLiveEvent>(
                          DebugLocation.Event, "PushEventById");
            }

            if (string.IsNullOrEmpty(memberId))
            {
                throw new GameServiceException("memberId Cant Be NullOrEmpty").LogException <GsLiveEvent>(
                          DebugLocation.Event, "PushEventById");
            }

            if (string.IsNullOrEmpty(data))
            {
                throw new GameServiceException("data Cant Be NullOrEmpty").LogException <GsLiveEvent>(
                          DebugLocation.Event, "PushEventById");
            }

            if (data.Length > EventConst.MaxDataLength)
            {
                throw new GameServiceException("The data is Too Long, Max Data Length Is " +
                                               EventConst.MaxDataLength + " Characters.")
                      .LogException <GsLiveEvent>(DebugLocation.Event, "PushEventById");
            }

            GameService.GSLive.GetGsHandler().CommandHandler.Send(PushEventHandler.Signature,
                                                                  new PushEventMessage(
                                                                      PushEventSendType.MemberId, memberId, data, default, pushEventBufferType
コード例 #2
0
 internal PushEventMessage(PushEventSendType sendType, string receiverId = null, string data = null,
                           int nextSecs = 0,
                           PushEventBufferType bufferType = PushEventBufferType.NoBuffering)
 {
     SendType   = sendType;
     ReceiverId = receiverId;
     Data       = data;
     NextSecs   = nextSecs;
     BufferType = bufferType;
 }
コード例 #3
0
 /// <summary>
 ///     Push an Event To Member Tag With Data
 /// </summary>
 /// <param name="memberTag">(NOTNULL)Tag of Member You Want To Sent an Event to it</param>
 /// <param name="data">(NOTNULL)The main Event Data </param>
 /// <param name="pushEventBufferType">The Type of Event Buffering</param>
 public abstract void PushEventByTag(string memberTag, string data,
                                     PushEventBufferType pushEventBufferType = PushEventBufferType.NoBuffering);