Пример #1
0
 public LeaveAccount(
     AccountId id,
     AccountName name,
     Period acquisitionPeriod,
     Period consommationPeriod,
     decimal amountGained,
     Frequency frequency)
     : base(id, name)
 {
     AcquisitionPeriod        = acquisitionPeriod;
     ConsommationPeriod       = consommationPeriod;
     AmountGainedPerFrequency = amountGained;
     Frequency = frequency;
 }
Пример #2
0
 public static Validation <LeaveAccount> TryCreate(
     AccountId id,
     AccountName name,
     Period acquisitionPeriod,
     Period consommationPeriod,
     decimal amountGained,
     Frequency frequency)
 {
     return
         (Validate(acquisitionPeriod, consommationPeriod, amountGained)
          .ToValidation(
              () => new LeaveAccount(
                  id,
                  name,
                  acquisitionPeriod,
                  consommationPeriod,
                  amountGained,
                  frequency)));
 }
Пример #3
0
 protected Account(AccountId id, AccountName name)
     : base(id)
 {
     Name = name;
 }