コード例 #1
0
        public static AutoMapperConfiguration AutoMapperConfiguration()
        {
            if (Subject == null)
            {
                lock (SyncLock)
                {
                    if (Subject == null)
                    {
                        Subject = new AutoMapperConfiguration(new ILocalAutoMapperConfiguration[]
                        {
                            new BudgetAutoMapperConfiguration(new BudgetBucketFactory(), new BucketBucketRepoAlwaysFind(), new FakeLogger()),
                            new LedgerAutoMapperConfiguration(new LedgerTransactionFactory(), new InMemoryAccountTypeRepository(), new BucketBucketRepoAlwaysFind(), new FakeLogger()),
                            new MatchingAutoMapperConfiguration(new MatchingRuleFactory(new BucketBucketRepoAlwaysFind())), 
                            new StatementAutoMapperConfiguration(new InMemoryTransactionTypeRepository(), new InMemoryAccountTypeRepository(), new BucketBucketRepoAlwaysFind(), new FakeLogger()), 
                        }).Configure();
                    }
                }
            }

            return Subject;
        }
コード例 #2
0
 public void TestInitialise()
 {
     Subject = AutoMapperConfiguration();
 }