public void Configure(BehaviorGraph graph) { var library = new TagProfileLibrary(); graph.Services.FindAllValues<HtmlConventionRegistry>() .Each(library.ImportRegistry); library.ImportRegistry(new DefaultHtmlConventions()); library.Seal(); graph.Services.ClearAll<HtmlConventionRegistry>(); graph.Services.ReplaceService(library); graph.Services.SetServiceIfNone(typeof(ITagGenerator<>), typeof(TagGenerator<>)); graph.Services.SetServiceIfNone<IElementNamingConvention, DefaultElementNamingConvention>(); graph.Services.SetServiceIfNone<IFieldAccessService, FieldAccessService>(); if (graph.IsDiagnosticsEnabled()) { graph.Services.SetServiceIfNone<IFieldAccessRightsExecutor, RecordingFieldAccessRightsExecutor>(); } else { graph.Services.SetServiceIfNone<IFieldAccessRightsExecutor, FieldAccessRightsExecutor>(); } }
public void Configure(BehaviorGraph graph) { var tagProfileLibrary = new TagProfileLibrary(); graph.Services.FindAllValues<HtmlConventionRegistry>().Each(tagProfileLibrary.ImportRegistry); tagProfileLibrary.ImportRegistry(new DefaultHtmlConventions()); tagProfileLibrary.Seal(); graph.Services.ClearAll<HtmlConventionRegistry>(); graph.Services.ReplaceService(tagProfileLibrary); graph.Services.SetServiceIfNone<IElementNamingConvention, DefaultElementNamingConvention>(); graph.Services.SetServiceIfNone<ILabelAndFieldLayout, DefinitionListLabelAndField>(); }
public void Configure(BehaviorGraph graph) { var library = new TagProfileLibrary(); graph.Services.FindAllValues<HtmlConventionRegistry>() .Each(library.ImportRegistry); library.ImportRegistry(new DefaultHtmlConventions()); library.Seal(); graph.Services.ClearAll<HtmlConventionRegistry>(); graph.Services.ReplaceService(library); graph.Services.SetServiceIfNone(typeof(ITagGenerator<>), typeof(TagGenerator<>)); graph.Services.SetServiceIfNone<IElementNamingConvention, DefaultElementNamingConvention>(); }