Ejemplo n.º 1
0
        private async void Conversation_LocalChatStateChanged(object sender, ChatStateEventArgs e)
        {
            if (!ModernUIHelper.IsInDesignMode)
            {
                var message = new Message()
                {
                    Id = Guid.Empty, // Fire and Forget mode
                    To = new Node()
                    {
                        Name   = Contact.Identity.Name,
                        Domain = Contact.Identity.Domain
                    },
                    Content = new ChatState()
                    {
                        State = e.ChatState
                    }
                };

                await _clientChannel.SendMessageAsync(message);
            }
        }
Ejemplo n.º 2
0
        private async void Conversation_LocalChatStateChanged(object sender, ChatStateEventArgs e)
        {
            if (!ModernUIHelper.IsInDesignMode)
            {
                var message = new Message()
                {
                    To = new Node()
                    {
                        Name   = Contact.Identity.Name,
                        Domain = Contact.Identity.Domain
                    },
                    Content = new ChatState()
                    {
                        State = e.ChatState
                    }
                };

                if (_clientChannel.Transport.IsConnected &&
                    _clientChannel.State == SessionState.Established)
                {
                    await _clientChannel.SendMessageAsync(message, CancellationToken.None);
                }
            }
        }
Ejemplo n.º 3
0
        private async void Conversation_LocalChatStateChanged(object sender, ChatStateEventArgs e)
        {
            if (!ModernUIHelper.IsInDesignMode)
            {
                var message = new Message()
                {
                    Id = Guid.Empty, // Fire and Forget mode
                    To = new Node()
                    {
                        Name = Contact.Identity.Name,
                        Domain = Contact.Identity.Domain                        
                    },
                    Content = new ChatState()
                    {
                        State = e.ChatState
                    }
                };

                await _clientChannel.SendMessageAsync(message);
            }
        }