Esempio n. 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);
        }
Esempio n. 2
0
 public void When(PricingDenied deniedEvent)
 {
     this.Expectations = Expectations.WithAdjusted(deniedEvent.SuggestedPrice);
     this.Progress     = Progress.DeniedForPricing();
 }
Esempio n. 3
0
 public static Proposal SubmitFor(Client client, Expectations expectations)
 {
     return(new Proposal(client, expectations));
 }
Esempio n. 4
0
 private Proposal(Id id, Client client, Expectations expectations, Progress progress)
 {
     Apply(ProposalSubmitted.Instance(id, client, expectations));
 }
Esempio n. 5
0
 private Proposal(Client client, Expectations expectations)
     : this(Id.Unique(), client, expectations, Progress.NONE)
 {
 }
Esempio n. 6
0
 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));
 }