diff --git a/eng/GenAPI.exclusions.txt b/eng/GenAPI.exclusions.txt index 3053eb79e13e..3eab882f9d78 100644 --- a/eng/GenAPI.exclusions.txt +++ b/eng/GenAPI.exclusions.txt @@ -8,17 +8,5 @@ T:Microsoft.AspNetCore.Components.AuthorizeView T:Microsoft.AspNetCore.Components.AuthorizeViewCore T:Microsoft.AspNetCore.Components.CascadingAuthenticationState T:Microsoft.AspNetCore.Components.CascadingValue`1 -T:Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator -T:Microsoft.AspNetCore.Components.Forms.EditForm -T:Microsoft.AspNetCore.Components.Forms.InputBase`1 -T:Microsoft.AspNetCore.Components.Forms.InputCheckbox -T:Microsoft.AspNetCore.Components.Forms.InputDate`1 -T:Microsoft.AspNetCore.Components.Forms.InputNumber`1 -T:Microsoft.AspNetCore.Components.Forms.InputSelect`1 -T:Microsoft.AspNetCore.Components.Forms.InputText -T:Microsoft.AspNetCore.Components.Forms.InputTextArea -T:Microsoft.AspNetCore.Components.Forms.ValidationMessage`1 -T:Microsoft.AspNetCore.Components.Forms.ValidationSummary T:Microsoft.AspNetCore.Components.PageDisplay -T:Microsoft.AspNetCore.Components.Routing.NavLink T:Microsoft.AspNetCore.Components.Routing.Router \ No newline at end of file diff --git a/src/Components/Components.sln b/src/Components/Components.sln index 386152c3d822..2627baf699df 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -226,6 +226,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.HttpClient.Tests", "Blazor\Http\test\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj", "{E4C01A3F-D3C1-4639-A6A9-930E918843DD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Tests", "Web\test\Microsoft.AspNetCore.Components.Web.Tests.csproj", "{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1436,6 +1438,18 @@ Global {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x64.Build.0 = Release|Any CPU {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x86.ActiveCfg = Release|Any CPU {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x86.Build.0 = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|x64.Build.0 = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|x86.Build.0 = Debug|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|Any CPU.Build.0 = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x64.ActiveCfg = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x64.Build.0 = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.ActiveCfg = Release|Any CPU + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1543,6 +1557,7 @@ Global {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA} = {E9E9CF3C-CE9B-4282-B2BB-97EFC3872798} {74D21785-2FAB-4266-B7C4-E311EC8EE0DF} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {E4C01A3F-D3C1-4639-A6A9-930E918843DD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} + {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684} = {A27FF193-195B-4474-8E6C-840B2E339373} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs index a332e0b0e3bf..e063c8bd902e 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs @@ -118,162 +118,3 @@ public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } } } - -namespace Microsoft.AspNetCore.Components.Forms -{ - public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase - { - public DataAnnotationsValidator() { } - protected override void OnInitialized() { } - } - - public partial class EditForm : Microsoft.AspNetCore.Components.ComponentBase - { - public EditForm() { } - [Parameter(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.EventCallback OnInvalidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.EventCallback OnSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.EventCallback OnValidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override void OnParametersSet() { } - } - - public abstract partial class InputBase : Microsoft.AspNetCore.Components.ComponentBase - { - protected InputBase() { } - [Parameter(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected string CssClass { get { throw null; } } - protected T CurrentValue { get { throw null; } set { } } - protected string CurrentValueAsString { get { throw null; } set { } } - protected Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected string FieldClass { get { throw null; } } - protected Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.EventCallback ValueChanged { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public System.Linq.Expressions.Expression> ValueExpression { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected virtual string FormatValueAsString(T value) { throw null; } - public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } - protected abstract bool TryParseValueFromString(string value, out T result, out string validationErrorMessage); - } - - public partial class InputCheckbox : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputCheckbox() { } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) { throw null; } - } - - public partial class InputDate : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputDate() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override string FormatValueAsString(T value) { throw null; } - protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } - } - - public partial class InputNumber : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputNumber() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } - } - - public partial class InputSelect : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputSelect() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } - } - - public partial class InputText : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputText() { } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } - } - - public partial class InputTextArea : Microsoft.AspNetCore.Components.Forms.InputBase - { - public InputTextArea() { } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } - } - - public partial class ValidationMessage : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable - { - public ValidationMessage() { } - [Parameter(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public System.Linq.Expressions.Expression> For { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override void OnParametersSet() { } - void System.IDisposable.Dispose() { } - } - - public partial class ValidationSummary : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable - { - public ValidationSummary() { } - [Parameter(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } - protected override void OnParametersSet() { } - void System.IDisposable.Dispose() { } - } -} - -namespace Microsoft.AspNetCore.Components.Routing -{ - public partial class NavLink : Microsoft.AspNetCore.Components.IComponent, System.IDisposable - { - public NavLink() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string ActiveClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues = true)] - public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get; private set; } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public RenderFragment ChildContent { get; set; } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } - public void Dispose() { } - public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } - } - - public partial class Router : Microsoft.AspNetCore.Components.IComponent, System.IDisposable - { - public Router() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotFoundContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }} - public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } - public void Dispose() { } - protected virtual void Render(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder, System.Type handler, System.Collections.Generic.IDictionary parameters) { } - public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } - } -} diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index 432c5563e111..4cc6c32b68a8 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -16,17 +16,6 @@ public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler A public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } } - [Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")] - [Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange", false, null)] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", null, "value", "onchange", true, "yyyy-MM-dd")] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", null, "value", "onchange", true, null)] - [Microsoft.AspNetCore.Components.BindInputElementAttribute("text", null, "value", "onchange", false, null)] - [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, "value", "value", "onchange", false, null)] - [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, null, "value", "onchange", false, null)] - public static partial class BindAttributes - { - } public static partial class BindConverter { public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; } @@ -74,26 +63,6 @@ public static partial class BindConverter public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; } public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; } } - [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] - public sealed partial class BindElementAttribute : System.Attribute - { - public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) { } - public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] - public sealed partial class BindInputElementAttribute : System.Attribute - { - public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) { } - public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Format { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool IsInvariantCulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class CascadingParameterAttribute : System.Attribute { @@ -119,15 +88,6 @@ protected virtual void OnParametersSet() { } protected virtual bool ShouldRender() { throw null; } protected void StateHasChanged() { } } - public partial class DataTransfer - { - public DataTransfer() { } - public string DropEffect { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string EffectAllowed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string[] Files { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UIDataTransferItem[] Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string[] Types { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } public abstract partial class Dispatcher { protected Dispatcher() { } @@ -204,29 +164,9 @@ public static partial class EventCallbackFactoryBinderExtensions public static partial class EventCallbackFactoryUIEventArgsExtensions { public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } - public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventCallbackWorkItem @@ -245,107 +185,6 @@ public readonly partial struct EventCallback public bool HasDelegate { get { throw null; } } public System.Threading.Tasks.Task InvokeAsync(T arg) { throw null; } } - [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] - public sealed partial class EventHandlerAttribute : System.Attribute - { - public EventHandlerAttribute(string attributeName, System.Type eventArgsType) { } - public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onabort", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecopy", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecut", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforedeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforepaste", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onblur", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplaythrough", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onchange", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncontextmenu", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncopy", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncuechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncut", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondblclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrag", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragend", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragenter", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragleave", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragover", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragstart", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrop", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondurationchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onemptied", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onended", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onerror", typeof(Microsoft.AspNetCore.Components.UIErrorEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocus", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusin", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusout", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ongotpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninput", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninvalid", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeydown", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeypress", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeyup", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onload", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadeddata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadedmetadata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadend", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadstart", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onlostpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousedown", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousemove", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseout", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseover", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseup", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousewheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpaste", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpause", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplaying", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointercancel", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerdown", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerenter", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerleave", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointermove", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerout", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerover", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerup", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onprogress", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onratechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreadystatechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreset", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onscroll", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeked", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeking", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselect", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectionchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectstart", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstalled", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstop", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsubmit", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsuspend", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeout", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeupdate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchcancel", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchend", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchenter", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchleave", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchmove", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchstart", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onvolumechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwaiting", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] - [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] - public static partial class EventHandlers - { - } public partial interface IComponent { void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle); @@ -470,116 +309,11 @@ public partial class UIChangeEventArgs : Microsoft.AspNetCore.Components.UIEvent public UIChangeEventArgs() { } public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } - public partial class UIClipboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIClipboardEventArgs() { } - } - public partial class UIDataTransferItem - { - public UIDataTransferItem() { } - public string Kind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIDragEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIDragEventArgs() { } - public Microsoft.AspNetCore.Components.DataTransfer DataTransfer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIErrorEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIErrorEventArgs() { } - public int Colno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Filename { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int Lineno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } public partial class UIEventArgs { - public static readonly Microsoft.AspNetCore.Components.UIEventArgs Empty; public UIEventArgs() { } public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } - public partial class UIFocusEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIFocusEventArgs() { } - } - public partial class UIKeyboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIKeyboardEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Code { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool Repeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIMouseEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIMouseEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Button { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Buttons { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIPointerEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIPointerEventArgs() { } - public float Height { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool IsPrimary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long PointerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string PointerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Pressure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float TiltX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float TiltY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public float Width { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIProgressEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UIProgressEventArgs() { } - public bool LengthComputable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Loaded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Total { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UITouchEventArgs : Microsoft.AspNetCore.Components.UIEventArgs - { - public UITouchEventArgs() { } - public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] ChangedTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] TargetTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Components.UITouchPoint[] Touches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UITouchPoint - { - public UITouchPoint() { } - public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public long Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double PageX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double PageY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class UIWheelEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs - { - public UIWheelEventArgs() { } - public long DeltaMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } public abstract partial class UriHelperBase : Microsoft.AspNetCore.Components.IUriHelper { protected UriHelperBase() { } @@ -609,6 +343,11 @@ public static partial class RuntimeHelpers } namespace Microsoft.AspNetCore.Components.Forms { + public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase + { + public DataAnnotationsValidator() { } + protected override void OnInitialized() { } + } public sealed partial class EditContext { public EditContext(object model) { } @@ -636,11 +375,6 @@ public static partial class EditContextExpressionExtensions public static System.Collections.Generic.IEnumerable GetValidationMessages(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } public static bool IsModified(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } } - public static partial class EditContextFieldClassExtensions - { - public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } - } public sealed partial class FieldChangedEventArgs { internal FieldChangedEventArgs() { } @@ -782,10 +516,12 @@ public void AddMultipleAttributes(int sequence, System.Collections.Generic.IEnum public void Clear() { } public void CloseComponent() { } public void CloseElement() { } + public void CloseRegion() { } public Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetFrames() { throw null; } public void OpenComponent(int sequence, System.Type componentType) { } public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { } public void OpenElement(int sequence, string elementName) { } + public void OpenRegion(int sequence) { } public void SetKey(object value) { } public void SetUpdatesAttributeName(string updatesAttributeName) { } void System.IDisposable.Dispose() { } @@ -851,9 +587,4 @@ public readonly partial struct LocationChangedEventArgs public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public enum NavLinkMatch - { - Prefix = 0, - All = 1, - } } diff --git a/src/Components/Components/src/EventCallbackFactoryUIEventArgsExtensions.cs b/src/Components/Components/src/EventCallbackFactoryUIEventArgsExtensions.cs index 0e8151d56a19..bf19b94c6883 100644 --- a/src/Components/Components/src/EventCallbackFactoryUIEventArgsExtensions.cs +++ b/src/Components/Components/src/EventCallbackFactoryUIEventArgsExtensions.cs @@ -7,8 +7,7 @@ namespace Microsoft.AspNetCore.Components { /// - /// Provides extension methods for and types. For internal - /// framework use. + /// Provides extension methods for and types. /// public static class EventCallbackFactoryUIEventArgsExtensions { @@ -83,364 +82,5 @@ public static EventCallback Create(this EventCallbackFactory return factory.Create(receiver, callback); } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - if (factory == null) - { - throw new ArgumentNullException(nameof(factory)); - } - - return factory.Create(receiver, callback); - } } } diff --git a/src/Components/Components/src/Forms/DataAnnotationsValidator.cs b/src/Components/Components/src/Forms/DataAnnotationsValidator.cs index 4e76eac07c02..63696d2c797a 100644 --- a/src/Components/Components/src/Forms/DataAnnotationsValidator.cs +++ b/src/Components/Components/src/Forms/DataAnnotationsValidator.cs @@ -19,7 +19,7 @@ protected override void OnInitialized() { throw new InvalidOperationException($"{nameof(DataAnnotationsValidator)} requires a cascading " + $"parameter of type {nameof(EditContext)}. For example, you can use {nameof(DataAnnotationsValidator)} " + - $"inside an {nameof(EditForm)}."); + $"inside an EditForm."); } CurrentEditContext.AddDataAnnotationsValidation(); diff --git a/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs b/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs index 0eefa1f8ef23..67aa929098c3 100644 --- a/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs +++ b/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs @@ -619,17 +619,21 @@ public void AddComponentReferenceCapture(int sequence, Action componentR Append(RenderTreeFrame.ComponentReferenceCapture(sequence, componentReferenceCaptureAction, parentFrameIndexValue)); } - // Internal for tests - // Not public because there's no current use case for user code defining regions arbitrarily. - // Currently the sole use case for regions is when appending a RenderFragment. - internal void OpenRegion(int sequence) + /// + /// Appends a frame representing a region of frames. + /// + /// An integer that represents the position of the instruction in the source code. + public void OpenRegion(int sequence) { _openElementIndices.Push(_entries.Count); Append(RenderTreeFrame.Region(sequence)); } - // See above for why this is not public - internal void CloseRegion() + /// + /// Marks a previously appended region frame as closed. Calls to this method + /// must be balanced with calls to . + /// + public void CloseRegion() { var indexOfEntryBeingClosed = _openElementIndices.Pop(); ref var entry = ref _entries.Buffer[indexOfEntryBeingClosed]; diff --git a/src/Components/Components/src/UIChangeEventArgs.cs b/src/Components/Components/src/UIChangeEventArgs.cs new file mode 100644 index 000000000000..79402eb55e72 --- /dev/null +++ b/src/Components/Components/src/UIChangeEventArgs.cs @@ -0,0 +1,17 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about an input change event that is being raised. + /// + public class UIChangeEventArgs : UIEventArgs + { + /// + /// Gets or sets the new value of the input. This may be a + /// or a . + /// + public object Value { get; set; } + } +} diff --git a/src/Components/Components/src/UIEventArgs.cs b/src/Components/Components/src/UIEventArgs.cs index 3da5e6bc22c3..8be500d2ae73 100644 --- a/src/Components/Components/src/UIEventArgs.cs +++ b/src/Components/Components/src/UIEventArgs.cs @@ -8,450 +8,9 @@ namespace Microsoft.AspNetCore.Components /// public class UIEventArgs { - /// - /// An empty instance of . - /// - public static readonly UIEventArgs Empty = new UIEventArgs(); - /// /// Gets or sets the type of the event. /// public string Type { get; set; } } - - /// - /// Supplies information about an input change event that is being raised. - /// - public class UIChangeEventArgs : UIEventArgs - { - /// - /// Gets or sets the new value of the input. This may be a - /// or a . - /// - public object Value { get; set; } - } - - /// - /// Supplies information about an clipboard event that is being raised. - /// - public class UIClipboardEventArgs : UIEventArgs - { - } - - /// - /// Supplies information about an drag event that is being raised. - /// - public class UIDragEventArgs : UIMouseEventArgs - { - /// - /// The data that underlies a drag-and-drop operation, known as the drag data store. - /// See . - /// - public DataTransfer DataTransfer { get; set; } - } - - /// - /// The object is used to hold the data that is being dragged during a drag and drop operation. - /// It may hold one or more , each of one or more data types. - /// For more information about drag and drop, see HTML Drag and Drop API. - /// - public class DataTransfer - { - /// - /// Gets the type of drag-and-drop operation currently selected or sets the operation to a new type. - /// The value must be none, copy, link or move. - /// - public string DropEffect { get; set; } - - /// - /// Provides all of the types of operations that are possible. - /// Must be one of none, copy, copyLink, copyMove, link, linkMove, move, all or uninitialized. - /// - public string EffectAllowed { get; set; } - - /// - /// Contains a list of all the local files available on the data transfer. - /// If the drag operation doesn't involve dragging files, this property is an empty list. - /// - public string[] Files { get; set; } - - /// - /// Gives a array which is a list of all of the drag data. - /// - public UIDataTransferItem[] Items { get; set; } - - /// - /// An array of giving the formats that were set in the dragstart event. - /// - public string[] Types { get; set; } - } - - /// - /// The object represents one drag data item. - /// During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. - /// Each item in the list is a object. - /// - public class UIDataTransferItem - { - /// - /// The kind of drag data item, string or file - /// - public string Kind { get; set; } - - /// - /// The drag data item's type, typically a MIME type - /// - public string Type { get; set; } - } - - /// - /// Supplies information about an error event that is being raised. - /// - public class UIErrorEventArgs : UIEventArgs - { - /// - /// Gets a a human-readable error message describing the problem. - /// - public string Message { get; set; } - - /// - /// Gets the name of the script file in which the error occurred. - /// - public string Filename { get; set; } - - /// - /// Gets the line number of the script file on which the error occurred. - /// - public int Lineno { get; set; } - - /// - /// Gets the column number of the script file on which the error occurred. - /// - public int Colno { get; set; } - } - - /// - /// Supplies information about a focus event that is being raised. - /// - public class UIFocusEventArgs : UIEventArgs - { - // Not including support for 'relatedTarget' since we don't have a good way to represent it. - // see: https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent - } - - /// - /// Supplies information about a keyboard event that is being raised. - /// - public class UIKeyboardEventArgs : UIEventArgs - { - /// - /// The key value of the key represented by the event. - /// If the value has a printed representation, this attribute's value is the same as the char attribute. - /// Otherwise, it's one of the key value strings specified in 'Key values'. - /// If the key can't be identified, this is the string "Unidentified" - /// - public string Key { get; set; } - - /// - /// Holds a string that identifies the physical key being pressed. - /// The value is not affected by the current keyboard layout or modifier state, so a particular key will always return the same value. - /// - public string Code { get; set; } - - /// - /// The location of the key on the device. - /// - public float Location { get; set; } - - /// - /// true if a key has been depressed long enough to trigger key repetition, otherwise false. - /// - public bool Repeat { get; set; } - - /// - /// true if the control key was down when the event was fired. false otherwise. - /// - public bool CtrlKey { get; set; } - - /// - /// true if the shift key was down when the event was fired. false otherwise. - /// - public bool ShiftKey { get; set; } - - /// - /// true if the alt key was down when the event was fired. false otherwise. - /// - public bool AltKey { get; set; } - - /// - /// true if the meta key was down when the event was fired. false otherwise. - /// - public bool MetaKey { get; set; } - } - - /// - /// Supplies information about a mouse event that is being raised. - /// - public class UIMouseEventArgs : UIEventArgs - { - /// - /// A count of consecutive clicks that happened in a short amount of time, incremented by one. - /// - public long Detail { get; set; } - - /// - /// The X coordinate of the mouse pointer in global (screen) coordinates. - /// - public double ScreenX { get; set; } - - /// - /// The Y coordinate of the mouse pointer in global (screen) coordinates. - /// - public double ScreenY { get; set; } - - /// - /// The X coordinate of the mouse pointer in local (DOM content) coordinates. - /// - public double ClientX { get; set; } - - /// - /// The Y coordinate of the mouse pointer in local (DOM content) coordinates. - /// - public double ClientY { get; set; } - - /// - /// The button number that was pressed when the mouse event was fired: - /// Left button=0, - /// middle button=1 (if present), - /// right button=2. - /// For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. - /// - public long Button { get; set; } - - /// - /// The buttons being pressed when the mouse event was fired: - /// Left button=1, - /// Right button=2, - /// Middle (wheel) button=4, - /// 4th button (typically, "Browser Back" button)=8, - /// 5th button (typically, "Browser Forward" button)=16. - /// If two or more buttons are pressed, returns the logical sum of the values. - /// E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). - /// - public long Buttons { get; set; } - - /// - /// true if the control key was down when the event was fired. false otherwise. - /// - public bool CtrlKey { get; set; } - - /// - /// true if the shift key was down when the event was fired. false otherwise. - /// - public bool ShiftKey { get; set; } - - /// - /// true if the alt key was down when the event was fired. false otherwise. - /// - public bool AltKey { get; set; } - - /// - /// true if the meta key was down when the event was fired. false otherwise. - /// - public bool MetaKey { get; set; } - } - - /// - /// Supplies information about a mouse event that is being raised. - /// - public class UIPointerEventArgs : UIMouseEventArgs - { - /// - /// A unique identifier for the pointer causing the event. - /// - public long PointerId { get; set; } - - /// - /// The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer. - /// - public float Width { get; set; } - - /// - /// The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. - /// - public float Height { get; set; } - - /// - /// The normalized pressure of the pointer input in the range of 0 to 1, - /// where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively. - /// - public float Pressure { get; set; } - - /// - /// The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane - /// and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis. - /// - public float TiltX { get; set; } - - /// - /// The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane - /// and the plane containing both the transducer (e.g. pen stylus) axis and the X axis. - /// - public float TiltY { get; set; } - - /// - /// Indicates the device type that caused the event. - /// Must be one of the strings mouse, pen or touch, or an empty string. - /// - public string PointerType { get; set; } - - /// - /// Indicates if the pointer represents the primary pointer of this pointer type. - /// - public bool IsPrimary { get; set; } - } - - /// - /// Supplies information about a progress event that is being raised. - /// - public class UIProgressEventArgs : UIEventArgs - { - /// - /// Whether or not the total size of the transfer is known. - /// - public bool LengthComputable { get; set; } - - /// - /// The number of bytes transferred since the beginning of the operation. - /// This doesn't include headers and other overhead, but only the content itself. - /// - public long Loaded { get; set; } - - /// - /// The total number of bytes of content that will be transferred during the operation. - /// If the total size is unknown, this value is zero. - /// - public long Total { get; set; } - } - - /// - /// Supplies information about a touch event that is being raised. - /// - public class UITouchEventArgs : UIEventArgs - { - /// - /// A count of consecutive clicks that happened in a short amount of time, incremented by one. - /// - public long Detail { get; set; } - - /// - /// A list of for every point of contact currently touching the surface. - /// - public UITouchPoint[] Touches { get; set; } - - /// - /// A list of for every point of contact that is touching the surface and started on the element that is the target of the current event. - /// - public UITouchPoint[] TargetTouches { get; set; } - - /// - /// A list of Touches for every point of contact which contributed to the event. - /// For the touchstart event this must be a list of the touch points that just became active with the current event. - /// For the touchmove event this must be a list of the touch points that have moved since the last event. - /// For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface. - /// - public UITouchPoint[] ChangedTouches { get; set; } - - /// - /// true if the control key was down when the event was fired. false otherwise. - /// - public bool CtrlKey { get; set; } - - /// - /// true if the shift key was down when the event was fired. false otherwise. - /// - public bool ShiftKey { get; set; } - - /// - /// true if the alt key was down when the event was fired. false otherwise. - /// - public bool AltKey { get; set; } - - /// - /// true if the meta key was down when the event was fired. false otherwise. - /// - public bool MetaKey { get; set; } - } - - /// - /// Represents a single contact point on a touch-sensitive device. - /// The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. - /// - public class UITouchPoint - { - /// - /// A unique identifier for this Touch object. - /// A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface. - /// This lets you ensure that you're tracking the same touch all the time. - /// - public long Identifier { get; set; } - - /// - /// The X coordinate of the touch point relative to the left edge of the screen. - /// - public double ScreenX { get; set; } - - /// - /// The Y coordinate of the touch point relative to the top edge of the screen. - /// - public double ScreenY { get; set; } - - /// - /// The X coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll offset. - /// - public double ClientX { get; set; } - - /// - /// The Y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll offset. - /// - public double ClientY { get; set; } - - /// - /// The X coordinate of the touch point relative to the left edge of the document. - /// Unlike , this value includes the horizontal scroll offset, if any. - /// - public double PageX { get; set; } - - /// - /// The Y coordinate of the touch point relative to the top of the document. - /// Unlike , this value includes the vertical scroll offset, if any. - /// - public double PageY { get; set; } - } - - /// - /// Supplies information about a mouse wheel event that is being raised. - /// - public class UIWheelEventArgs : UIMouseEventArgs - { - /// - /// The horizontal scroll amount. - /// - public double DeltaX { get; set; } - - /// - /// The vertical scroll amount. - /// - public double DeltaY { get; set; } - - /// - /// The scroll amount for the z-axis. - /// - public double DeltaZ { get; set; } - - /// - /// The unit of the delta values scroll amount. - /// - public long DeltaMode { get; set; } - } } diff --git a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj index fc08c77c6eeb..e97f75fd2a93 100644 --- a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj +++ b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj @@ -8,7 +8,6 @@ - diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs index 5feb11127bb4..839b1a9858d5 100644 --- a/src/Components/Components/test/RendererTest.cs +++ b/src/Components/Components/test/RendererTest.cs @@ -491,7 +491,7 @@ public async Task CanDispatchTypedEventsToTopLevelComponents() { // Arrange: Render a component with an event handler var renderer = new TestRenderer(); - UIMouseEventArgs receivedArgs = null; + DerivedEventArgs receivedArgs = null; var component = new EventComponent { @@ -509,7 +509,7 @@ public async Task CanDispatchTypedEventsToTopLevelComponents() Assert.Null(receivedArgs); // Act/Assert: Event can be fired - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); var renderTask = renderer.DispatchEventAsync(eventHandlerId, eventArgs); Assert.True(renderTask.IsCompletedSuccessfully); Assert.Same(eventArgs, receivedArgs); @@ -540,7 +540,7 @@ public async Task CanDispatchActionEventsToTopLevelComponents() Assert.Null(receivedArgs); // Act/Assert: Event can be fired - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); var renderTask = renderer.DispatchEventAsync(eventHandlerId, eventArgs); Assert.True(renderTask.IsCompletedSuccessfully); Assert.NotNull(receivedArgs); @@ -638,7 +638,7 @@ public async Task CanAsyncDispatchTypedEventsToTopLevelComponents() { // Arrange: Render a component with an event handler var renderer = new TestRenderer(); - UIMouseEventArgs receivedArgs = null; + DerivedEventArgs receivedArgs = null; var state = 0; var tcs = new TaskCompletionSource(); @@ -665,7 +665,7 @@ public async Task CanAsyncDispatchTypedEventsToTopLevelComponents() Assert.Null(receivedArgs); // Act/Assert: Event can be fired - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); var task = renderer.DispatchEventAsync(eventHandlerId, eventArgs); Assert.Equal(1, state); Assert.Same(eventArgs, receivedArgs); @@ -708,7 +708,7 @@ public async Task CanAsyncDispatchActionEventsToTopLevelComponents() Assert.Null(receivedArgs); // Act/Assert: Event can be fired - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); var task = renderer.DispatchEventAsync(eventHandlerId, eventArgs); Assert.Equal(1, state); Assert.NotNull(receivedArgs); @@ -807,7 +807,7 @@ public async Task EventDispatching_DelegateParameter_MethodToDelegateConversion( .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -851,7 +851,7 @@ public async Task EventDispatching_DelegateParameter_NoTargetLambda() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -890,7 +890,7 @@ public async Task EventDispatching_EventCallback_MethodToDelegateConversion() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -931,7 +931,7 @@ public async Task EventDispatching_EventCallback_NoTargetLambda() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -973,7 +973,7 @@ public async Task EventDispatching_EventCallback_AsyncNoTargetLambda() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -992,7 +992,7 @@ public async Task EventDispatching_EventCallbackOfT_MethodToDelegateConversion() parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)parentComponent.SomeMethod)); + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)parentComponent.SomeMethod)); builder.CloseComponent(); }; parentComponent.OnEvent = () => @@ -1009,7 +1009,7 @@ public async Task EventDispatching_EventCallbackOfT_MethodToDelegateConversion() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -1030,7 +1030,7 @@ public async Task EventDispatching_EventCallbackOfT_NoTargetLambda() parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)(() => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)(() => { parentComponent.SomeMethod(); }))); @@ -1050,7 +1050,7 @@ public async Task EventDispatching_EventCallbackOfT_NoTargetLambda() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -1071,7 +1071,7 @@ public async Task EventDispatching_EventCallbackOfT_AsyncNoTargetLambda() parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Func)(() => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Func)(() => { parentComponent.SomeMethod(); return Task.CompletedTask; @@ -1092,7 +1092,7 @@ public async Task EventDispatching_EventCallbackOfT_AsyncNoTargetLambda() .AttributeEventHandlerId; // Act - var eventArgs = new UIMouseEventArgs(); + var eventArgs = new DerivedEventArgs(); await renderer.DispatchEventAsync(eventHandlerId, eventArgs); // Assert @@ -1125,7 +1125,7 @@ public async Task DispatchEventAsync_Delegate_SynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.RanToCompletion, task.Status); @@ -1157,7 +1157,7 @@ public async Task DispatchEventAsync_EventCallback_SynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.RanToCompletion, task.Status); @@ -1168,14 +1168,14 @@ public async Task DispatchEventAsync_EventCallback_SynchronousCompletion() public async Task DispatchEventAsync_EventCallbackOfT_SynchronousCompletion() { // Arrange - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => { arg = e; }))); @@ -1191,7 +1191,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_SynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -1224,7 +1224,7 @@ public async Task DispatchEventAsync_Delegate_SynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.Canceled, task.Status); @@ -1256,7 +1256,7 @@ public async Task DispatchEventAsync_EventCallback_SynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.Canceled, task.Status); @@ -1267,14 +1267,14 @@ public async Task DispatchEventAsync_EventCallback_SynchronousCancellation() public async Task DispatchEventAsync_EventCallbackOfT_SynchronousCancellation() { // Arrange - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => { arg = e; throw new OperationCanceledException(); @@ -1291,7 +1291,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_SynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -1324,7 +1324,7 @@ public async Task DispatchEventAsync_Delegate_SynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.Faulted, task.Status); @@ -1356,7 +1356,7 @@ public async Task DispatchEventAsync_EventCallback_SynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.Faulted, task.Status); @@ -1367,14 +1367,14 @@ public async Task DispatchEventAsync_EventCallback_SynchronousException() public async Task DispatchEventAsync_EventCallbackOfT_SynchronousException() { // Arrange - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action)((e) => { arg = e; throw new InvalidTimeZoneException(); @@ -1391,7 +1391,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_SynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -1426,7 +1426,7 @@ public async Task DispatchEventAsync_Delegate_AsynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1461,7 +1461,7 @@ public async Task DispatchEventAsync_EventCallback_AsynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1475,14 +1475,14 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousCompletion() // Arrange var tcs = new TaskCompletionSource(); - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => { arg = e; await tcs.Task; @@ -1499,7 +1499,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousCompletion() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -1536,7 +1536,7 @@ public async Task DispatchEventAsync_Delegate_AsynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1574,7 +1574,7 @@ public async Task DispatchEventAsync_EventCallback_AsynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1590,14 +1590,14 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousCancellation() // Arrange var tcs = new TaskCompletionSource(); - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => { arg = e; await tcs.Task; @@ -1615,7 +1615,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousCancellation() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -1654,7 +1654,7 @@ public async Task DispatchEventAsync_Delegate_AsynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1691,7 +1691,7 @@ public async Task DispatchEventAsync_EventCallback_AsynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.Equal(TaskStatus.WaitingForActivation, task.Status); @@ -1706,14 +1706,14 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousException() // Arrange var tcs = new TaskCompletionSource(); - UIMouseEventArgs arg = null; + DerivedEventArgs arg = null; var renderer = new TestRenderer(); var parentComponent = new OuterEventComponent(); parentComponent.RenderFragment = (builder) => { builder.OpenComponent(0); - builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => + builder.AddAttribute(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, async (e) => { arg = e; await tcs.Task; @@ -1731,7 +1731,7 @@ public async Task DispatchEventAsync_EventCallbackOfT_AsynchronousException() .AttributeEventHandlerId; // Act - var task = renderer.DispatchEventAsync(eventHandlerId, new UIMouseEventArgs()); + var task = renderer.DispatchEventAsync(eventHandlerId, new DerivedEventArgs()); // Assert Assert.NotNull(arg); @@ -3489,10 +3489,10 @@ private class EventComponent : AutoRenderComponent, IComponent, IHandleEvent public Func OnTestAsync { get; set; } [Parameter] - public Action OnClick { get; set; } + public Action OnClick { get; set; } [Parameter] - public Func OnClickAsync { get; set; } + public Func OnClickAsync { get; set; } [Parameter] public Action OnClickAction { get; set; } @@ -3504,7 +3504,7 @@ private class EventComponent : AutoRenderComponent, IComponent, IHandleEvent public EventCallback OnClickEventCallback { get; set; } [Parameter] - public EventCallback OnClickEventCallbackOfT { get; set; } + public EventCallback OnClickEventCallbackOfT { get; set; } public bool SkipElement { get; set; } private int renderCount = 0; @@ -4081,5 +4081,9 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) builder.CloseElement(); } } + + private class DerivedEventArgs : UIEventArgs + { + } } } diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 709df5439617..694b1b7f13e9 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -9,6 +9,8 @@ "Blazor\\Build\\src\\Microsoft.AspNetCore.Blazor.Build.csproj", "Blazor\\Build\\test\\Microsoft.AspNetCore.Blazor.Build.Tests.csproj", "Blazor\\DevServer\\src\\Microsoft.AspNetCore.Blazor.DevServer.csproj", + "Blazor\\Http\\src\\Microsoft.AspNetCore.Blazor.HttpClient.csproj", + "Blazor\\Http\\test\\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj", "Blazor\\Server\\src\\Microsoft.AspNetCore.Blazor.Server.csproj", "Blazor\\Templates\\src\\Microsoft.AspNetCore.Blazor.Templates.csproj", "Blazor\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj", @@ -18,6 +20,7 @@ "Blazor\\testassets\\MonoSanity\\MonoSanity.csproj", "Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj", "Web\\src\\Microsoft.AspNetCore.Components.Web.csproj", + "Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj", "Components\\perf\\Microsoft.AspNetCore.Components.Performance.csproj", "Components\\src\\Microsoft.AspNetCore.Components.csproj", "Components\\test\\Microsoft.AspNetCore.Components.Tests.csproj", diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs index 221a74b07212..10beee300035 100644 --- a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs +++ b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netstandard2.0.cs @@ -1,6 +1,415 @@ // 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. +namespace Microsoft.AspNetCore.Components +{ + [Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", null, "value", "onchange", true, "yyyy-MM-dd")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", null, "value", "onchange", true, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("text", null, "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, "value", "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, null, "value", "onchange", false, null)] + public static partial class BindAttributes + { + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class BindElementAttribute : System.Attribute + { + public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) { } + public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class BindInputElementAttribute : System.Attribute + { + public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) { } + public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Format { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool IsInvariantCulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class DataTransfer + { + public DataTransfer() { } + public string DropEffect { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EffectAllowed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Files { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UIDataTransferItem[] Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Types { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class EventHandlerAttribute : System.Attribute + { + public EventHandlerAttribute(string attributeName, System.Type eventArgsType) { } + public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onabort", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecopy", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecut", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforedeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforepaste", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onblur", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplaythrough", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onchange", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncontextmenu", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncopy", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncuechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncut", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondblclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondeactivate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrag", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragend", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragenter", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragleave", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragover", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragstart", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrop", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondurationchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onemptied", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onended", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onerror", typeof(Microsoft.AspNetCore.Components.UIErrorEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocus", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusin", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusout", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ongotpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninput", typeof(Microsoft.AspNetCore.Components.UIChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninvalid", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeydown", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeypress", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeyup", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onload", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadeddata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadedmetadata", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadend", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadstart", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onlostpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousedown", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousemove", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseout", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseover", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseup", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousewheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpaste", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpause", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplay", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplaying", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointercancel", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerdown", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerenter", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerleave", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockerror", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointermove", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerout", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerover", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerup", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onprogress", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onratechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreadystatechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreset", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onscroll", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeked", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeking", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselect", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectionchange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectstart", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstalled", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstop", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsubmit", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsuspend", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeout", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeupdate", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchcancel", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchend", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchenter", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchleave", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchmove", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchstart", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onvolumechange", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwaiting", typeof(Microsoft.AspNetCore.Components.UIEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] + public static partial class EventHandlers + { + } + public partial class UIClipboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIClipboardEventArgs() { } + } + public partial class UIDataTransferItem + { + public UIDataTransferItem() { } + public string Kind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIDragEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIDragEventArgs() { } + public Microsoft.AspNetCore.Components.DataTransfer DataTransfer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIErrorEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIErrorEventArgs() { } + public int Colno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Filename { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int Lineno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIFocusEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIFocusEventArgs() { } + } + public partial class UIKeyboardEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIKeyboardEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Code { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool Repeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIMouseEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIMouseEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Button { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Buttons { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIPointerEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIPointerEventArgs() { } + public float Height { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool IsPrimary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long PointerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string PointerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Pressure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Width { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIProgressEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UIProgressEventArgs() { } + public bool LengthComputable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Loaded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Total { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UITouchEventArgs : Microsoft.AspNetCore.Components.UIEventArgs + { + public UITouchEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] ChangedTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] TargetTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] Touches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UITouchPoint + { + public UITouchPoint() { } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIWheelEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIWheelEventArgs() { } + public long DeltaMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public static partial class WebEventCallbackFactoryUIEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + } +} +namespace Microsoft.AspNetCore.Components.Forms +{ + public static partial class EditContextFieldClassExtensions + { + public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public static string FieldClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } + } + public partial class EditForm : Microsoft.AspNetCore.Components.ComponentBase + { + public EditForm() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnInvalidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnValidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override void OnParametersSet() { } + } + public abstract partial class InputBase : Microsoft.AspNetCore.Components.ComponentBase + { + protected InputBase() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected string CssClass { get { throw null; } } + protected T CurrentValue { get { throw null; } set { } } + protected string CurrentValueAsString { get { throw null; } set { } } + protected Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected string FieldClass { get { throw null; } } + protected Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback ValueChanged { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> ValueExpression { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected virtual string FormatValueAsString(T value) { throw null; } + public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; } + protected abstract bool TryParseValueFromString(string value, out T result, out string validationErrorMessage); + } + public partial class InputCheckbox : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputCheckbox() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) { throw null; } + } + public partial class InputDate : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputDate() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(T value) { throw null; } + protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } + } + public partial class InputNumber : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputNumber() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(T value) { throw null; } + protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } + } + public partial class InputSelect : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputSelect() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage) { throw null; } + } + public partial class InputText : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputText() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class InputTextArea : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputTextArea() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class ValidationMessage : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationMessage() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> For { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } + public partial class ValidationSummary : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationSummary() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } +} +namespace Microsoft.AspNetCore.Components.Routing +{ + public partial class NavLink : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public NavLink() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ActiveClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected string CssClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { } + public void Dispose() { } + protected override void OnInitialized() { } + protected override void OnParametersSet() { } + } + public enum NavLinkMatch + { + Prefix = 0, + All = 1, + } +} namespace Microsoft.AspNetCore.Components.Web { public static partial class RendererRegistryEventDispatcher diff --git a/src/Components/Components/src/BindAttributes.cs b/src/Components/Web/src/BindAttributes.cs similarity index 98% rename from src/Components/Components/src/BindAttributes.cs rename to src/Components/Web/src/BindAttributes.cs index 79a6266c0b72..69b4720b0a7f 100644 --- a/src/Components/Components/src/BindAttributes.cs +++ b/src/Components/Web/src/BindAttributes.cs @@ -7,10 +7,10 @@ namespace Microsoft.AspNetCore.Components /// Infrastructure for the discovery of bind attributes for markup elements. /// /// - /// To extend the set of bind attributes, define a public class named + /// To extend the set of bind attributes, define a public class named /// BindAttributes and annotate it with the appropriate attributes. /// - + // Handles cases like - this is a fallback and will be ignored // when a specific type attribute is applied. [BindInputElement(null, null, "value", "onchange", isInvariantCulture: false, format: null)] diff --git a/src/Components/Components/src/BindElementAttribute.cs b/src/Components/Web/src/BindElementAttribute.cs similarity index 100% rename from src/Components/Components/src/BindElementAttribute.cs rename to src/Components/Web/src/BindElementAttribute.cs diff --git a/src/Components/Components/src/BindInputElementAttribute.cs b/src/Components/Web/src/BindInputElementAttribute.cs similarity index 100% rename from src/Components/Components/src/BindInputElementAttribute.cs rename to src/Components/Web/src/BindInputElementAttribute.cs diff --git a/src/Components/Web/src/DataTransfer.cs b/src/Components/Web/src/DataTransfer.cs new file mode 100644 index 000000000000..5cf8ee7dd829 --- /dev/null +++ b/src/Components/Web/src/DataTransfer.cs @@ -0,0 +1,41 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// The object is used to hold the data that is being dragged during a drag and drop operation. + /// It may hold one or more , each of one or more data types. + /// For more information about drag and drop, see HTML Drag and Drop API. + /// + public class DataTransfer + { + /// + /// Gets the type of drag-and-drop operation currently selected or sets the operation to a new type. + /// The value must be none, copy, link or move. + /// + public string DropEffect { get; set; } + + /// + /// Provides all of the types of operations that are possible. + /// Must be one of none, copy, copyLink, copyMove, link, linkMove, move, all or uninitialized. + /// + public string EffectAllowed { get; set; } + + /// + /// Contains a list of all the local files available on the data transfer. + /// If the drag operation doesn't involve dragging files, this property is an empty list. + /// + public string[] Files { get; set; } + + /// + /// Gives a array which is a list of all of the drag data. + /// + public UIDataTransferItem[] Items { get; set; } + + /// + /// An array of giving the formats that were set in the dragstart event. + /// + public string[] Types { get; set; } + } +} diff --git a/src/Components/Components/src/EventHandlerAttribute.cs b/src/Components/Web/src/EventHandlerAttribute.cs similarity index 100% rename from src/Components/Components/src/EventHandlerAttribute.cs rename to src/Components/Web/src/EventHandlerAttribute.cs diff --git a/src/Components/Components/src/EventHandlers.cs b/src/Components/Web/src/EventHandlers.cs similarity index 99% rename from src/Components/Components/src/EventHandlers.cs rename to src/Components/Web/src/EventHandlers.cs index de0d20a544b9..0023ac105480 100644 --- a/src/Components/Components/src/EventHandlers.cs +++ b/src/Components/Web/src/EventHandlers.cs @@ -60,7 +60,7 @@ namespace Microsoft.AspNetCore.Components [EventHandler("oncut", typeof(UIClipboardEventArgs))] [EventHandler("onpaste", typeof(UIClipboardEventArgs))] - // Touch events + // Touch events [EventHandler("ontouchcancel", typeof(UITouchEventArgs))] [EventHandler("ontouchend", typeof(UITouchEventArgs))] [EventHandler("ontouchmove", typeof(UITouchEventArgs))] diff --git a/src/Components/Components/src/Forms/EditContextFieldClassExtensions.cs b/src/Components/Web/src/Forms/EditContextFieldClassExtensions.cs similarity index 100% rename from src/Components/Components/src/Forms/EditContextFieldClassExtensions.cs rename to src/Components/Web/src/Forms/EditContextFieldClassExtensions.cs diff --git a/src/Components/Components/src/Forms/EditForm.cs b/src/Components/Web/src/Forms/EditForm.cs similarity index 100% rename from src/Components/Components/src/Forms/EditForm.cs rename to src/Components/Web/src/Forms/EditForm.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputBase.cs b/src/Components/Web/src/Forms/InputBase.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputBase.cs rename to src/Components/Web/src/Forms/InputBase.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputCheckbox.cs b/src/Components/Web/src/Forms/InputCheckbox.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputCheckbox.cs rename to src/Components/Web/src/Forms/InputCheckbox.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputDate.cs b/src/Components/Web/src/Forms/InputDate.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputDate.cs rename to src/Components/Web/src/Forms/InputDate.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputNumber.cs b/src/Components/Web/src/Forms/InputNumber.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputNumber.cs rename to src/Components/Web/src/Forms/InputNumber.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputSelect.cs b/src/Components/Web/src/Forms/InputSelect.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputSelect.cs rename to src/Components/Web/src/Forms/InputSelect.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputText.cs b/src/Components/Web/src/Forms/InputText.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputText.cs rename to src/Components/Web/src/Forms/InputText.cs diff --git a/src/Components/Components/src/Forms/InputComponents/InputTextArea.cs b/src/Components/Web/src/Forms/InputTextArea.cs similarity index 100% rename from src/Components/Components/src/Forms/InputComponents/InputTextArea.cs rename to src/Components/Web/src/Forms/InputTextArea.cs diff --git a/src/Components/Components/src/Forms/ValidationMessage.cs b/src/Components/Web/src/Forms/ValidationMessage.cs similarity index 100% rename from src/Components/Components/src/Forms/ValidationMessage.cs rename to src/Components/Web/src/Forms/ValidationMessage.cs diff --git a/src/Components/Components/src/Forms/ValidationSummary.cs b/src/Components/Web/src/Forms/ValidationSummary.cs similarity index 100% rename from src/Components/Components/src/Forms/ValidationSummary.cs rename to src/Components/Web/src/Forms/ValidationSummary.cs diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj index 7515d745defc..59c78672b1dc 100644 --- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj @@ -6,6 +6,7 @@ Support for rendering ASP.NET Core components for browsers. true true + Microsoft.AspNetCore.Components diff --git a/src/Components/Components/src/Routing/NavLink.cs b/src/Components/Web/src/Routing/NavLink.cs similarity index 100% rename from src/Components/Components/src/Routing/NavLink.cs rename to src/Components/Web/src/Routing/NavLink.cs diff --git a/src/Components/Components/src/Routing/NavLinkMatch.cs b/src/Components/Web/src/Routing/NavLinkMatch.cs similarity index 100% rename from src/Components/Components/src/Routing/NavLinkMatch.cs rename to src/Components/Web/src/Routing/NavLinkMatch.cs diff --git a/src/Components/Web/src/UIClipboardEventArgs.cs b/src/Components/Web/src/UIClipboardEventArgs.cs new file mode 100644 index 000000000000..f4ed05d3f704 --- /dev/null +++ b/src/Components/Web/src/UIClipboardEventArgs.cs @@ -0,0 +1,12 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about an clipboard event that is being raised. + /// + public class UIClipboardEventArgs : UIEventArgs + { + } +} diff --git a/src/Components/Web/src/UIDataTransferItem.cs b/src/Components/Web/src/UIDataTransferItem.cs new file mode 100644 index 000000000000..1adc32dcf7b2 --- /dev/null +++ b/src/Components/Web/src/UIDataTransferItem.cs @@ -0,0 +1,23 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// The object represents one drag data item. + /// During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. + /// Each item in the list is a object. + /// + public class UIDataTransferItem + { + /// + /// The kind of drag data item, string or file + /// + public string Kind { get; set; } + + /// + /// The drag data item's type, typically a MIME type + /// + public string Type { get; set; } + } +} diff --git a/src/Components/Web/src/UIDragEventArgs.cs b/src/Components/Web/src/UIDragEventArgs.cs new file mode 100644 index 000000000000..483b1827e380 --- /dev/null +++ b/src/Components/Web/src/UIDragEventArgs.cs @@ -0,0 +1,17 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about an drag event that is being raised. + /// + public class UIDragEventArgs : UIMouseEventArgs + { + /// + /// The data that underlies a drag-and-drop operation, known as the drag data store. + /// See . + /// + public DataTransfer DataTransfer { get; set; } + } +} diff --git a/src/Components/Web/src/UIErrorEventArgs.cs b/src/Components/Web/src/UIErrorEventArgs.cs new file mode 100644 index 000000000000..c7b0b31a4a07 --- /dev/null +++ b/src/Components/Web/src/UIErrorEventArgs.cs @@ -0,0 +1,31 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about an error event that is being raised. + /// + public class UIErrorEventArgs : UIEventArgs + { + /// + /// Gets a a human-readable error message describing the problem. + /// + public string Message { get; set; } + + /// + /// Gets the name of the script file in which the error occurred. + /// + public string Filename { get; set; } + + /// + /// Gets the line number of the script file on which the error occurred. + /// + public int Lineno { get; set; } + + /// + /// Gets the column number of the script file on which the error occurred. + /// + public int Colno { get; set; } + } +} diff --git a/src/Components/Web/src/UIFocusEventArgs.cs b/src/Components/Web/src/UIFocusEventArgs.cs new file mode 100644 index 000000000000..1260a9e0880f --- /dev/null +++ b/src/Components/Web/src/UIFocusEventArgs.cs @@ -0,0 +1,14 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a focus event that is being raised. + /// + public class UIFocusEventArgs : UIEventArgs + { + // Not including support for 'relatedTarget' since we don't have a good way to represent it. + // see: https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent + } +} diff --git a/src/Components/Web/src/UIKeyboardEventArgs.cs b/src/Components/Web/src/UIKeyboardEventArgs.cs new file mode 100644 index 000000000000..fdcb5fd462b3 --- /dev/null +++ b/src/Components/Web/src/UIKeyboardEventArgs.cs @@ -0,0 +1,55 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a keyboard event that is being raised. + /// + public class UIKeyboardEventArgs : UIEventArgs + { + /// + /// The key value of the key represented by the event. + /// If the value has a printed representation, this attribute's value is the same as the char attribute. + /// Otherwise, it's one of the key value strings specified in 'Key values'. + /// If the key can't be identified, this is the string "Unidentified" + /// + public string Key { get; set; } + + /// + /// Holds a string that identifies the physical key being pressed. + /// The value is not affected by the current keyboard layout or modifier state, so a particular key will always return the same value. + /// + public string Code { get; set; } + + /// + /// The location of the key on the device. + /// + public float Location { get; set; } + + /// + /// true if a key has been depressed long enough to trigger key repetition, otherwise false. + /// + public bool Repeat { get; set; } + + /// + /// true if the control key was down when the event was fired. false otherwise. + /// + public bool CtrlKey { get; set; } + + /// + /// true if the shift key was down when the event was fired. false otherwise. + /// + public bool ShiftKey { get; set; } + + /// + /// true if the alt key was down when the event was fired. false otherwise. + /// + public bool AltKey { get; set; } + + /// + /// true if the meta key was down when the event was fired. false otherwise. + /// + public bool MetaKey { get; set; } + } +} diff --git a/src/Components/Web/src/UIMouseEventArgs.cs b/src/Components/Web/src/UIMouseEventArgs.cs new file mode 100644 index 000000000000..fa5327e1fdcc --- /dev/null +++ b/src/Components/Web/src/UIMouseEventArgs.cs @@ -0,0 +1,77 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a mouse event that is being raised. + /// + public class UIMouseEventArgs : UIEventArgs + { + /// + /// A count of consecutive clicks that happened in a short amount of time, incremented by one. + /// + public long Detail { get; set; } + + /// + /// The X coordinate of the mouse pointer in global (screen) coordinates. + /// + public double ScreenX { get; set; } + + /// + /// The Y coordinate of the mouse pointer in global (screen) coordinates. + /// + public double ScreenY { get; set; } + + /// + /// The X coordinate of the mouse pointer in local (DOM content) coordinates. + /// + public double ClientX { get; set; } + + /// + /// The Y coordinate of the mouse pointer in local (DOM content) coordinates. + /// + public double ClientY { get; set; } + + /// + /// The button number that was pressed when the mouse event was fired: + /// Left button=0, + /// middle button=1 (if present), + /// right button=2. + /// For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. + /// + public long Button { get; set; } + + /// + /// The buttons being pressed when the mouse event was fired: + /// Left button=1, + /// Right button=2, + /// Middle (wheel) button=4, + /// 4th button (typically, "Browser Back" button)=8, + /// 5th button (typically, "Browser Forward" button)=16. + /// If two or more buttons are pressed, returns the logical sum of the values. + /// E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). + /// + public long Buttons { get; set; } + + /// + /// true if the control key was down when the event was fired. false otherwise. + /// + public bool CtrlKey { get; set; } + + /// + /// true if the shift key was down when the event was fired. false otherwise. + /// + public bool ShiftKey { get; set; } + + /// + /// true if the alt key was down when the event was fired. false otherwise. + /// + public bool AltKey { get; set; } + + /// + /// true if the meta key was down when the event was fired. false otherwise. + /// + public bool MetaKey { get; set; } + } +} diff --git a/src/Components/Web/src/UIPointerEventArgs.cs b/src/Components/Web/src/UIPointerEventArgs.cs new file mode 100644 index 000000000000..348cfbefd5e8 --- /dev/null +++ b/src/Components/Web/src/UIPointerEventArgs.cs @@ -0,0 +1,55 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a pointer event that is being raised. + /// + public class UIPointerEventArgs : UIMouseEventArgs + { + /// + /// A unique identifier for the pointer causing the event. + /// + public long PointerId { get; set; } + + /// + /// The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer. + /// + public float Width { get; set; } + + /// + /// The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. + /// + public float Height { get; set; } + + /// + /// The normalized pressure of the pointer input in the range of 0 to 1, + /// where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively. + /// + public float Pressure { get; set; } + + /// + /// The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane + /// and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis. + /// + public float TiltX { get; set; } + + /// + /// The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane + /// and the plane containing both the transducer (e.g. pen stylus) axis and the X axis. + /// + public float TiltY { get; set; } + + /// + /// Indicates the device type that caused the event. + /// Must be one of the strings mouse, pen or touch, or an empty string. + /// + public string PointerType { get; set; } + + /// + /// Indicates if the pointer represents the primary pointer of this pointer type. + /// + public bool IsPrimary { get; set; } + } +} diff --git a/src/Components/Web/src/UIProgressEventArgs.cs b/src/Components/Web/src/UIProgressEventArgs.cs new file mode 100644 index 000000000000..9d57a357c84e --- /dev/null +++ b/src/Components/Web/src/UIProgressEventArgs.cs @@ -0,0 +1,28 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a progress event that is being raised. + /// + public class UIProgressEventArgs : UIEventArgs + { + /// + /// Whether or not the total size of the transfer is known. + /// + public bool LengthComputable { get; set; } + + /// + /// The number of bytes transferred since the beginning of the operation. + /// This doesn't include headers and other overhead, but only the content itself. + /// + public long Loaded { get; set; } + + /// + /// The total number of bytes of content that will be transferred during the operation. + /// If the total size is unknown, this value is zero. + /// + public long Total { get; set; } + } +} diff --git a/src/Components/Web/src/UITouchEventArgs.cs b/src/Components/Web/src/UITouchEventArgs.cs new file mode 100644 index 000000000000..be5fe34da1d4 --- /dev/null +++ b/src/Components/Web/src/UITouchEventArgs.cs @@ -0,0 +1,54 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a touch event that is being raised. + /// + public class UITouchEventArgs : UIEventArgs + { + /// + /// A count of consecutive clicks that happened in a short amount of time, incremented by one. + /// + public long Detail { get; set; } + + /// + /// A list of for every point of contact currently touching the surface. + /// + public UITouchPoint[] Touches { get; set; } + + /// + /// A list of for every point of contact that is touching the surface and started on the element that is the target of the current event. + /// + public UITouchPoint[] TargetTouches { get; set; } + + /// + /// A list of Touches for every point of contact which contributed to the event. + /// For the touchstart event this must be a list of the touch points that just became active with the current event. + /// For the touchmove event this must be a list of the touch points that have moved since the last event. + /// For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface. + /// + public UITouchPoint[] ChangedTouches { get; set; } + + /// + /// true if the control key was down when the event was fired. false otherwise. + /// + public bool CtrlKey { get; set; } + + /// + /// true if the shift key was down when the event was fired. false otherwise. + /// + public bool ShiftKey { get; set; } + + /// + /// true if the alt key was down when the event was fired. false otherwise. + /// + public bool AltKey { get; set; } + + /// + /// true if the meta key was down when the event was fired. false otherwise. + /// + public bool MetaKey { get; set; } + } +} diff --git a/src/Components/Web/src/UITouchPoint.cs b/src/Components/Web/src/UITouchPoint.cs new file mode 100644 index 000000000000..9fe154f118f6 --- /dev/null +++ b/src/Components/Web/src/UITouchPoint.cs @@ -0,0 +1,51 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Represents a single contact point on a touch-sensitive device. + /// The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. + /// + public class UITouchPoint + { + /// + /// A unique identifier for this Touch object. + /// A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface. + /// This lets you ensure that you're tracking the same touch all the time. + /// + public long Identifier { get; set; } + + /// + /// The X coordinate of the touch point relative to the left edge of the screen. + /// + public double ScreenX { get; set; } + + /// + /// The Y coordinate of the touch point relative to the top edge of the screen. + /// + public double ScreenY { get; set; } + + /// + /// The X coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll offset. + /// + public double ClientX { get; set; } + + /// + /// The Y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll offset. + /// + public double ClientY { get; set; } + + /// + /// The X coordinate of the touch point relative to the left edge of the document. + /// Unlike , this value includes the horizontal scroll offset, if any. + /// + public double PageX { get; set; } + + /// + /// The Y coordinate of the touch point relative to the top of the document. + /// Unlike , this value includes the vertical scroll offset, if any. + /// + public double PageY { get; set; } + } +} diff --git a/src/Components/Web/src/UIWheelEventArgs.cs b/src/Components/Web/src/UIWheelEventArgs.cs new file mode 100644 index 000000000000..b73baa96f97b --- /dev/null +++ b/src/Components/Web/src/UIWheelEventArgs.cs @@ -0,0 +1,31 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Supplies information about a mouse wheel event that is being raised. + /// + public class UIWheelEventArgs : UIMouseEventArgs + { + /// + /// The horizontal scroll amount. + /// + public double DeltaX { get; set; } + + /// + /// The vertical scroll amount. + /// + public double DeltaY { get; set; } + + /// + /// The scroll amount for the z-axis. + /// + public double DeltaZ { get; set; } + + /// + /// The unit of the delta values scroll amount. + /// + public long DeltaMode { get; set; } + } +} diff --git a/src/Components/Web/src/WebEventCallbackFactoryUIEventArgsExtensions.cs b/src/Components/Web/src/WebEventCallbackFactoryUIEventArgsExtensions.cs new file mode 100644 index 000000000000..1966f20ddc1d --- /dev/null +++ b/src/Components/Web/src/WebEventCallbackFactoryUIEventArgsExtensions.cs @@ -0,0 +1,373 @@ +// 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; +using System.Threading.Tasks; + +namespace Microsoft.AspNetCore.Components +{ + /// + /// Provides extension methods for and types. + /// + public static class WebEventCallbackFactoryUIEventArgsExtensions + { + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + + /// + /// Creates an for the provided and + /// . + /// + /// The . + /// The event receiver. + /// The event callback. + /// The . + public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) + { + if (factory == null) + { + throw new ArgumentNullException(nameof(factory)); + } + + return factory.Create(receiver, callback); + } + } +} diff --git a/src/Components/Components/test/Forms/InputBaseTest.cs b/src/Components/Web/test/Forms/InputBaseTest.cs similarity index 100% rename from src/Components/Components/test/Forms/InputBaseTest.cs rename to src/Components/Web/test/Forms/InputBaseTest.cs diff --git a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj new file mode 100644 index 000000000000..ae732d3e10d2 --- /dev/null +++ b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.0 + Microsoft.AspNetCore.Components + + + + + + + + + + + + + + diff --git a/src/Components/test/testassets/ComponentsApp.App/ComponentsApp.App.csproj b/src/Components/test/testassets/ComponentsApp.App/ComponentsApp.App.csproj index c3457fe4ee42..3b1d34bbdc6e 100644 --- a/src/Components/test/testassets/ComponentsApp.App/ComponentsApp.App.csproj +++ b/src/Components/test/testassets/ComponentsApp.App/ComponentsApp.App.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -7,7 +7,8 @@ - + + diff --git a/src/Components/test/testassets/TestContentPackage/TestContentPackage.csproj b/src/Components/test/testassets/TestContentPackage/TestContentPackage.csproj index 934021baca07..90e7e7295242 100644 --- a/src/Components/test/testassets/TestContentPackage/TestContentPackage.csproj +++ b/src/Components/test/testassets/TestContentPackage/TestContentPackage.csproj @@ -9,6 +9,7 @@ +