コード例 #1
0
 public override void OnReceiving(EventBase e)
 {
     if (e is RequestInviteReceived)
         OnReceiving(e as RequestInviteReceived);
     else
         throw new NotImplementedException();
 }
コード例 #2
0
 public override void OnReceiving(EventBase e)
 {
     if (e is AddedToMailingList)
         OnAddedToMailingList(e as AddedToMailingList);
 }
コード例 #3
0
 public override void OnReceiving(EventBase e)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public override void OnReceiving(EventBase e)
 {
     throw new NotImplementedException();
     //switch(e)
     //{
     //    //case AuthorUploadedCreativeWork:
     //    //case PatronUploadedCreativeWork:
     //    //case AuthorModifiedCreativeWork:
     //    //case PatronModifiedCreativeWork:
     //    //case CreativeWorkRated:
     //    //case CreativeWorkCritqued:
     //    //case CreativeWorkRented:
     //    //case CreativeWorkSold:
     //    //default:
     //}
 }
コード例 #5
0
 public static void Add(EventBase e)
 {
     using (Store)
     {
         using (var stream = Store.OpenStream(e.StreamId, 0, int.MaxValue))
         {
             e.StoredAt = DateTime.UtcNow;
             stream.Add(new EventMessage {Body = e});
             stream.CommitChanges(Guid.NewGuid());
         }
     }
 }