public IMessage CreateMessage(IMessageEventDTO messageEventDTO, IApp app)
        {
            if (messageEventDTO == null)
            {
                return(null);
            }

            return(new Message(messageEventDTO, app, _client));
        }
        public IMessage CreateMessage(IMessageEventDTO messageEventDTO)
        {
            if (messageEventDTO == null)
            {
                return(null);
            }

            return(new Message(messageEventDTO, null, _client));
        }
        private IMessage _buildMessage(IMessageEventDTO messageEventDTO, IDictionary <long, IApp> apps)
        {
            if (messageEventDTO.Type != EventType.MessageCreate)
            {
                return(null);
            }

            // Get the app that was used to send this message.
            //  Note that we don't always get the App ID.
            //  Also assume that some apps could be missing from the dictionary.
            IApp app = null;

            if (messageEventDTO.MessageCreate.SourceAppId != null)
            {
                apps.TryGetValue(messageEventDTO.MessageCreate.SourceAppId.Value, out app);
            }

            return(new Message(messageEventDTO, app, _client));
        }
Exemple #4
0
 public Message(IMessageEventDTO messageEventDTO, IApp app, ITwitterClient client)
 {
     MessageEventDTO = messageEventDTO;
     Client          = client;
     _app            = app;
 }
Exemple #5
0
 public DestroyMessageParameters(IMessageEventDTO messageEvent)
 {
     MessageId = messageEvent.Id;
 }