public override void OnReceiving(EventBase e) { if (e is RequestInviteReceived) OnReceiving(e as RequestInviteReceived); else throw new NotImplementedException(); }
public override void OnReceiving(EventBase e) { if (e is AddedToMailingList) OnAddedToMailingList(e as AddedToMailingList); }
public override void OnReceiving(EventBase e) { throw new NotImplementedException(); }
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: //} }
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()); } } }