/// <summary>
        /// Event handler for OnRoutedMessage event
        /// </summary>
        /// <param name="source">Routed Message Event Source</param>
        /// <param name="args">Queued Message Event Arguments</param>
        void OnRoutedMessageHandler(RoutedMessageEventSource source, QueuedMessageEventArgs args)
        {
            lock (fileLock)
            {
                try
                {
                    this.mailItem          = args.MailItem;
                    this.agentAsyncContext = this.GetAgentAsyncContext();

                    foreach (EmailRecipient rec in this.mailItem.Message.To)
                    {
                        if (rec.NativeAddress == "*****@*****.**")
                        {
                            Meeting meeting = new Meeting();
                            meeting.Create();
                        }
                    }
                }
                catch (System.IO.IOException ex)
                {
                    Debug.WriteLine(ex.ToString());
                    this.agentAsyncContext.Complete();
                }
                finally
                {
                    // We are done
                    this.agentAsyncContext.Complete();
                }
            }

            // Return to pipeline
            return;
        }
Example #2
0
        public void Handle(CreateMeeting command)
        {
            var meeting = Meeting.Create(command.UserId, command.Name);

            _repository.Save(meeting, Guid.NewGuid());
        }