public TestTagHelperComponentTagHelper(
     ITagHelperComponentManager manager,
     ILoggerFactory loggerFactory)
     : base(manager, loggerFactory)
 {
     ViewContext = CreateViewContext();
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="tagHelperComponentManager"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public RecaptchaV3TagHelper(IOptionsMonitor <RecaptchaSettings> settings, ITagHelperComponentManager tagHelperComponentManager)
        {
            _ = settings ?? throw new ArgumentNullException(nameof(settings));
            _ = tagHelperComponentManager ?? throw new ArgumentNullException(nameof(tagHelperComponentManager));

            _settings = settings.CurrentValue;
            _tagHelperComponentManager = tagHelperComponentManager;
        }
Beispiel #3
0
    /// <summary>
    /// Creates a new <see cref="TagHelperComponentTagHelper"/> and orders the
    /// the collection of <see cref="ITagHelperComponent"/>s in <see cref="ITagHelperComponentManager.Components"/>.
    /// </summary>
    /// <param name="manager">The <see cref="ITagHelperComponentManager"/> which contains the collection
    /// of <see cref="ITagHelperComponent"/>s.</param>
    /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
    /// <remarks>The <see cref="ITagHelperComponentManager.Components"/> are ordered after the
    /// creation of the <see cref="ITagHelperComponentManager"/> to position the <see cref="ITagHelperComponent"/>s
    /// added from controllers and views correctly.</remarks>
    public TagHelperComponentTagHelper(
        ITagHelperComponentManager manager,
        ILoggerFactory loggerFactory)
    {
        ArgumentNullException.ThrowIfNull(manager);
        ArgumentNullException.ThrowIfNull(loggerFactory);

        _components = manager.Components.OrderBy(p => p.Order).ToArray();
        _logger     = loggerFactory.CreateLogger(GetType());
    }
        /// <summary>
        ///
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="options"></param>
        /// <param name="tagHelperComponentManager"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public RecaptchaInvisibleTagHelper(IOptionsMonitor <RecaptchaSettings> settings, IOptionsMonitor <RecaptchaOptions> options,
                                           ITagHelperComponentManager tagHelperComponentManager)
        {
            _ = settings ?? throw new ArgumentNullException(nameof(settings));
            _ = options ?? throw new ArgumentNullException(nameof(options));
            _ = tagHelperComponentManager ?? throw new ArgumentNullException(nameof(tagHelperComponentManager));

            _settings = settings.CurrentValue;
            _options  = options.CurrentValue;
            _tagHelperComponentManager = tagHelperComponentManager;

            Badge = _options.Badge;
        }
Beispiel #5
0
        public DwListTagHelper(ITagHelperComponentManager tagHelperComponentManager)
        {
            _tagHelperComponentManager = tagHelperComponentManager;

            // This is an ICollection.
            // Create a helper that takes a collection of .css urls and a .js urls
            // and that adds TagHelperComponents for those urls
            // (one each for link tag and script tag)
            // making sure that if a TagHelperComponent is already in the ICollection
            // that it isn't added again.

            _tagHelperComponentManager.Components.Add(
                new DwListTagHelperComponent());
        }
Beispiel #6
0
    /// <summary>
    /// Creates a new <see cref="TagHelperComponentTagHelper"/> and orders the
    /// the collection of <see cref="ITagHelperComponent"/>s in <see cref="ITagHelperComponentManager.Components"/>.
    /// </summary>
    /// <param name="manager">The <see cref="ITagHelperComponentManager"/> which contains the collection
    /// of <see cref="ITagHelperComponent"/>s.</param>
    /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
    /// <remarks>The <see cref="ITagHelperComponentManager.Components"/> are ordered after the
    /// creation of the <see cref="ITagHelperComponentManager"/> to position the <see cref="ITagHelperComponent"/>s
    /// added from controllers and views correctly.</remarks>
    public TagHelperComponentTagHelper(
        ITagHelperComponentManager manager,
        ILoggerFactory loggerFactory)
    {
        if (manager == null)
        {
            throw new ArgumentNullException(nameof(manager));
        }

        if (loggerFactory == null)
        {
            throw new ArgumentNullException(nameof(loggerFactory));
        }

        _components = manager.Components.OrderBy(p => p.Order).ToArray();
        _logger     = loggerFactory.CreateLogger(GetType());
    }
Beispiel #7
0
 public AddTagHelperComponentController(ITagHelperComponentManager tagHelperComponentManager)
 {
     _tagHelperComponentManager = tagHelperComponentManager;
 }
 public TableFooterSelector(ITagHelperComponentManager mgr,
                            ILoggerFactory log) : base(mgr, log)
 {
 }
 public AddressTagHelperComponentTagHelper(
     ITagHelperComponentManager componentManager,
     ILoggerFactory loggerFactory) : base(componentManager, loggerFactory)
 {
 }
Beispiel #10
0
 public VersionTagHelperComponentTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory) :
     base(manager, loggerFactory)
 {
 }
Beispiel #11
0
 /// <summary>
 /// Creates a new <see cref="BodyTagHelper"/>.
 /// </summary>
 /// <param name="manager">The <see cref="ITagHelperComponentManager"/> which contains the collection
 /// of <see cref="ITagHelperComponent"/>s.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public BodyTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory)
     : base(manager, loggerFactory)
 {
 }
Beispiel #12
0
 public SecuredDivTagHelperComponentTagHelper(
     ITagHelperComponentManager componentManager,
     ILoggerFactory loggerFactory)
     : base(componentManager, loggerFactory)
 {
 }
 /// <summary>
 /// Tag helper for client side localized validation scripts.
 /// </summary>
 public LocalizationValidationScriptsTagHelperComponentTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory) : base(manager, loggerFactory)
 {
 }
Beispiel #14
0
 public FooterTagHelper(ITagHelperComponentManager tagHelperComponentManager, ILoggerFactory loggerFactory) : base(tagHelperComponentManager, loggerFactory)
 {
 }
Beispiel #15
0
 public IndexModel(ITagHelperComponentManager tagHelperComponentManager)
 {
     _tagHelperComponentManager = tagHelperComponentManager;
 }