Example #1
0
 public Mapper_LedgerBookDto_LedgerBook(
     [NotNull] IBudgetBucketRepository bucketRepo,
     [NotNull] IAccountTypeRepository accountTypeRepo,
     [NotNull] ILedgerBucketFactory bucketFactory,
     [NotNull] ILedgerTransactionFactory transactionFactory,
     [NotNull] IReconciliationBuilder reconciliationBuilder)
 {
     if (bucketRepo == null)
     {
         throw new ArgumentNullException(nameof(bucketRepo));
     }
     if (accountTypeRepo == null)
     {
         throw new ArgumentNullException(nameof(accountTypeRepo));
     }
     if (bucketFactory == null)
     {
         throw new ArgumentNullException(nameof(bucketFactory));
     }
     if (transactionFactory == null)
     {
         throw new ArgumentNullException(nameof(transactionFactory));
     }
     if (reconciliationBuilder == null)
     {
         throw new ArgumentNullException(nameof(reconciliationBuilder));
     }
     this.bucketRepo            = bucketRepo;
     this.accountTypeRepo       = accountTypeRepo;
     this.bucketFactory         = bucketFactory;
     this.transactionFactory    = transactionFactory;
     this.reconciliationBuilder = reconciliationBuilder;
 }
        public LedgerBookFactory([NotNull] IReconciliationBuilder reconciliationBuilder)
        {
            if (reconciliationBuilder == null)
            {
                throw new ArgumentNullException(nameof(reconciliationBuilder));
            }

            this.reconciliationBuilder = reconciliationBuilder;
        }
Example #3
0
        public LedgerBookFactory([NotNull] IReconciliationBuilder reconciliationBuilder)
        {
            if (reconciliationBuilder == null)
            {
                throw new ArgumentNullException(nameof(reconciliationBuilder));
            }

            this.reconciliationBuilder = reconciliationBuilder;
        }
Example #4
0
 /// <summary>
 ///     Constructs a new instance of the <see cref="LedgerBook" /> class.  The Persistence system calls this constructor,
 ///     not the IoC system.
 /// </summary>
 internal LedgerBook([NotNull] IReconciliationBuilder reconciliationBuilder)
 {
     if (reconciliationBuilder == null)
     {
         throw new ArgumentNullException(nameof(reconciliationBuilder));
     }
     this.reconciliationBuilder = reconciliationBuilder;
     this.reconciliationBuilder.LedgerBook = this;
     this.reconciliations = new List<LedgerEntryLine>();
 }
        public LedgerBookTestHarness BuildTestHarness(IReconciliationBuilder reconciliationBuilder)
        {
            var book = new LedgerBookTestHarness(reconciliationBuilder)
            {
                Name = Name,
                Modified = Modified,
                StorageKey = StorageKey
            };

            book.SetReconciliations(this.reconciliations);

            LedgerBookTestData.Finalise(book, this.lockWhenFinished);
            return book;
        }
Example #6
0
        public LedgerBookTestHarness BuildTestHarness(IReconciliationBuilder reconciliationBuilder)
        {
            var book = new LedgerBookTestHarness(reconciliationBuilder)
            {
                Name       = Name,
                Modified   = Modified,
                StorageKey = StorageKey
            };

            book.SetReconciliations(this.reconciliations);

            LedgerBookTestData.Finalise(book, this.lockWhenFinished);
            return(book);
        }
 public Mapper_LedgerBookDto_LedgerBook(
     [NotNull] IBudgetBucketRepository bucketRepo,
     [NotNull] IAccountTypeRepository accountTypeRepo,
     [NotNull] ILedgerBucketFactory bucketFactory,
     [NotNull] ILedgerTransactionFactory transactionFactory,
     [NotNull] IReconciliationBuilder reconciliationBuilder)
 {
     if (bucketRepo == null) throw new ArgumentNullException(nameof(bucketRepo));
     if (accountTypeRepo == null) throw new ArgumentNullException(nameof(accountTypeRepo));
     if (bucketFactory == null) throw new ArgumentNullException(nameof(bucketFactory));
     if (transactionFactory == null) throw new ArgumentNullException(nameof(transactionFactory));
     if (reconciliationBuilder == null) throw new ArgumentNullException(nameof(reconciliationBuilder));
     this.bucketRepo = bucketRepo;
     this.accountTypeRepo = accountTypeRepo;
     this.bucketFactory = bucketFactory;
     this.transactionFactory = transactionFactory;
     this.reconciliationBuilder = reconciliationBuilder;
 }
Example #8
0
 /// <summary>
 ///     Constructs a new instance of the <see cref="LedgerBook" /> class.  The Persistence system calls this constructor,
 ///     not the IoC system.
 /// </summary>
 internal LedgerBook([NotNull] IReconciliationBuilder reconciliationBuilder)
 {
     this.reconciliationBuilder            = reconciliationBuilder ?? throw new ArgumentNullException(nameof(reconciliationBuilder));
     this.reconciliationBuilder.LedgerBook = this;
     this.reconciliations = new List <LedgerEntryLine>();
 }
Example #9
0
 /// <summary>
 ///     Constructs a new instance of the <see cref="LedgerBook" /> class.  The Persistence system calls this constructor,
 ///     not the IoC system.
 /// </summary>
 public LedgerBookTestHarness([NotNull] IReconciliationBuilder reconciliationBuilder)
     : base(reconciliationBuilder)
 {
 }