diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
index 50f888c26a..c09fdf223f 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
@@ -3,6 +3,7 @@
netstandard2.0;$(DefaultNetCoreTargetFramework)
$(DefaultNetCoreTargetFramework)
+ annotations
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
index 17c4d7a4f5..3fd6df621a 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
@@ -5,69 +5,69 @@ namespace Microsoft.AspNetCore.Components
{
public static partial class BindConverter
{
- public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(short value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(short? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(float value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(string value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static object FormatValue(T value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static bool TryConvertToBool(object obj, System.Globalization.CultureInfo culture, out bool value) { throw null; }
- public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime value) { throw null; }
- public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime value) { throw null; }
- public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset value) { throw null; }
- public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset value) { throw null; }
- public static bool TryConvertToDecimal(object obj, System.Globalization.CultureInfo culture, out decimal value) { throw null; }
- public static bool TryConvertToDouble(object obj, System.Globalization.CultureInfo culture, out double value) { throw null; }
- public static bool TryConvertToFloat(object obj, System.Globalization.CultureInfo culture, out float value) { throw null; }
- public static bool TryConvertToInt(object obj, System.Globalization.CultureInfo culture, out int value) { throw null; }
- public static bool TryConvertToLong(object obj, System.Globalization.CultureInfo culture, out long value) { throw null; }
- public static bool TryConvertToNullableBool(object obj, System.Globalization.CultureInfo culture, out bool? value) { throw null; }
- public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime? value) { throw null; }
- public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime? value) { throw null; }
- public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset? value) { throw null; }
- public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset? value) { throw null; }
- public static bool TryConvertToNullableDecimal(object obj, System.Globalization.CultureInfo culture, out decimal? value) { throw null; }
- public static bool TryConvertToNullableDouble(object obj, System.Globalization.CultureInfo culture, out double? value) { throw null; }
- public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; }
- public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; }
- public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; }
- public static bool TryConvertToNullableShort(object obj, System.Globalization.CultureInfo culture, out short? value) { throw null; }
- public static bool TryConvertToShort(object obj, System.Globalization.CultureInfo culture, out short value) { throw null; }
- 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; }
+ public static bool FormatValue(bool value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(decimal value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(double value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(short value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(int value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(long value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static bool? FormatValue(bool? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTime? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTime? value, string? format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(decimal? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(double? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(short? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(int? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(long? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(float? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(float value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(string value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static object? FormatValue(T value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static bool TryConvertToBool(object? obj, System.Globalization.CultureInfo? culture, out bool value) { throw null; }
+ public static bool TryConvertToDateTime(object? obj, System.Globalization.CultureInfo? culture, out System.DateTime value) { throw null; }
+ public static bool TryConvertToDateTime(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTime value) { throw null; }
+ public static bool TryConvertToDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, out System.DateTimeOffset value) { throw null; }
+ public static bool TryConvertToDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTimeOffset value) { throw null; }
+ public static bool TryConvertToDecimal(object? obj, System.Globalization.CultureInfo? culture, out decimal value) { throw null; }
+ public static bool TryConvertToDouble(object? obj, System.Globalization.CultureInfo? culture, out double value) { throw null; }
+ public static bool TryConvertToFloat(object? obj, System.Globalization.CultureInfo? culture, out float value) { throw null; }
+ public static bool TryConvertToInt(object? obj, System.Globalization.CultureInfo? culture, out int value) { throw null; }
+ public static bool TryConvertToLong(object? obj, System.Globalization.CultureInfo? culture, out long value) { throw null; }
+ public static bool TryConvertToNullableBool(object? obj, System.Globalization.CultureInfo? culture, out bool? value) { throw null; }
+ public static bool TryConvertToNullableDateTime(object? obj, System.Globalization.CultureInfo? culture, out System.DateTime? value) { throw null; }
+ public static bool TryConvertToNullableDateTime(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTime? value) { throw null; }
+ public static bool TryConvertToNullableDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, out System.DateTimeOffset? value) { throw null; }
+ public static bool TryConvertToNullableDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTimeOffset? value) { throw null; }
+ public static bool TryConvertToNullableDecimal(object? obj, System.Globalization.CultureInfo? culture, out decimal? value) { throw null; }
+ public static bool TryConvertToNullableDouble(object? obj, System.Globalization.CultureInfo? culture, out double? value) { throw null; }
+ public static bool TryConvertToNullableFloat(object? obj, System.Globalization.CultureInfo? culture, out float? value) { throw null; }
+ public static bool TryConvertToNullableInt(object? obj, System.Globalization.CultureInfo? culture, out int? value) { throw null; }
+ public static bool TryConvertToNullableLong(object? obj, System.Globalization.CultureInfo? culture, out long? value) { throw null; }
+ public static bool TryConvertToNullableShort(object? obj, System.Globalization.CultureInfo? culture, out short? value) { throw null; }
+ public static bool TryConvertToShort(object? obj, System.Globalization.CultureInfo? culture, out short value) { throw null; }
+ 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 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? Suffix { [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
{
public CascadingParameterAttribute() { }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public string? Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent
{
@@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Components
[Microsoft.AspNetCore.Components.ParameterAttribute]
public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public string? Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
@@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Components
public partial class ChangeEventArgs : System.EventArgs
{
public ChangeEventArgs() { }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public object? Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent
{
@@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Components
protected System.Threading.Tasks.Task InvokeAsync(System.Func workItem) { throw null; }
void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
- System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; }
+ System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object? arg) { throw null; }
protected virtual void OnAfterRender(bool firstRender) { }
protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) { throw null; }
protected virtual void OnInitialized() { }
@@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.Components
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? @delegate) { throw null; }
public bool HasDelegate { get { throw null; } }
public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
@@ -162,30 +162,30 @@ namespace Microsoft.AspNetCore.Components
}
public static partial class EventCallbackFactoryBinderExtensions
{
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
}
public static partial class EventCallbackFactoryEventArgsExtensions
{
@@ -200,8 +200,8 @@ namespace Microsoft.AspNetCore.Components
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
- public EventCallbackWorkItem(System.MulticastDelegate @delegate) { throw null; }
- public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
+ public EventCallbackWorkItem(System.MulticastDelegate? @delegate) { throw null; }
+ public System.Threading.Tasks.Task InvokeAsync(object? arg) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct EventCallback
@@ -209,7 +209,7 @@ namespace Microsoft.AspNetCore.Components
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? @delegate) { throw null; }
public bool HasDelegate { get { throw null; } }
public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; }
}
@@ -234,7 +234,7 @@ namespace Microsoft.AspNetCore.Components
}
public partial interface IHandleEvent
{
- System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg);
+ System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object? arg);
}
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed partial class InjectAttribute : System.Attribute
@@ -251,7 +251,7 @@ namespace Microsoft.AspNetCore.Components
{
protected LayoutComponentBase() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment? Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent
{
@@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.Components
protected virtual void Dispose(bool disposing) { }
void System.IDisposable.Dispose() { }
}
- public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable
+ public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable where TService : notnull
{
protected OwningComponentBase() { }
protected TService Service { get { throw null; } }
@@ -332,11 +332,12 @@ namespace Microsoft.AspNetCore.Components
public static Microsoft.AspNetCore.Components.ParameterView Empty { get { throw null; } }
public static Microsoft.AspNetCore.Components.ParameterView FromDictionary(System.Collections.Generic.IDictionary parameters) { throw null; }
public Microsoft.AspNetCore.Components.ParameterView.Enumerator GetEnumerator() { throw null; }
+ [return: System.Diagnostics.CodeAnalysis.MaybeNullAttribute]
public TValue GetValueOrDefault(string parameterName) { throw null; }
public TValue GetValueOrDefault(string parameterName, TValue defaultValue) { throw null; }
public void SetParameterProperties(object target) { }
public System.Collections.Generic.IReadOnlyDictionary ToDictionary() { throw null; }
- public bool TryGetValue(string parameterName, out TValue result) { throw null; }
+ public bool TryGetValue(string parameterName, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue result) { throw null; }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct Enumerator
{
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 17c4d7a4f5..604a8f052b 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
@@ -5,69 +5,69 @@ namespace Microsoft.AspNetCore.Components
{
public static partial class BindConverter
{
- public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(short value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(short? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(float value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static string FormatValue(string value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static object FormatValue(T value, System.Globalization.CultureInfo culture = null) { throw null; }
- public static bool TryConvertToBool(object obj, System.Globalization.CultureInfo culture, out bool value) { throw null; }
- public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime value) { throw null; }
- public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime value) { throw null; }
- public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset value) { throw null; }
- public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset value) { throw null; }
- public static bool TryConvertToDecimal(object obj, System.Globalization.CultureInfo culture, out decimal value) { throw null; }
- public static bool TryConvertToDouble(object obj, System.Globalization.CultureInfo culture, out double value) { throw null; }
- public static bool TryConvertToFloat(object obj, System.Globalization.CultureInfo culture, out float value) { throw null; }
- public static bool TryConvertToInt(object obj, System.Globalization.CultureInfo culture, out int value) { throw null; }
- public static bool TryConvertToLong(object obj, System.Globalization.CultureInfo culture, out long value) { throw null; }
- public static bool TryConvertToNullableBool(object obj, System.Globalization.CultureInfo culture, out bool? value) { throw null; }
- public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime? value) { throw null; }
- public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime? value) { throw null; }
- public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset? value) { throw null; }
- public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset? value) { throw null; }
- public static bool TryConvertToNullableDecimal(object obj, System.Globalization.CultureInfo culture, out decimal? value) { throw null; }
- public static bool TryConvertToNullableDouble(object obj, System.Globalization.CultureInfo culture, out double? value) { throw null; }
- public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; }
- public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; }
- public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; }
- public static bool TryConvertToNullableShort(object obj, System.Globalization.CultureInfo culture, out short? value) { throw null; }
- public static bool TryConvertToShort(object obj, System.Globalization.CultureInfo culture, out short value) { throw null; }
- 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; }
+ public static bool FormatValue(bool value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(decimal value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(double value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(short value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(int value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(long value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static bool? FormatValue(bool? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTime? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(System.DateTime? value, string? format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(decimal? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(double? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(short? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(int? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(long? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string? FormatValue(float? value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(float value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static string FormatValue(string value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static object? FormatValue(T value, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static bool TryConvertToBool(object? obj, System.Globalization.CultureInfo? culture, out bool value) { throw null; }
+ public static bool TryConvertToDateTime(object? obj, System.Globalization.CultureInfo? culture, out System.DateTime value) { throw null; }
+ public static bool TryConvertToDateTime(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTime value) { throw null; }
+ public static bool TryConvertToDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, out System.DateTimeOffset value) { throw null; }
+ public static bool TryConvertToDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTimeOffset value) { throw null; }
+ public static bool TryConvertToDecimal(object? obj, System.Globalization.CultureInfo? culture, out decimal value) { throw null; }
+ public static bool TryConvertToDouble(object? obj, System.Globalization.CultureInfo? culture, out double value) { throw null; }
+ public static bool TryConvertToFloat(object? obj, System.Globalization.CultureInfo? culture, out float value) { throw null; }
+ public static bool TryConvertToInt(object? obj, System.Globalization.CultureInfo? culture, out int value) { throw null; }
+ public static bool TryConvertToLong(object? obj, System.Globalization.CultureInfo? culture, out long value) { throw null; }
+ public static bool TryConvertToNullableBool(object? obj, System.Globalization.CultureInfo? culture, out bool? value) { throw null; }
+ public static bool TryConvertToNullableDateTime(object? obj, System.Globalization.CultureInfo? culture, out System.DateTime? value) { throw null; }
+ public static bool TryConvertToNullableDateTime(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTime? value) { throw null; }
+ public static bool TryConvertToNullableDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, out System.DateTimeOffset? value) { throw null; }
+ public static bool TryConvertToNullableDateTimeOffset(object? obj, System.Globalization.CultureInfo? culture, string format, out System.DateTimeOffset? value) { throw null; }
+ public static bool TryConvertToNullableDecimal(object? obj, System.Globalization.CultureInfo? culture, out decimal? value) { throw null; }
+ public static bool TryConvertToNullableDouble(object? obj, System.Globalization.CultureInfo? culture, out double? value) { throw null; }
+ public static bool TryConvertToNullableFloat(object? obj, System.Globalization.CultureInfo? culture, out float? value) { throw null; }
+ public static bool TryConvertToNullableInt(object? obj, System.Globalization.CultureInfo? culture, out int? value) { throw null; }
+ public static bool TryConvertToNullableLong(object? obj, System.Globalization.CultureInfo? culture, out long? value) { throw null; }
+ public static bool TryConvertToNullableShort(object? obj, System.Globalization.CultureInfo? culture, out short? value) { throw null; }
+ public static bool TryConvertToShort(object? obj, System.Globalization.CultureInfo? culture, out short value) { throw null; }
+ 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 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? Suffix { [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
{
public CascadingParameterAttribute() { }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public string? Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent
{
@@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Components
[Microsoft.AspNetCore.Components.ParameterAttribute]
public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public string? Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
@@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Components
public partial class ChangeEventArgs : System.EventArgs
{
public ChangeEventArgs() { }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public object? Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent
{
@@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Components
protected System.Threading.Tasks.Task InvokeAsync(System.Func workItem) { throw null; }
void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
- System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; }
+ System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object? arg) { throw null; }
protected virtual void OnAfterRender(bool firstRender) { }
protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) { throw null; }
protected virtual void OnInitialized() { }
@@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.Components
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? @delegate) { throw null; }
public bool HasDelegate { get { throw null; } }
public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
@@ -162,30 +162,30 @@ namespace Microsoft.AspNetCore.Components
}
public static partial class EventCallbackFactoryBinderExtensions
{
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
- public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo? culture = null) { throw null; }
}
public static partial class EventCallbackFactoryEventArgsExtensions
{
@@ -200,8 +200,8 @@ namespace Microsoft.AspNetCore.Components
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
- public EventCallbackWorkItem(System.MulticastDelegate @delegate) { throw null; }
- public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
+ public EventCallbackWorkItem(System.MulticastDelegate? @delegate) { throw null; }
+ public System.Threading.Tasks.Task InvokeAsync(object? arg) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct EventCallback
@@ -209,7 +209,7 @@ namespace Microsoft.AspNetCore.Components
private readonly object _dummy;
private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? @delegate) { throw null; }
public bool HasDelegate { get { throw null; } }
public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; }
}
@@ -234,7 +234,7 @@ namespace Microsoft.AspNetCore.Components
}
public partial interface IHandleEvent
{
- System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg);
+ System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object? arg);
}
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed partial class InjectAttribute : System.Attribute
@@ -251,7 +251,7 @@ namespace Microsoft.AspNetCore.Components
{
protected LayoutComponentBase() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment? Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent
{
@@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.Components
protected virtual void Dispose(bool disposing) { }
void System.IDisposable.Dispose() { }
}
- public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable
+ public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable where TService : notnull
{
protected OwningComponentBase() { }
protected TService Service { get { throw null; } }
diff --git a/src/Components/Components/src/BindConverter.cs b/src/Components/Components/src/BindConverter.cs
index c8fcfcff7e..68170010dc 100644
--- a/src/Components/Components/src/BindConverter.cs
+++ b/src/Components/Components/src/BindConverter.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Concurrent;
using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
@@ -18,14 +19,14 @@ namespace Microsoft.AspNetCore.Components
// to allocate.
public static class BindConverter
{
- private static object BoxedTrue = true;
- private static object BoxedFalse = false;
+ private static readonly object BoxedTrue = true;
+ private static readonly object BoxedFalse = false;
- private delegate object BindFormatter(T value, CultureInfo culture);
- private delegate object BindFormatterWithFormat(T value, CultureInfo culture, string format);
+ private delegate object? BindFormatter(T value, CultureInfo? culture);
+ private delegate object BindFormatterWithFormat(T value, CultureInfo? culture, string format);
- internal delegate bool BindParser(object obj, CultureInfo culture, out T value);
- internal delegate bool BindParserWithFormat(object obj, CultureInfo culture, string format, out T value);
+ internal delegate bool BindParser(object? obj, CultureInfo? culture, out T value);
+ internal delegate bool BindParserWithFormat(object? obj, CultureInfo? culture, string? format, out T value);
///
/// Formats the provided as a .
@@ -35,9 +36,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(string value, CultureInfo culture = null) => FormatStringValueCore(value, culture);
+ public static string FormatValue(string value, CultureInfo? culture = null) => FormatStringValueCore(value, culture);
- private static string FormatStringValueCore(string value, CultureInfo culture)
+ private static string FormatStringValueCore(string value, CultureInfo? culture)
{
return value;
}
@@ -50,7 +51,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static bool FormatValue(bool value, CultureInfo culture = null)
+ public static bool FormatValue(bool value, CultureInfo? culture = null)
{
// Formatting for bool is special-cased. We need to produce a boolean value for conditional attributes
// to work.
@@ -58,7 +59,7 @@ namespace Microsoft.AspNetCore.Components
}
// Used with generics
- private static object FormatBoolValueCore(bool value, CultureInfo culture)
+ private static object FormatBoolValueCore(bool value, CultureInfo? culture)
{
// Formatting for bool is special-cased. We need to produce a boolean value for conditional attributes
// to work.
@@ -73,7 +74,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static bool? FormatValue(bool? value, CultureInfo culture = null)
+ public static bool? FormatValue(bool? value, CultureInfo? culture = null)
{
// Formatting for bool is special-cased. We need to produce a boolean value for conditional attributes
// to work.
@@ -81,7 +82,7 @@ namespace Microsoft.AspNetCore.Components
}
// Used with generics
- private static object FormatNullableBoolValueCore(bool? value, CultureInfo culture)
+ private static object? FormatNullableBoolValueCore(bool? value, CultureInfo? culture)
{
// Formatting for bool is special-cased. We need to produce a boolean value for conditional attributes
// to work.
@@ -96,9 +97,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(int value, CultureInfo culture = null) => FormatIntValueCore(value, culture);
+ public static string? FormatValue(int value, CultureInfo? culture = null) => FormatIntValueCore(value, culture);
- private static string FormatIntValueCore(int value, CultureInfo culture)
+ private static string? FormatIntValueCore(int value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -111,9 +112,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(int? value, CultureInfo culture = null) => FormatNullableIntValueCore(value, culture);
+ public static string? FormatValue(int? value, CultureInfo? culture = null) => FormatNullableIntValueCore(value, culture);
- private static string FormatNullableIntValueCore(int? value, CultureInfo culture)
+ private static string? FormatNullableIntValueCore(int? value, CultureInfo? culture)
{
if (value == null)
{
@@ -131,9 +132,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(long value, CultureInfo culture = null) => FormatLongValueCore(value, culture);
+ public static string FormatValue(long value, CultureInfo? culture = null) => FormatLongValueCore(value, culture);
- private static string FormatLongValueCore(long value, CultureInfo culture)
+ private static string FormatLongValueCore(long value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -146,9 +147,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(long? value, CultureInfo culture = null) => FormatNullableLongValueCore(value, culture);
+ public static string? FormatValue(long? value, CultureInfo? culture = null) => FormatNullableLongValueCore(value, culture);
- private static string FormatNullableLongValueCore(long? value, CultureInfo culture)
+ private static string? FormatNullableLongValueCore(long? value, CultureInfo? culture)
{
if (value == null)
{
@@ -166,9 +167,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(short value, CultureInfo culture = null) => FormatShortValueCore(value, culture);
+ public static string FormatValue(short value, CultureInfo? culture = null) => FormatShortValueCore(value, culture);
- private static string FormatShortValueCore(short value, CultureInfo culture)
+ private static string FormatShortValueCore(short value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -181,9 +182,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(short? value, CultureInfo culture = null) => FormatNullableShortValueCore(value, culture);
+ public static string? FormatValue(short? value, CultureInfo? culture = null) => FormatNullableShortValueCore(value, culture);
- private static string FormatNullableShortValueCore(short? value, CultureInfo culture)
+ private static string? FormatNullableShortValueCore(short? value, CultureInfo? culture)
{
if (value == null)
{
@@ -201,9 +202,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(float value, CultureInfo culture = null) => FormatFloatValueCore(value, culture);
+ public static string FormatValue(float value, CultureInfo? culture = null) => FormatFloatValueCore(value, culture);
- private static string FormatFloatValueCore(float value, CultureInfo culture)
+ private static string FormatFloatValueCore(float value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -216,9 +217,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(float? value, CultureInfo culture = null) => FormatNullableFloatValueCore(value, culture);
+ public static string? FormatValue(float? value, CultureInfo? culture = null) => FormatNullableFloatValueCore(value, culture);
- private static string FormatNullableFloatValueCore(float? value, CultureInfo culture)
+ private static string? FormatNullableFloatValueCore(float? value, CultureInfo? culture)
{
if (value == null)
{
@@ -236,9 +237,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(double value, CultureInfo culture = null) => FormatDoubleValueCore(value, culture);
+ public static string? FormatValue(double value, CultureInfo? culture = null) => FormatDoubleValueCore(value, culture);
- private static string FormatDoubleValueCore(double value, CultureInfo culture)
+ private static string FormatDoubleValueCore(double value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -251,9 +252,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(double? value, CultureInfo culture = null) => FormatNullableDoubleValueCore(value, culture);
+ public static string? FormatValue(double? value, CultureInfo? culture = null) => FormatNullableDoubleValueCore(value, culture);
- private static string FormatNullableDoubleValueCore(double? value, CultureInfo culture)
+ private static string? FormatNullableDoubleValueCore(double? value, CultureInfo? culture)
{
if (value == null)
{
@@ -271,9 +272,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(decimal value, CultureInfo culture = null) => FormatDecimalValueCore(value, culture);
+ public static string FormatValue(decimal value, CultureInfo? culture = null) => FormatDecimalValueCore(value, culture);
- private static string FormatDecimalValueCore(decimal value, CultureInfo culture)
+ private static string FormatDecimalValueCore(decimal value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -286,9 +287,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(decimal? value, CultureInfo culture = null) => FormatNullableDecimalValueCore(value, culture);
+ public static string? FormatValue(decimal? value, CultureInfo? culture = null) => FormatNullableDecimalValueCore(value, culture);
- private static string FormatNullableDecimalValueCore(decimal? value, CultureInfo culture)
+ private static string? FormatNullableDecimalValueCore(decimal? value, CultureInfo? culture)
{
if (value == null)
{
@@ -306,7 +307,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTime value, CultureInfo culture = null) => FormatDateTimeValueCore(value, format: null, culture);
+ public static string FormatValue(DateTime value, CultureInfo? culture = null) => FormatDateTimeValueCore(value, format: null, culture);
///
/// Formats the provided as a .
@@ -317,9 +318,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTime value, string format, CultureInfo culture = null) => FormatDateTimeValueCore(value, format, culture);
+ public static string FormatValue(DateTime value, string format, CultureInfo? culture = null) => FormatDateTimeValueCore(value, format, culture);
- private static string FormatDateTimeValueCore(DateTime value, string format, CultureInfo culture)
+ private static string FormatDateTimeValueCore(DateTime value, string? format, CultureInfo? culture)
{
if (format != null)
{
@@ -329,7 +330,7 @@ namespace Microsoft.AspNetCore.Components
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
- private static string FormatDateTimeValueCore(DateTime value, CultureInfo culture)
+ private static string FormatDateTimeValueCore(DateTime value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -342,7 +343,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTime? value, CultureInfo culture = null) => FormatNullableDateTimeValueCore(value, format: null, culture);
+ public static string? FormatValue(DateTime? value, CultureInfo? culture = null) => FormatNullableDateTimeValueCore(value, format: null, culture);
///
/// Formats the provided as a .
@@ -353,9 +354,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTime? value, string format, CultureInfo culture = null) => FormatNullableDateTimeValueCore(value, format, culture);
+ public static string? FormatValue(DateTime? value, string? format, CultureInfo? culture = null) => FormatNullableDateTimeValueCore(value, format, culture);
- private static string FormatNullableDateTimeValueCore(DateTime? value, string format, CultureInfo culture)
+ private static string? FormatNullableDateTimeValueCore(DateTime? value, string? format, CultureInfo? culture)
{
if (value == null)
{
@@ -370,7 +371,7 @@ namespace Microsoft.AspNetCore.Components
return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
}
- private static string FormatNullableDateTimeValueCore(DateTime? value, CultureInfo culture)
+ private static string? FormatNullableDateTimeValueCore(DateTime? value, CultureInfo? culture)
{
if (value == null)
{
@@ -388,7 +389,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTimeOffset value, CultureInfo culture = null) => FormatDateTimeOffsetValueCore(value, format: null, culture);
+ public static string FormatValue(DateTimeOffset value, CultureInfo? culture = null) => FormatDateTimeOffsetValueCore(value, format: null, culture);
///
@@ -400,9 +401,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTimeOffset value, string format, CultureInfo culture = null) => FormatDateTimeOffsetValueCore(value, format, culture);
+ public static string FormatValue(DateTimeOffset value, string format, CultureInfo? culture = null) => FormatDateTimeOffsetValueCore(value, format, culture);
- private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, string format, CultureInfo culture)
+ private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, string? format, CultureInfo? culture)
{
if (format != null)
{
@@ -412,7 +413,7 @@ namespace Microsoft.AspNetCore.Components
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
- private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, CultureInfo culture)
+ private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, CultureInfo? culture)
{
return value.ToString(culture ?? CultureInfo.CurrentCulture);
}
@@ -425,7 +426,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTimeOffset? value, CultureInfo culture = null) => FormatNullableDateTimeOffsetValueCore(value, format: null, culture);
+ public static string? FormatValue(DateTimeOffset? value, CultureInfo? culture = null) => FormatNullableDateTimeOffsetValueCore(value, format: null, culture);
///
/// Formats the provided as a .
@@ -436,9 +437,9 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static string FormatValue(DateTimeOffset? value, string format, CultureInfo culture = null) => FormatNullableDateTimeOffsetValueCore(value, format, culture);
+ public static string? FormatValue(DateTimeOffset? value, string format, CultureInfo? culture = null) => FormatNullableDateTimeOffsetValueCore(value, format, culture);
- private static string FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, string format, CultureInfo culture)
+ private static string? FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, string? format, CultureInfo? culture)
{
if (value == null)
{
@@ -453,7 +454,7 @@ namespace Microsoft.AspNetCore.Components
return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
}
- private static string FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, CultureInfo culture)
+ private static string? FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, CultureInfo? culture)
{
if (value == null)
{
@@ -463,12 +464,12 @@ namespace Microsoft.AspNetCore.Components
return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
}
- private static string FormatEnumValueCore(T value, CultureInfo culture) where T : struct, Enum
+ private static string FormatEnumValueCore(T value, CultureInfo? culture) where T : struct, Enum
{
return value.ToString(); // The overload that accepts a culture is [Obsolete]
}
- private static string FormatNullableEnumValueCore(T? value, CultureInfo culture) where T : struct, Enum
+ private static string? FormatNullableEnumValueCore(T? value, CultureInfo? culture) where T : struct, Enum
{
if (value == null)
{
@@ -486,7 +487,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use while formatting. Defaults to .
///
/// The formatted value.
- public static object FormatValue(T value, CultureInfo culture = null)
+ public static object? FormatValue(T value, CultureInfo? culture = null)
{
var formatter = FormatterDelegateCache.Get();
return formatter(value, culture);
@@ -499,17 +500,17 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToString(object obj, CultureInfo culture, out string value)
+ public static bool TryConvertToString(object? obj, CultureInfo? culture, out string? value)
{
return ConvertToStringCore(obj, culture, out value);
}
- internal readonly static BindParser ConvertToString = ConvertToStringCore;
+ internal readonly static BindParser ConvertToString = ConvertToStringCore;
- private static bool ConvertToStringCore(object obj, CultureInfo culture, out string value)
+ private static bool ConvertToStringCore(object? obj, CultureInfo? culture, out string? value)
{
// We expect the input to already be a string.
- value = (string)obj;
+ value = (string?)obj;
return true;
}
@@ -520,7 +521,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToBool(object obj, CultureInfo culture, out bool value)
+ public static bool TryConvertToBool(object? obj, CultureInfo? culture, out bool value)
{
return ConvertToBoolCore(obj, culture, out value);
}
@@ -532,7 +533,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToNullableBool(object obj, CultureInfo culture, out bool? value)
+ public static bool TryConvertToNullableBool(object? obj, CultureInfo? culture, out bool? value)
{
return ConvertToNullableBoolCore(obj, culture, out value);
}
@@ -540,14 +541,14 @@ namespace Microsoft.AspNetCore.Components
internal readonly static BindParser ConvertToBool = ConvertToBoolCore;
internal readonly static BindParser ConvertToNullableBool = ConvertToNullableBoolCore;
- private static bool ConvertToBoolCore(object obj, CultureInfo culture, out bool value)
+ private static bool ConvertToBoolCore(object? obj, CultureInfo? culture, out bool value)
{
// We expect the input to already be a bool.
- value = (bool)obj;
+ value = (bool)obj!;
return true;
}
- private static bool ConvertToNullableBoolCore(object obj, CultureInfo culture, out bool? value)
+ private static bool ConvertToNullableBoolCore(object? obj, CultureInfo? culture, out bool? value)
{
// We expect the input to already be a bool.
value = (bool?)obj;
@@ -561,7 +562,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToInt(object obj, CultureInfo culture, out int value)
+ public static bool TryConvertToInt(object? obj, CultureInfo? culture, out int value)
{
return ConvertToIntCore(obj, culture, out value);
}
@@ -573,7 +574,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToNullableInt(object obj, CultureInfo culture, out int? value)
+ public static bool TryConvertToNullableInt(object? obj, CultureInfo? culture, out int? value)
{
return ConvertToNullableIntCore(obj, culture, out value);
}
@@ -581,9 +582,9 @@ namespace Microsoft.AspNetCore.Components
internal static BindParser ConvertToInt = ConvertToIntCore;
internal static BindParser ConvertToNullableInt = ConvertToNullableIntCore;
- private static bool ConvertToIntCore(object obj, CultureInfo culture, out int value)
+ private static bool ConvertToIntCore(object? obj, CultureInfo? culture, out int value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -600,9 +601,9 @@ namespace Microsoft.AspNetCore.Components
return true;
}
- private static bool ConvertToNullableIntCore(object obj, CultureInfo culture, out int? value)
+ private static bool ConvertToNullableIntCore(object? obj, CultureInfo? culture, out int? value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -626,7 +627,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToLong(object obj, CultureInfo culture, out long value)
+ public static bool TryConvertToLong(object? obj, CultureInfo? culture, out long value)
{
return ConvertToLongCore(obj, culture, out value);
}
@@ -638,7 +639,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToNullableLong(object obj, CultureInfo culture, out long? value)
+ public static bool TryConvertToNullableLong(object? obj, CultureInfo? culture, out long? value)
{
return ConvertToNullableLongCore(obj, culture, out value);
}
@@ -646,9 +647,9 @@ namespace Microsoft.AspNetCore.Components
internal static BindParser ConvertToLong = ConvertToLongCore;
internal static BindParser ConvertToNullableLong = ConvertToNullableLongCore;
- private static bool ConvertToLongCore(object obj, CultureInfo culture, out long value)
+ private static bool ConvertToLongCore(object? obj, CultureInfo? culture, out long value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -665,9 +666,9 @@ namespace Microsoft.AspNetCore.Components
return true;
}
- private static bool ConvertToNullableLongCore(object obj, CultureInfo culture, out long? value)
+ private static bool ConvertToNullableLongCore(object? obj, CultureInfo? culture, out long? value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -691,7 +692,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToShort(object obj, CultureInfo culture, out short value)
+ public static bool TryConvertToShort(object? obj, CultureInfo? culture, out short value)
{
return ConvertToShortCore(obj, culture, out value);
}
@@ -703,7 +704,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
/// true if conversion is successful, otherwise false.
- public static bool TryConvertToNullableShort(object obj, CultureInfo culture, out short? value)
+ public static bool TryConvertToNullableShort(object? obj, CultureInfo? culture, out short? value)
{
return ConvertToNullableShort(obj, culture, out value);
}
@@ -711,9 +712,9 @@ namespace Microsoft.AspNetCore.Components
internal static BindParser ConvertToShort = ConvertToShortCore;
internal static BindParser ConvertToNullableShort = ConvertToNullableShortCore;
- private static bool ConvertToShortCore(object obj, CultureInfo culture, out short value)
+ private static bool ConvertToShortCore(object? obj, CultureInfo? culture, out short value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -730,9 +731,9 @@ namespace Microsoft.AspNetCore.Components
return true;
}
- private static bool ConvertToNullableShortCore(object obj, CultureInfo culture, out short? value)
+ private static bool ConvertToNullableShortCore(object? obj, CultureInfo? culture, out short? value)
{
- var text = (string)obj;
+ var text = (string?)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
@@ -756,7 +757,7 @@ namespace Microsoft.AspNetCore.Components
/// The to use for conversion.
/// The converted value.
///