Esempio n. 1
0
        public async Task AddUser(NewProfileMessage message)
        {
            var user = new Entities.User
            {
                Id       = message.Id,
                Nickname = message.Nickname,
                Username = message.Username,
                Image    = message.Image
            };

            await _users.InsertOneAsync(user);
        }
Esempio n. 2
0
        /************************************************************************************/
        protected override void OnMessage(ThreadMessage NewMessage)
        {
            base.OnMessage(NewMessage);

            if (NewMessage is NewProfileMessage)
            {
                NewProfileMessage ThisMessage = (NewMessage as NewProfileMessage);
                m_CurrentProfile = ThisMessage.m_NewProfileCopy;
            }

            else if (NewMessage is EmailMessage)
            {
                EmailMessage ThisMessage = (NewMessage as EmailMessage);
                m_CurrentProfile.SendEMail(ThisMessage.m_astrToAddresses, ThisMessage.m_strSubject, ThisMessage.m_strBody);
            }

            return;
        }