コード例 #1
0
ファイル: ListingCreated.cs プロジェクト: jango2015/DDD.Light
 public ListingCreated(Guid id, Location location, Description description, decimal price)
 {
     Id = id;
     Location = location;
     Description = description;
     Price = price;
 }
コード例 #2
0
ファイル: Listing.cs プロジェクト: jango2015/DDD.Light
 private void ApplyEvent(ListingCreated @event)
 {
     Id = @event.Id;
     _location = @event.Location;
     _description = @event.Description;
     _price = @event.Price;
     _posted = false;
 }
コード例 #3
0
ファイル: Listing.cs プロジェクト: jango2015/DDD.Light
        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
ファイル: Listing.cs プロジェクト: wallaceiam/CQRS.Light
        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);
        }