Finalise() static private method

Makes sure that the IsNew property on LedgerBook EntryLines is not set to true, as it will be when they are newly created. Also ensures the StoredInAccount property for each ledger is set.
static private Finalise ( LedgerBook book, bool unlock = false ) : void
book BudgetAnalyser.Engine.Ledger.LedgerBook
unlock bool
return void
コード例 #1
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);
        }
コード例 #2
0
        public LedgerBook Build()
        {
            var book = new LedgerBook(new ReconciliationBuilder(new FakeLogger()))
            {
                Name       = Name,
                Modified   = Modified,
                StorageKey = StorageKey
            };

            book.SetReconciliations(this.reconciliations);
            if (book.Reconciliations.None())
            {
                this.ledgerBuckets.ForEach(l => book.AddLedger(l));
            }

            LedgerBookTestData.Finalise(book, this.lockWhenFinished);
            return(book);
        }