internal static void InitializeProviders() { object msProvider; if (_testProviders.TryGetValue(typeof(IModelServiceProvider), out msProvider)) { IModelServiceProvider modelServiceProvider = (IModelServiceProvider)msProvider; modelServiceProvider.AddDataModelExtension(new DefaultModelBuilder()); } SiteConfiguration.InitializeProviders(interfaceType => { object provider; _testProviders.TryGetValue(interfaceType, out provider); return(provider); }); }
internal static void InitializeProviders(Type modelServiceProviderType) { IModelServiceProvider modelServiceProvider = (IModelServiceProvider)Activator.CreateInstance(modelServiceProviderType); modelServiceProvider.AddDataModelExtension(new DefaultModelBuilder()); SiteConfiguration.InitializeProviders(interfaceType => { object provider; if (interfaceType == typeof(IModelServiceProvider)) { return(modelServiceProvider); } _testProviders.TryGetValue(interfaceType, out provider); return(provider); }); }