本文整理汇总了C#中IServiceRegistry.FillType方法的典型用法代码示例。如果您正苦于以下问题:C# IServiceRegistry.FillType方法的具体用法?C# IServiceRegistry.FillType怎么用?C# IServiceRegistry.FillType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IServiceRegistry
的用法示例。
在下文中一共展示了IServiceRegistry.FillType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: configureServices
private void configureServices(IServiceRegistry services)
{
var configuration = new TemplateServiceConfiguration {BaseTemplateType = typeof (FubuRazorView)};
services.ReplaceService<ITemplateRegistry<IRazorTemplate>>(_templateRegistry);
services.ReplaceService<IFubuTemplateService>(new FubuTemplateService(_templateRegistry, new TemplateService(configuration), new FileSystem()));
services.ReplaceService<ITemplateServiceConfiguration>(configuration);
services.ReplaceService<IParsingRegistrations<IRazorTemplate>>(_parsings);
services.SetServiceIfNone<ITemplateDirectoryProvider<IRazorTemplate>, TemplateDirectoryProvider<IRazorTemplate>>();
services.SetServiceIfNone<ISharedPathBuilder>(new SharedPathBuilder());
var graph = new SharingGraph();
services.SetServiceIfNone(graph);
services.SetServiceIfNone<ISharingGraph>(graph);
services.FillType<IActivator, RazorActivator>();
services.FillType<ISharedTemplateLocator<IRazorTemplate>, SharedTemplateLocator<IRazorTemplate>>();
services.FillType<ISharingAttacher<IRazorTemplate>, MasterAttacher<IRazorTemplate>>();
services.FillType<ITemplateSelector<IRazorTemplate>, RazorTemplateSelector>();
services.FillType<IActivator, SharingAttacherActivator<IRazorTemplate>>();
services.FillType<IRenderStrategy, AjaxRenderStrategy>();
services.FillType<IRenderStrategy, DefaultRenderStrategy>();
services.SetServiceIfNone<IViewModifierService<IFubuRazorView>, ViewModifierService<IFubuRazorView>>();
services.FillType<IViewModifier<IFubuRazorView>, LayoutActivation>();
services.FillType<IViewModifier<IFubuRazorView>, PartialRendering>();
services.FillType<IViewModifier<IFubuRazorView>, FubuPartialRendering>();
}
示例2: addActivators
private static void addActivators(IServiceRegistry registry)
{
registry.FillType(typeof (IActivator), typeof (AssetGraphConfigurationActivator));
registry.FillType(typeof (IActivator), typeof (AssetPipelineBuilderActivator));
registry.FillType(typeof (IActivator), typeof (AssetDeclarationVerificationActivator));
registry.FillType(typeof (IActivator), typeof (MimetypeRegistrationActivator));
registry.FillType(typeof (IActivator), typeof (AssetCombinationBuildingActivator));
registry.FillType(typeof (IActivator), typeof (AssetPolicyActivator));
registry.FillType(typeof (IActivator), typeof (AssetFileWatchingActivator));
}
示例3: configureServices
private void configureServices(IServiceRegistry services)
{
services.ReplaceService<ISparkTemplateRegistry>(_templateRegistry);
services.ReplaceService<ITemplateRegistry<ITemplate>>(_templateRegistry);
services.ReplaceService<IParsingRegistrations<ITemplate>>(_parsings);
var graph = new SharingGraph();
services.SetServiceIfNone(graph);
services.SetServiceIfNone<ISharingGraph>(graph);
services.SetServiceIfNone<ISparkViewEngine>(new SparkViewEngine());
services.SetServiceIfNone<ICacheService>(new DefaultCacheService(HttpRuntime.Cache));
services.SetServiceIfNone(new SharingLogsCache());
services.FillType<IActivator, SharingConfigActivator>();
services.FillType<IActivator, SharingPolicyActivator>();
services.FillType<IActivator, SharingAttacherActivator<ITemplate>>();
services.FillType<IActivator, SparkActivator>();
services.FillType<IActivator, SparkPrecompiler>();
services.FillType<ISharingAttacher<ITemplate>, MasterAttacher<ITemplate>>();
services.FillType<ISharingAttacher<ITemplate>, BindingsAttacher>();
services.SetServiceIfNone<ISharedPathBuilder>(new SharedPathBuilder());
services.SetServiceIfNone<ITemplateDirectoryProvider<ITemplate>, TemplateDirectoryProvider<ITemplate>>();
services.SetServiceIfNone<ISharedTemplateLocator, SharedTemplateLocator>();
services.FillType<ISharedTemplateLocator<ITemplate>, SharedTemplateLocator>();
services.FillType<IRenderStrategy, NestedRenderStrategy>();
services.FillType<IRenderStrategy, AjaxRenderStrategy>();
services.FillType<IRenderStrategy, DefaultRenderStrategy>();
services.FillType<ITemplateSelector<ITemplate>, SparkTemplateSelector>();
services.SetServiceIfNone<IViewEntryProviderCache, ViewEntryProviderCache>();
services.SetServiceIfNone<IViewModifierService<IFubuSparkView>, ViewModifierService<IFubuSparkView>>();
services.FillType<IViewModifier<IFubuSparkView>, PageActivation<IFubuSparkView>>();
services.FillType<IViewModifier<IFubuSparkView>, SiteResourceAttacher>();
services.FillType<IViewModifier<IFubuSparkView>, ContentActivation>();
services.FillType<IViewModifier<IFubuSparkView>, OnceTableActivation>();
services.FillType<IViewModifier<IFubuSparkView>, OuterViewOutputActivator>();
services.FillType<IViewModifier<IFubuSparkView>, NestedViewOutputActivator>();
services.FillType<IViewModifier<IFubuSparkView>, ViewContentDisposer>();
services.FillType<IViewModifier<IFubuSparkView>, NestedOutputActivation>();
services.SetServiceIfNone<IHtmlEncoder, DefaultHtmlEncoder>();
services.SetServiceIfNone(new DefaultViewDefinitionPolicy());
services.SetServiceIfNone<IViewDefinitionResolver, ViewDefinitionResolver>();
}
示例4: Register
public void Register(IEnumerable<Type> matchedTypes, IServiceRegistry services)
{
matchedTypes
.Where(t => _pluginType.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract)
.Each(t => services.FillType(_pluginType, t));
}