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); }
public void When(PricingDenied deniedEvent) { this.Expectations = Expectations.WithAdjusted(deniedEvent.SuggestedPrice); this.Progress = Progress.DeniedForPricing(); }
public static Proposal SubmitFor(Client client, Expectations expectations) { return(new Proposal(client, expectations)); }
private Proposal(Id id, Client client, Expectations expectations, Progress progress) { Apply(ProposalSubmitted.Instance(id, client, expectations)); }
private Proposal(Client client, Expectations expectations) : this(Id.Unique(), client, expectations, Progress.NONE) { }
public void When(SchedulingDenied schedulingDenied) { this.Expectations = Expectations.WithAdjusted(schedulingDenied.SuggestedCompletionDate); this.Progress = Progress.DeniedForScheduling(); }
public static ProposalTraditional SubmitFor(Client client, Expectations expectations) { return(new ProposalTraditional(Id.Unique(), client, expectations)); }