예제 #1
0
        /// <summary>
        /// Initializes a new instance of the Tweet class.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="who"></param>
        /// <param name="timestamp"></param>
        public Tweet(string message, string who)
        {
            var e = new TweetPostedEvent
            {
                Message = message,
                Who = who,
                TimeStamp = DateTime.UtcNow
            };

            ApplyEvent(e);
        }
예제 #2
0
 protected void OnTweetPosted(TweetPostedEvent e)
 {
     message = e.Message;
     who = e.Who;
     timestamp = e.TimeStamp;
 }