// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNetCore.Blazor.Components { /// /// Configures options for binding subtypes of an HTML input element. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] public sealed class BindInputElementAttribute : Attribute { /// /// Constructs an instance of . /// /// The value of the element's type attribute. /// The suffix value. /// The name of the value attribute to be bound. /// The name of an attribute that will register an associated change event. public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute) { if (valueAttribute == null) { throw new ArgumentNullException(nameof(valueAttribute)); } if (changeAttribute == null) { throw new ArgumentNullException(nameof(changeAttribute)); } Type = type; Suffix = suffix; ValueAttribute = valueAttribute; ChangeAttribute = changeAttribute; } /// /// Gets the value of the element's type attribute. /// public string Type { get; } /// /// Gets the suffix value. /// public string Suffix { get; } /// /// Gets the name of the value attribute to be bound. /// public string ValueAttribute { get; } /// /// Gets the name of an attribute that will register an associated change event. /// public string ChangeAttribute { get; } } }