Пример #1
0
        public static void InitialiseDataApi()
        {
            Collator.Instance.SetupTypeForBasic <TestData>();
            Collator.RegisterExtensionType(typeof(TestData));
            Collator.RegisterExtensionType(typeof(TestDataX));
            Collator.Instance.SetupTypeForBasic <PathAddressData>();
            Collator.Instance.SetupTypeForBasic <SplitAddressData>();

            Repository.Instance.Register(null, new ContentRepository(new MockDataSourceFactory()));
            Repository.Instance.Register(typeof(TestData), new BasicRepository(new MockDataSourceFactory()));
            Repository.Instance.Register(typeof(ContentItem), new ContentRepository(new MockDataSourceFactory()));
            Repository.Instance.Register(typeof(User), new UserRepository(new MockDataSourceFactory()));
            Repository.Instance.Register(typeof(TestContainer), new BasicRepository(new MockDataSourceFactory()));

            Collator.Instance.BuildRepository();
        }