Example #1
0
		public void ShareWith(IEnumerable<int> userIDs)
		{
			Contract.Requires(userIDs != null);
			Contract.Requires(userIDs.Count() > 0);
			Contract.Ensures(Contract.OldValue(userIDs) == userIDs);
			var @event = new Shared(Id, Version, userIDs);
			RaiseEvent(@event);
		}
Example #2
0
		public void Apply(Shared @event)
		{
			Id = @event.AggregateId;
			Version = @event.Version;
		}