private void When(PriceListItemAttributesChangedDomainEvent @event) { this._countryCode = @event.CountryCode; this._subscriptionPeriod = SubscriptionPeriod.Of(@event.SubscriptionPeriodCode); this._category = PriceListItemCategory.Of(@event.CategoryCode); this._price = MoneyValue.Of(@event.Price, @event.Currency); }
private void When(PriceListItemCreatedDomainEvent @event) { this.Id = @event.PriceListItemId; _countryCode = @event.CountryCode; _subscriptionPeriod = SubscriptionPeriod.Of(@event.SubscriptionPeriodCode); _category = PriceListItemCategory.Of(@event.CategoryCode); _price = MoneyValue.Of(@event.Price, @event.Currency); _isActive = true; }