コード例 #1
0
 public Message ChannelDeleteSuccess(Client currentClient, Message currentMessage, Channel currentChannel)
 {
     currentMessage = currentMessage.Redact();
     currentMessage.RecipientGUID = currentMessage.SenderGUID;
     currentMessage.SenderGUID    = ServerGUID;
     currentMessage.ChannelGUID   = currentChannel.ChannelGUID;
     currentMessage.CreatedUTC    = DateTime.Now.ToUniversalTime();
     currentMessage.Success       = true;
     currentMessage.SyncResponse  = currentMessage.SyncRequest;
     currentMessage.SyncRequest   = null;
     currentMessage.Data          = SuccessData.ToBytes("Successfully deleted channel", currentChannel.ChannelGUID);
     return(currentMessage);
 }
コード例 #2
0
        public Message ChannelDeletedByOwner(Client currentClient, Channel currentChannel)
        {
            Message ResponseMessage = new Message();

            ResponseMessage.RecipientGUID = currentClient.ClientGUID;
            ResponseMessage.SenderGUID    = ServerGUID;
            ResponseMessage.ChannelGUID   = currentChannel.ChannelGUID;
            ResponseMessage.CreatedUTC    = DateTime.Now.ToUniversalTime();
            ResponseMessage.Success       = true;
            ResponseMessage.SyncResponse  = ResponseMessage.SyncRequest;
            ResponseMessage.SyncRequest   = null;
            ResponseMessage.Data          = SuccessData.ToBytes("Channel deleted by owner", currentChannel.ChannelGUID);
            return(ResponseMessage);
        }
コード例 #3
0
        public Message MessageQueueSuccess(Client currentClient, Message currentMessage)
        {
            currentMessage = currentMessage.Redact();
            currentMessage.RecipientGUID = currentMessage.SenderGUID;
            currentMessage.SenderGUID    = ServerGUID;
            currentMessage.CreatedUTC    = DateTime.Now.ToUniversalTime();
            currentMessage.Success       = true;
            currentMessage.SyncResponse  = currentMessage.SyncRequest;
            currentMessage.SyncRequest   = null;

            if (!String.IsNullOrEmpty(currentMessage.RecipientGUID))
            {
                #region Individual-Recipient

                currentMessage.Data = SuccessData.ToBytes("Message queued to recipient", currentMessage.RecipientGUID);
                return(currentMessage);

                #endregion
            }
            else if (!String.IsNullOrEmpty(currentMessage.ChannelGUID))
            {
                #region Channel-Recipient

                currentMessage.Data = SuccessData.ToBytes("Message queued to channel", currentMessage.ChannelGUID);
                return(currentMessage);

                #endregion
            }
            else
            {
                #region Unknown-Recipient

                return(RecipientNotFound(currentClient, currentMessage));

                #endregion
            }
        }