private void currentConversation_OnTextMessageReceived(object sender, AVIMTextMessage e)
        {
            var selection = (AVIMConversation)sender;

            var flag = currentConversation != null;
            if (flag)
            {
                flag = selection.ConversationId == currentConversation.ConversationId;
            }
            if (flag)
            {
                RefreshUI(() =>
                {
                    CacheMessage(selection, e);
                });
            }
            else
            {
                CacheMessage(selection, e);
            }

        }
 public Task<Tuple<bool, AVIMTextMessage>> SendTextMessageAsync(string textContent, bool transient, bool receipt)
 {
     AVIMTextMessage avTextMessage = new AVIMTextMessage(textContent);
     avTextMessage.Receipt = receipt;
     avTextMessage.Transient = transient;
     return InternalExtensions.OnSuccess<Tuple<bool, AVIMMessage>, Tuple<bool, AVIMTextMessage>>(this.SendMessageAsync((AVIMMessage)avTextMessage), (Func<Task<Tuple<bool, AVIMMessage>>, Tuple<bool, AVIMTextMessage>>)(x => new Tuple<bool, AVIMTextMessage>(x.Result.Item1, avTextMessage)));
 }
 void conversation_OnTextMessageReceived(object sender, AVIMTextMessage e)
 {
     var text = e.TextContent;
 }