public AlphaPagerTagHelper( IUrlHelper urlHelper, IHtmlGenerator generator) { Generator = generator; }
public PdfOutputController(IHtmlGenerator htmlGenerator, IPdfGenerator pdfGenerator, IStorageProvider storageProvider, IFilenameGenerator filenameGenerator) { this.htmlGenerator = htmlGenerator; this.pdfGenerator = pdfGenerator; this.storageProvider = storageProvider; this.filenameGenerator = filenameGenerator; }
public AdminFormAttribute(InputType inputType, string label, string options ="" ) { _htmlGenerator = new HtmlGenerator.HtmlGenerator(); InputType = inputType; Label = label; Options =(string.IsNullOrWhiteSpace(options))?null :options.Split(new []{','}).ToList(); }
public TopicMiddleware(Func<IDictionary<string, object>, Task> inner, DocProject project, IHtmlGenerator generator, DocSettings settings) { _inner = inner; _project = project; _generator = generator; _settings = settings; var stream = Assembly.GetExecutingAssembly() .GetManifestResourceStream(typeof(TopicMiddleware), "WebsocketsRefresh.txt"); _webSocketScript = stream.ReadAllText(); _topicJS = Assembly.GetExecutingAssembly().GetManifestResourceStream(typeof(Program),"topics.js").ReadAllText(); }
public TopicMiddleware(DocProject project, IHtmlGenerator generator, DocSettings settings) { _project = project; _generator = generator; _settings = settings; var topicAssembly = typeof(TopicMiddleware).GetAssembly(); var stream = topicAssembly.GetManifestResourceStream("dotnet-stdocs.Runner.WebsocketsRefresh.txt"); _webSocketScript = stream.ReadAllText(); _topicJS = topicAssembly.GetManifestResourceStream("dotnet-stdocs.topics.js").ReadAllText(); }
public static ViewContext GetViewContext( object model, IHtmlGenerator htmlGenerator, IModelMetadataProvider metadataProvider) { var actionContext = new ActionContext(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); var viewData = new ViewDataDictionary(metadataProvider) { Model = model, }; var viewContext = new ViewContext( actionContext, Mock.Of<IView>(), viewData, Mock.Of<ITempDataDictionary>(), TextWriter.Null); return viewContext; }
public NavLinkTagHelper(IHtmlGenerator generator) : base(generator) { }
/// <summary> /// Creates a new <see cref="AnchorTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public AnchorTagHelper(IHtmlGenerator generator) { Generator = generator; }
/// <summary> /// Creates a new <see cref="TextAreaTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public TextAreaTagHelper(IHtmlGenerator generator) { Generator = generator; }
private static InputTagHelper GetTagHelper( IHtmlGenerator htmlGenerator, object container, Type containerType, object model, string propertyName, string expressionName, IModelMetadataProvider metadataProvider = null) { if (metadataProvider == null) { metadataProvider = new TestModelMetadataProvider(); } var containerMetadata = metadataProvider.GetMetadataForType(containerType); var containerExplorer = metadataProvider.GetModelExplorerForType(containerType, container); var propertyMetadata = metadataProvider.GetMetadataForProperty(containerType, propertyName); var modelExplorer = containerExplorer.GetExplorerForExpression(propertyMetadata, model); var modelExpression = new ModelExpression(expressionName, modelExplorer); var viewContext = TestableHtmlGenerator.GetViewContext(container, htmlGenerator, metadataProvider); var inputTagHelper = new InputTagHelper(htmlGenerator) { For = modelExpression, ViewContext = viewContext, }; return inputTagHelper; }
/// <summary> /// Creates a new <see cref="FormTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public FormTagHelper(IHtmlGenerator generator) { Generator = generator; }
void IHtmlFormattingController.WriteSlideEnd(IHtmlGenerator generator, ISlide slide) { generator.AddHtml(SlideFooter); }
/// <summary> /// Creates a new <see cref="ValidationMessageTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public ValidationMessageTagHelper(IHtmlGenerator generator) { Generator = generator; }
public DateBoxHelper(IHtmlGenerator htmlGenerator, HtmlEncoder htmlEncoder) { this._htmlGenerator = htmlGenerator; this._htmlEncoder = htmlEncoder; }
public PaginationTagHelper(IHtmlGenerator generator) { this.Generator = generator; this.paginationTag = new TagBuilder("div"); this.paginationTag.AddCssClass("pagination"); }
public DropdownHelper(IHtmlGenerator generator) { _generator = generator; }
/// <summary> /// 创建新的验证标签 /// </summary> /// <param name="generator"></param> public ValidationSummaryTagHelper(IHtmlGenerator generator) { this.Generator = generator; }
/// <summary> /// Initializes a new instance of the <see cref="ButtonTagHelper"/> class. /// </summary> /// <param name="generator">The current html generator</param> public ButtonTagHelper(IHtmlGenerator generator) { Generator = generator; }
/// <summary> /// Ctor /// </summary> /// <param name="generator">HTML generator</param> /// <param name="htmlHelper">HTML helper</param> public AppActionConfirmationTagHelper(IHtmlGenerator generator, IHtmlHelper htmlHelper) { Generator = generator; _htmlHelper = htmlHelper; }
public RadioButtonsTag(IHtmlGenerator generator) : base(generator) { InputTypeName = "radio"; Inline = true; // set as default for radiobuttons... }
public NopLabelTagHelper(IHtmlGenerator generator, ILocalizationService localizationService, IWorkContext workContext) { Generator = generator; _localizationService = localizationService; _workContext = workContext; }
public LabelDescriptionTagHelper(IHtmlGenerator generator) { Generator = generator; }
void IHtmlFormattingController.WriteDocumentEnd(IHtmlGenerator generator, IPresentation presentation) {}
public InputTagHelper(IHtmlGenerator generator) : base(generator) { }
/// <summary> /// Ctor /// </summary> /// <param name="generator">HTML generator</param> public AgsLabelTagHelper(IHtmlGenerator generator) { Generator = generator; }
private static HtmlHelper <TModel> GetHtmlHelper <TModel>( ViewDataDictionary <TModel> viewData, IUrlHelper urlHelper, ICompositeViewEngine viewEngine, IModelMetadataProvider provider, Func <IHtmlHelper, IHtmlHelper> innerHelperWrapper, IHtmlGenerator htmlGenerator, string idAttributeDotReplacement) { var httpContext = new DefaultHttpContext(); var actionContext = new ActionContext(httpContext, new RouteData(), new ActionDescriptor()); var options = new MvcViewOptions(); if (!string.IsNullOrEmpty(idAttributeDotReplacement)) { options.HtmlHelperOptions.IdAttributeDotReplacement = idAttributeDotReplacement; } var localizationOptionsAccesor = new Mock <IOptions <MvcDataAnnotationsLocalizationOptions> >(); localizationOptionsAccesor.SetupGet(o => o.Value).Returns(new MvcDataAnnotationsLocalizationOptions()); options.ClientModelValidatorProviders.Add(new DataAnnotationsClientModelValidatorProvider( localizationOptionsAccesor.Object, stringLocalizerFactory: null)); var optionsAccessor = new Mock <IOptions <MvcViewOptions> >(); optionsAccessor .SetupGet(o => o.Value) .Returns(options); var serviceProvider = new Mock <IServiceProvider>(); serviceProvider .Setup(s => s.GetService(typeof(ICompositeViewEngine))) .Returns(viewEngine); serviceProvider .Setup(s => s.GetService(typeof(IUrlHelper))) .Returns(urlHelper); serviceProvider .Setup(s => s.GetService(typeof(IViewComponentHelper))) .Returns(new Mock <IViewComponentHelper>().Object); serviceProvider .Setup(s => s.GetService(typeof(IViewComponentHelper))) .Returns(new Mock <IViewComponentHelper>().Object); httpContext.RequestServices = serviceProvider.Object; if (htmlGenerator == null) { htmlGenerator = new DefaultHtmlGenerator( Mock.Of <IAntiforgery>(), optionsAccessor.Object, provider, urlHelper, new CommonTestEncoder()); } // TemplateRenderer will Contextualize this transient service. var innerHelper = (IHtmlHelper) new HtmlHelper( htmlGenerator, viewEngine, provider, new CommonTestEncoder(), new UrlEncoder(), new JavaScriptStringEncoder()); if (innerHelperWrapper != null) { innerHelper = innerHelperWrapper(innerHelper); } serviceProvider .Setup(s => s.GetService(typeof(IHtmlHelper))) .Returns(() => innerHelper); var htmlHelper = new HtmlHelper <TModel>( htmlGenerator, viewEngine, provider, new CommonTestEncoder(), new UrlEncoder(), new JavaScriptStringEncoder()); var viewContext = new ViewContext( actionContext, Mock.Of <IView>(), viewData, new TempDataDictionary( new HttpContextAccessor(), Mock.Of <ITempDataProvider>()), new StringWriter(), options.HtmlHelperOptions); htmlHelper.Contextualize(viewContext); return(htmlHelper); }
public Exporter(DocSettings settings, IHtmlGenerator generator) { _settings = settings; _generator = generator; }
public DynamicFormTagHelper(IHtmlGenerator htmlGenerator, HtmlEncoder encoder, IHtmlHelper htmlHelper) { _htmlGenerator = htmlGenerator; _encoder = encoder; _htmlHelper = htmlHelper; }
public TableTagHelper(IHtmlGenerator generator) { Generator = generator; }
public PropertySearchTagHelper(IHtmlGenerator generator) : base(generator, "div", TagMode.StartTagAndEndTag) { }
//Obtain an HTML genertor so we can use it to generate labels, validation public FormGroupWrapperTagHelper(IHtmlGenerator generator) { Generator = generator; }
public FormGroupTagHelper(IHtmlGenerator htmlGenerator) { _htmlGenerator = htmlGenerator; }
/// <summary> /// Ctor /// </summary> /// <param name="generator">HTML generator</param> public NopNestedSettingTagHelper(IHtmlGenerator generator) { Generator = generator; }
public InputPasswordTagHelper(IHtmlGenerator generator) { Generator = generator; }
public PagerTagHelper(IHtmlGenerator htmlGenerator) { this.HtmlGenerator = htmlGenerator; }
public LabelTagHelper(IHtmlGenerator generator) : base(generator) { }
public SampleTagHelper(IHtmlGenerator generator) : base(generator) { }
public OrderLinkTagHelper(IHtmlGenerator generator) : base(generator) { //utilizzato per sfruttare la capacità del tag anchor di generare link }
public SelectTagHelper(IHtmlGenerator generator) { Generator = generator; }
/// <summary> /// Creates a new <see cref="OptionTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public OptionTagHelper(IHtmlGenerator generator) { Generator = generator; }
void IHtmlFormattingController.WriteSlideStart(IHtmlGenerator generator, ISlide slide) { generator.AddHtml(string.Format(SlideHeader, generator.SlideIndex + 1)); }
public AntiForgeryTokenTagHelper(IHtmlGenerator generator) { Generator = generator; }
void IHtmlFormattingController.WriteShapeEnd(IHtmlGenerator generator, IShape shape) {}
/// <summary> /// コンストラクタ /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public VueInputTagHelper(IHtmlGenerator generator) { Generator = generator; }
public DropDownListTag(IHtmlGenerator generator) { _generator = generator; }
/// <summary> /// Creates a new <see cref="ValidationSummaryTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public ValidationSummaryTagHelper(IHtmlGenerator generator) { Generator = generator; }
public AbpInputTagHelperService(IHtmlGenerator generator, HtmlEncoder encoder, IAbpTagHelperLocalizer tagHelperLocalizer) { _generator = generator; _encoder = encoder; _tagHelperLocalizer = tagHelperLocalizer; }
private static InputTagHelper GetTagHelper( IHtmlGenerator htmlGenerator, object model, string propertyName, IModelMetadataProvider metadataProvider = null) { return GetTagHelper( htmlGenerator, container: new Model(), containerType: typeof(Model), model: model, propertyName: propertyName, expressionName: propertyName, metadataProvider: metadataProvider); }
/// <summary> /// Creates a new <see cref="LabelTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public LabelTagHelper(IHtmlGenerator generator) { Generator = generator; }
public FieldTagHelper(IHtmlGenerator generator) { Generator = generator; }
public EditorTagHelper(IHtmlGenerator generator) : base(generator) { }
/// <summary> /// Ctor /// </summary> /// <param name="generator">HTML generator</param> /// <param name="htmlHelper">HTML helper</param> public AgsDatePickerTagHelper(IHtmlGenerator generator, IHtmlHelper htmlHelper) { Generator = generator; _htmlHelper = htmlHelper; }
/// <summary> /// Creates a new <see cref="InputTagHelper"/>. /// </summary> /// <param name="generator">The <see cref="IHtmlGenerator"/>.</param> public InputTagHelper(IHtmlGenerator generator) { Generator = generator; }
public ImageTagHelper(IHtmlGenerator generator) { Generator = generator; }
public PagerTagHelper(IHtmlGenerator generator, IBuildPaginationLinks linkBuilder) { Generator = generator; this.linkBuilder = linkBuilder; }
public FlagsEnumInputTagHelper(IHtmlGenerator htmlGenerator) { HtmlGenerator = htmlGenerator; }
/// <summary> /// Ctor /// </summary> /// <param name="generator">HTML generator</param> /// <param name="htmlHelper">HTML helper</param> public QNetDeleteConfirmationTagHelper(IHtmlGenerator generator, IHtmlHelper htmlHelper) { Generator = generator; _htmlHelper = htmlHelper; }