예제 #1
0
        public void Import(HtmlConventionLibrary library)
        {
            var types = library._libraries.GetKeys().Union(_libraries.GetKeys()).Distinct();

            types
            .Select(t => typeof(HtmlConventionLibraryImporter <>).MakeGenericType(t))
            .Select(t => (IHtmlConventionLibraryImporter)Activator.CreateInstance(t))
            .Each(x => x.Import(this, library));
        }
예제 #2
0
        public static ElementGenerator <T> For(HtmlConventionLibrary library, Func <Type, object> serviceLocator = null, T model = null)
        {
            serviceLocator = serviceLocator ?? Activator.CreateInstance;

            var tags = new TagGenerator(library.TagLibrary, new ActiveProfile(), serviceLocator);

            return(new ElementGenerator <T>(tags)
            {
                Model = model
            });
        }
예제 #3
0
 public void Import(HtmlConventionLibrary target, HtmlConventionLibrary source)
 {
     target.For <T>().Import(source.For <T>());
 }
예제 #4
0
 public void Apply(HtmlConventionLibrary library) => library.Import(Library);
예제 #5
0
 public TagGeneratorFactory(ActiveProfile profile, HtmlConventionLibrary library, ITagRequestBuilder tagRequestBuilder)
 {
     _profile           = profile;
     _library           = library;
     _tagRequestBuilder = tagRequestBuilder;
 }
예제 #6
0
 public ProfileExpression(HtmlConventionLibrary library, string profileName)
 {
     Library      = library;
     _profileName = profileName;
 }
예제 #7
0
 public void Import(HtmlConventionLibrary library)
 {
     TagLibrary.Import(library.TagLibrary);
     library._services.Each((key, builder) => builder.FillInto(_services[key]));
 }
예제 #8
0
 private HtmlConventionRegistry(HtmlConventionLibrary library) : base(library, TagConstants.Default)
 {
 }
예제 #9
0
 public TagGeneratorFactory(ActiveProfile profile, HtmlConventionLibrary library, IEnumerable <ITagRequestActivator> activators)
 {
     _profile    = profile;
     _library    = library;
     _activators = activators;
 }
예제 #10
0
 public TagGeneratorFactory(HtmlConventionLibrary library, IEnumerable <ITagRequestActivator> activators)
 {
     _library    = library;
     _activators = activators;
 }