コード例 #1
0
        /// <summary>
        /// Sends NeighborhoodSharedProfileUpdateRequest message to the connected client of the profile server.
        /// </summary>
        /// <param name="Client">Client connected to the profile server, to which the message should be sent.</param>
        /// <param name="UpdateItems">List of update items to send to the client.</param>
        /// <returns>Message that was sent to the profile server, or null if the function failed.</returns>
        public async Task <Message> SendNeighborhoodSharedProfileUpdateRequest(IncomingClient Client, List <SharedProfileUpdateItem> UpdateItems)
        {
            log.Trace("()");

            Message res     = null;
            Message request = Client.MessageBuilder.CreateNeighborhoodSharedProfileUpdateRequest(UpdateItems);

            if (await Client.SendMessageAndSaveUnfinishedRequestAsync(request, null))
            {
                res = request;
            }

            if (res != null)
            {
                log.Trace("(-):*.Id", res.Id);
            }
            else
            {
                log.Trace("(-):null");
            }
            return(res);
        }
コード例 #2
0
        /// <summary>
        /// Sends FinishNeighborhoodInitializationRequest message to the connected client of the profile server.
        /// </summary>
        /// <param name="Client">Client connected to the profile server, to which the message should be sent.</param>
        /// <returns>Message that was sent to the profile server, or null if the function failed.</returns>
        public async Task <Message> SendFinishNeighborhoodInitializationRequest(IncomingClient Client)
        {
            log.Trace("()");

            Message res     = null;
            Message request = Client.MessageBuilder.CreateFinishNeighborhoodInitializationRequest();

            if (await Client.SendMessageAndSaveUnfinishedRequestAsync(request, null))
            {
                res = request;
            }

            if (res != null)
            {
                log.Trace("(-):*.Id", res.Id);
            }
            else
            {
                log.Trace("(-):null");
            }
            return(res);
        }