Пример #1
0
        /// <summary>
        /// Leaves this conversation.
        /// </summary>
        /// <returns></returns>
        public async Task Quit()
        {
            LCIMPartiallySuccessResult result = await RemoveMembers(new string[] { Client.Id });

            if (!result.IsSuccess)
            {
                LCIMOperationFailure error = result.FailureList[0];
                throw new LCException(error.Code, error.Reason);
            }
        }
Пример #2
0
        /// <summary>
        /// Joins this conversation.
        /// </summary>
        /// <returns></returns>
        public async Task Join()
        {
            LCIMPartiallySuccessResult result = await Client.ConversationController.AddMembers(Id,
                                                                                               new string[] { Client.Id });

            if (result.IsSuccess)
            {
                ids.UnionWith(result.SuccessfulClientIdList);
            }
            else
            {
                LCIMOperationFailure error = result.FailureList[0];
                throw new LCException(error.Code, error.Reason);
            }
        }