Пример #1
0
        public static ProposalSubmitted Instance(
            Id proposalId,
            Client client,
            Expectations expectations)
        {
            ProposalSubmitted proposalSubmitted = new ProposalSubmitted
            {
                ProposalId  = proposalId.Value,
                ClientId    = client.Id.Value,
                Summary     = expectations.Summary.Text,
                Description = expectations.Description.Text,
                CompletedBy = expectations.CompletedBy.Ticks,
                Steps       = Expectations.Convert(expectations.Steps),
                Price       = expectations.Price,
                Keywords    = string.Join(",", expectations.Keywords)
            };

            return(proposalSubmitted);
        }
Пример #2
0
 public void When(PricingDenied deniedEvent)
 {
     this.Expectations = Expectations.WithAdjusted(deniedEvent.SuggestedPrice);
     this.Progress     = Progress.DeniedForPricing();
 }
Пример #3
0
 public static Proposal SubmitFor(Client client, Expectations expectations)
 {
     return(new Proposal(client, expectations));
 }
Пример #4
0
 private Proposal(Id id, Client client, Expectations expectations, Progress progress)
 {
     Apply(ProposalSubmitted.Instance(id, client, expectations));
 }
Пример #5
0
 private Proposal(Client client, Expectations expectations)
     : this(Id.Unique(), client, expectations, Progress.NONE)
 {
 }
Пример #6
0
 public void When(SchedulingDenied schedulingDenied)
 {
     this.Expectations = Expectations.WithAdjusted(schedulingDenied.SuggestedCompletionDate);
     this.Progress     = Progress.DeniedForScheduling();
 }
Пример #7
0
 public static ProposalTraditional SubmitFor(Client client, Expectations expectations)
 {
     return(new ProposalTraditional(Id.Unique(), client, expectations));
 }