예제 #1
0
 public void DenyPricing(long suggestedPrice)
 {
     if (!Progress.WasPricingDenied())
     {
         Apply(PricingDenied.Instance(Id, Client, Expectations, suggestedPrice));
     }
 }
예제 #2
0
        public static PricingDenied Instance(
            Id proposalId,
            Client client,
            Expectations expectations,
            long suggestedPrice)
        {
            PricingDenied pricingDenied = new PricingDenied
            {
                ProposalId     = proposalId.Value,
                ClientId       = client.Id.Value,
                Price          = expectations.Price,
                SuggestedPrice = suggestedPrice
            };

            return(pricingDenied);
        }
예제 #3
0
 public void When(PricingDenied deniedEvent)
 {
     this.Expectations = Expectations.WithAdjusted(deniedEvent.SuggestedPrice);
     this.Progress     = Progress.DeniedForPricing();
 }