示例#1
0
 public ListingCreated(Guid id, Location location, Description description, decimal price)
 {
     Id = id;
     Location = location;
     Description = description;
     Price = price;
 }
示例#2
0
 private void ApplyEvent(ListingCreated @event)
 {
     Id = @event.Id;
     _location = @event.Location;
     _description = @event.Description;
     _price = @event.Price;
     _posted = false;
 }
示例#3
0
        public Listing(Guid id, Location location, Description description, decimal price) : base(id)
        {
            _location = location;
            _description = description;
            _price = price;
            _posted = false;

            PublishAndApplyEvent(new ListingCreated(id, location, description, price));
        }
示例#4
0
        public Listing(IAggregateBus aggregateBus, Guid id, Location location, Description description, decimal price)
            : base(aggregateBus, id)
        {
            _location = location;
            _description = description;
            _price = price;
            _posted = false;

            PublishAndApplyEventAsync(new ListingCreated(id, location, description, price)).ConfigureAwait(true);
        }