Address nullability feedback

Fixes https://github.com/dotnet/aspnetcore/issues/25275
This commit is contained in:
Pranav K 2020-08-26 09:55:27 -07:00
parent 5297d5fd39
commit 00bbb78d3c
No known key found for this signature in database
GPG Key ID: F748807460A27E91
16 changed files with 49 additions and 49 deletions

View File

@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
return new CircuitId(Base64UrlTextEncoder.Encode(secret), Base64UrlTextEncoder.Encode(id)); return new CircuitId(Base64UrlTextEncoder.Encode(secret), Base64UrlTextEncoder.Encode(id));
} }
public bool TryParseCircuitId(string text, out CircuitId circuitId) public bool TryParseCircuitId(string? text, out CircuitId circuitId)
{ {
if (text is null) if (text is null)
{ {

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
/// <summary> /// <summary>
/// Notifies when a rendering exception occurred. /// Notifies when a rendering exception occurred.
/// </summary> /// </summary>
public event EventHandler<Exception> UnhandledException; public event EventHandler<Exception>? UnhandledException;
/// <summary> /// <summary>
/// Creates a new <see cref="RemoteRenderer"/>. /// Creates a new <see cref="RemoteRenderer"/>.
@ -171,7 +171,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
pendingRender = new UnacknowledgedRenderBatch( pendingRender = new UnacknowledgedRenderBatch(
renderId, renderId,
arrayBuilder, arrayBuilder,
new TaskCompletionSource<object>(), new TaskCompletionSource(),
ValueStopwatch.StartNew()); ValueStopwatch.StartNew());
// Buffer the rendered batches no matter what. We'll send it down immediately when the client // Buffer the rendered batches no matter what. We'll send it down immediately when the client
@ -234,7 +234,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// disposed. // disposed.
} }
public Task OnRenderCompletedAsync(long incomingBatchId, string errorMessageOrNull) public Task OnRenderCompletedAsync(long incomingBatchId, string? errorMessageOrNull)
{ {
if (_disposing) if (_disposing)
{ {
@ -308,7 +308,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
} }
} }
private void ProcessPendingBatch(string errorMessageOrNull, UnacknowledgedRenderBatch entry) private void ProcessPendingBatch(string? errorMessageOrNull, UnacknowledgedRenderBatch entry)
{ {
var elapsedTime = entry.ValueStopwatch.GetElapsedTime(); var elapsedTime = entry.ValueStopwatch.GetElapsedTime();
if (errorMessageOrNull == null) if (errorMessageOrNull == null)
@ -324,11 +324,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
CompleteRender(entry.CompletionSource, errorMessageOrNull); CompleteRender(entry.CompletionSource, errorMessageOrNull);
} }
private void CompleteRender(TaskCompletionSource<object> pendingRenderInfo, string errorMessageOrNull) private void CompleteRender(TaskCompletionSource pendingRenderInfo, string? errorMessageOrNull)
{ {
if (errorMessageOrNull == null) if (errorMessageOrNull == null)
{ {
pendingRenderInfo.TrySetResult(null); pendingRenderInfo.TrySetResult();
} }
else else
{ {
@ -338,7 +338,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
internal readonly struct UnacknowledgedRenderBatch internal readonly struct UnacknowledgedRenderBatch
{ {
public UnacknowledgedRenderBatch(long batchId, ArrayBuilder<byte> data, TaskCompletionSource<object> completionSource, ValueStopwatch valueStopwatch) public UnacknowledgedRenderBatch(long batchId, ArrayBuilder<byte> data, TaskCompletionSource completionSource, ValueStopwatch valueStopwatch)
{ {
BatchId = batchId; BatchId = batchId;
Data = data; Data = data;
@ -348,7 +348,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
public long BatchId { get; } public long BatchId { get; }
public ArrayBuilder<byte> Data { get; } public ArrayBuilder<byte> Data { get; }
public TaskCompletionSource<object> CompletionSource { get; } public TaskCompletionSource CompletionSource { get; }
public ValueStopwatch ValueStopwatch { get; } public ValueStopwatch ValueStopwatch { get; }
} }

View File

@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
{ {
/// <summary> /// <summary>
/// Implements a list that uses an array of objects to store the elements. /// Implements a list that uses an array of objects to store the elements.
/// ///
/// This differs from a <see cref="System.Collections.Generic.List{T}"/> in that /// This differs from a <see cref="System.Collections.Generic.List{T}"/> in that
/// it not only grows as required but also shrinks if cleared with significant /// it not only grows as required but also shrinks if cleared with significant
/// excess capacity. This makes it useful for component rendering, because /// excess capacity. This makes it useful for component rendering, because

View File

@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore
/// <param name="app">A delegate that handles requests to the application.</param> /// <param name="app">A delegate that handles requests to the application.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost Start(RequestDelegate app) => public static IWebHost Start(RequestDelegate app) =>
Start(url: null, app: app); Start(url: null!, app: app);
/// <summary> /// <summary>
/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. /// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults.
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore
/// <param name="url">The URL the hosted application will listen on.</param> /// <param name="url">The URL the hosted application will listen on.</param>
/// <param name="app">A delegate that handles requests to the application.</param> /// <param name="app">A delegate that handles requests to the application.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost Start(string? url, RequestDelegate app) public static IWebHost Start(string url, RequestDelegate app)
{ {
var startupAssemblyName = app.GetMethodInfo().DeclaringType!.GetTypeInfo().Assembly.GetName().Name; var startupAssemblyName = app.GetMethodInfo().DeclaringType!.GetTypeInfo().Assembly.GetName().Name;
return StartWith(url: url, configureServices: null, app: appBuilder => appBuilder.Run(app), applicationName: startupAssemblyName); return StartWith(url: url, configureServices: null, app: appBuilder => appBuilder.Run(app), applicationName: startupAssemblyName);
@ -53,7 +53,7 @@ namespace Microsoft.AspNetCore
/// <param name="routeBuilder">A delegate that configures the router for handling requests to the application.</param> /// <param name="routeBuilder">A delegate that configures the router for handling requests to the application.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost Start(Action<IRouteBuilder> routeBuilder) => public static IWebHost Start(Action<IRouteBuilder> routeBuilder) =>
Start(url: null, routeBuilder: routeBuilder); Start(url: null!, routeBuilder: routeBuilder);
/// <summary> /// <summary>
/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. /// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults.
@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore
/// <param name="url">The URL the hosted application will listen on.</param> /// <param name="url">The URL the hosted application will listen on.</param>
/// <param name="routeBuilder">A delegate that configures the router for handling requests to the application.</param> /// <param name="routeBuilder">A delegate that configures the router for handling requests to the application.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost Start(string? url, Action<IRouteBuilder> routeBuilder) public static IWebHost Start(string url, Action<IRouteBuilder> routeBuilder)
{ {
var startupAssemblyName = routeBuilder.GetMethodInfo().DeclaringType!.GetTypeInfo().Assembly.GetName().Name; var startupAssemblyName = routeBuilder.GetMethodInfo().DeclaringType!.GetTypeInfo().Assembly.GetName().Name;
return StartWith(url, services => services.AddRouting(), appBuilder => appBuilder.UseRouter(routeBuilder), applicationName: startupAssemblyName); return StartWith(url, services => services.AddRouting(), appBuilder => appBuilder.UseRouter(routeBuilder), applicationName: startupAssemblyName);
@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore
/// <param name="app">The delegate that configures the <see cref="IApplicationBuilder"/>.</param> /// <param name="app">The delegate that configures the <see cref="IApplicationBuilder"/>.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost StartWith(Action<IApplicationBuilder> app) => public static IWebHost StartWith(Action<IApplicationBuilder> app) =>
StartWith(url: null, app: app); StartWith(url: null!, app: app);
/// <summary> /// <summary>
/// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. /// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults.
@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore
/// <param name="url">The URL the hosted application will listen on.</param> /// <param name="url">The URL the hosted application will listen on.</param>
/// <param name="app">The delegate that configures the <see cref="IApplicationBuilder"/>.</param> /// <param name="app">The delegate that configures the <see cref="IApplicationBuilder"/>.</param>
/// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns>
public static IWebHost StartWith(string? url, Action<IApplicationBuilder> app) => public static IWebHost StartWith(string url, Action<IApplicationBuilder> app) =>
StartWith(url: url, configureServices: null, app: app, applicationName: null); StartWith(url: url, configureServices: null, app: app, applicationName: null);
private static IWebHost StartWith(string? url, Action<IServiceCollection>? configureServices, Action<IApplicationBuilder> app, string? applicationName) private static IWebHost StartWith(string? url, Action<IServiceCollection>? configureServices, Action<IApplicationBuilder> app, string? applicationName)
@ -132,7 +132,7 @@ namespace Microsoft.AspNetCore
/// </remarks> /// </remarks>
/// <returns>The initialized <see cref="IWebHostBuilder"/>.</returns> /// <returns>The initialized <see cref="IWebHostBuilder"/>.</returns>
public static IWebHostBuilder CreateDefaultBuilder() => public static IWebHostBuilder CreateDefaultBuilder() =>
CreateDefaultBuilder(args: null); CreateDefaultBuilder(args: null!);
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="WebHostBuilder"/> class with pre-configured defaults. /// Initializes a new instance of the <see cref="WebHostBuilder"/> class with pre-configured defaults.
@ -153,7 +153,7 @@ namespace Microsoft.AspNetCore
/// </remarks> /// </remarks>
/// <param name="args">The command line args.</param> /// <param name="args">The command line args.</param>
/// <returns>The initialized <see cref="IWebHostBuilder"/>.</returns> /// <returns>The initialized <see cref="IWebHostBuilder"/>.</returns>
public static IWebHostBuilder CreateDefaultBuilder(string[]? args) public static IWebHostBuilder CreateDefaultBuilder(string[] args)
{ {
var builder = new WebHostBuilder(); var builder = new WebHostBuilder();

View File

@ -16,6 +16,6 @@ namespace Microsoft.AspNetCore.Hosting.Server
/// <summary> /// <summary>
/// The name of the authentication scheme for the server authentication handler. /// The name of the authentication scheme for the server authentication handler.
/// </summary> /// </summary>
string? AuthenticationScheme { get; } string AuthenticationScheme { get; }
} }
} }

View File

@ -16,6 +16,6 @@ namespace Microsoft.AspNetCore.Hosting.Server
/// <summary> /// <summary>
/// The name of the authentication scheme for the server authentication handler. /// The name of the authentication scheme for the server authentication handler.
/// </summary> /// </summary>
public string? AuthenticationScheme { get; set; } public string AuthenticationScheme { get; set; } = default!;
} }
} }

View File

@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Authentication
/// </summary> /// </summary>
/// <param name="failure">The failure exception.</param> /// <param name="failure">The failure exception.</param>
/// <returns>The result.</returns> /// <returns>The result.</returns>
public static AuthenticateResult Fail(Exception? failure) public static AuthenticateResult Fail(Exception failure)
{ {
return new AuthenticateResult() { Failure = failure }; return new AuthenticateResult() { Failure = failure };
} }
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Authentication
/// <param name="failure">The failure exception.</param> /// <param name="failure">The failure exception.</param>
/// <param name="properties">Additional state values for the authentication session.</param> /// <param name="properties">Additional state values for the authentication session.</param>
/// <returns>The result.</returns> /// <returns>The result.</returns>
public static AuthenticateResult Fail(Exception? failure, AuthenticationProperties? properties) public static AuthenticateResult Fail(Exception failure, AuthenticationProperties? properties)
{ {
return new AuthenticateResult() { Failure = failure, Properties = properties }; return new AuthenticateResult() { Failure = failure, Properties = properties };
} }
@ -119,7 +119,7 @@ namespace Microsoft.AspNetCore.Authentication
/// </summary> /// </summary>
/// <param name="failureMessage">The failure message.</param> /// <param name="failureMessage">The failure message.</param>
/// <returns>The result.</returns> /// <returns>The result.</returns>
public static AuthenticateResult Fail(string? failureMessage) public static AuthenticateResult Fail(string failureMessage)
=> Fail(new Exception(failureMessage)); => Fail(new Exception(failureMessage));
/// <summary> /// <summary>
@ -128,7 +128,7 @@ namespace Microsoft.AspNetCore.Authentication
/// <param name="failureMessage">The failure message.</param> /// <param name="failureMessage">The failure message.</param>
/// <param name="properties">Additional state values for the authentication session.</param> /// <param name="properties">Additional state values for the authentication session.</param>
/// <returns>The result.</returns> /// <returns>The result.</returns>
public static AuthenticateResult Fail(string? failureMessage, AuthenticationProperties? properties) public static AuthenticateResult Fail(string failureMessage, AuthenticationProperties? properties)
=> Fail(new Exception(failureMessage), properties); => Fail(new Exception(failureMessage), properties);
} }
} }

View File

@ -12,11 +12,11 @@ namespace Microsoft.AspNetCore.Authentication
/// <summary> /// <summary>
/// Name. /// Name.
/// </summary> /// </summary>
public string? Name { get; set; } public string Name { get; set; } = default!;
/// <summary> /// <summary>
/// Value. /// Value.
/// </summary> /// </summary>
public string? Value { get; set; } public string Value { get; set; } = default!;
} }
} }

View File

@ -15,6 +15,6 @@ namespace Microsoft.JSInterop
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param> /// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
/// <param name="args">JSON-serializable arguments.</param> /// <param name="args">JSON-serializable arguments.</param>
/// <returns>An instance of <typeparamref name="T"/> obtained by JSON-deserializing the return value.</returns> /// <returns>An instance of <typeparamref name="T"/> obtained by JSON-deserializing the return value.</returns>
T Invoke<T>(string identifier, params object[] args); T Invoke<T>(string identifier, params object?[] args);
} }
} }

View File

@ -19,7 +19,7 @@ namespace Microsoft.JSInterop
/// <param name="args">JSON-serializable arguments.</param> /// <param name="args">JSON-serializable arguments.</param>
/// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns> /// <returns>An instance of <typeparamref name="TValue"/> obtained by JSON-deserializing the return value.</returns>
[return: MaybeNull] [return: MaybeNull]
public TValue Invoke<TValue>(string identifier, params object[] args) public TValue Invoke<TValue>(string identifier, params object?[] args)
{ {
var resultJson = InvokeJS(identifier, JsonSerializer.Serialize(args, JsonSerializerOptions)); var resultJson = InvokeJS(identifier, JsonSerializer.Serialize(args, JsonSerializerOptions));
if (resultJson is null) if (resultJson is null)

View File

@ -16,7 +16,7 @@ namespace Microsoft.JSInterop
/// <param name="jsRuntime">The <see cref="IJSInProcessRuntime"/>.</param> /// <param name="jsRuntime">The <see cref="IJSInProcessRuntime"/>.</param>
/// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param> /// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>window.someScope.someFunction</c>.</param>
/// <param name="args">JSON-serializable arguments.</param> /// <param name="args">JSON-serializable arguments.</param>
public static void InvokeVoid(this IJSInProcessRuntime jsRuntime, string identifier, params object[] args) public static void InvokeVoid(this IJSInProcessRuntime jsRuntime, string identifier, params object?[] args)
{ {
if (jsRuntime == null) if (jsRuntime == null)
{ {

View File

@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Mvc
/// your deployment environment. /// your deployment environment.
/// </para> /// </para>
/// </remarks> /// </remarks>
string Action(UrlActionContext actionContext); string? Action(UrlActionContext actionContext);
/// <summary> /// <summary>
/// Converts a virtual (relative, starting with ~/) path to an application absolute path. /// Converts a virtual (relative, starting with ~/) path to an application absolute path.
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Mvc
/// </remarks> /// </remarks>
/// <param name="contentPath">The virtual path of the content.</param> /// <param name="contentPath">The virtual path of the content.</param>
/// <returns>The application absolute path.</returns> /// <returns>The application absolute path.</returns>
string Content(string contentPath); string? Content(string? contentPath);
/// <summary> /// <summary>
/// Returns a value that indicates whether the URL is local. A URL is considered local if it does not have a /// Returns a value that indicates whether the URL is local. A URL is considered local if it does not have a
@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Mvc
/// </code> /// </code>
/// </para> /// </para>
/// </example> /// </example>
bool IsLocalUrl(string url); bool IsLocalUrl(string? url);
/// <summary> /// <summary>
/// Generates a URL with an absolute path, which contains the route name, route values, protocol to use, host /// Generates a URL with an absolute path, which contains the route name, route values, protocol to use, host
@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Mvc
/// your deployment environment. /// your deployment environment.
/// </para> /// </para>
/// </remarks> /// </remarks>
string RouteUrl(UrlRouteContext routeContext); string? RouteUrl(UrlRouteContext routeContext);
/// <summary> /// <summary>
/// Generates an absolute URL for the specified <paramref name="routeName"/> and route /// Generates an absolute URL for the specified <paramref name="routeName"/> and route
@ -99,11 +99,11 @@ namespace Microsoft.AspNetCore.Mvc
/// <remarks> /// <remarks>
/// <para> /// <para>
/// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI. /// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI.
/// Relying on the value of the current request can allow untrusted input to influence the resulting URI unless /// Relying on the value of the current request can allow untrusted input to influence the resulting URI unless
/// the <c>Host</c> header has been validated. See the deployment documentation for instructions on how to properly /// the <c>Host</c> header has been validated. See the deployment documentation for instructions on how to properly
/// validate the <c>Host</c> header in your deployment environment. /// validate the <c>Host</c> header in your deployment environment.
/// </para> /// </para>
/// </remarks> /// </remarks>
string Link(string routeName, object values); string? Link(string? routeName, object? values);
} }
} }

View File

@ -14,6 +14,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
/// <param name="context">The <see cref="ModelBinderProviderContext"/>.</param> /// <param name="context">The <see cref="ModelBinderProviderContext"/>.</param>
/// <returns>An <see cref="IModelBinder"/>.</returns> /// <returns>An <see cref="IModelBinder"/>.</returns>
IModelBinder GetBinder(ModelBinderProviderContext context); IModelBinder? GetBinder(ModelBinderProviderContext context);
} }
} }

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
/// <param name="model">The model value. May be <c>null.</c></param> /// <param name="model">The model value. May be <c>null.</c></param>
/// <returns>A <see cref="ModelBindingResult"/> representing a successful model bind.</returns> /// <returns>A <see cref="ModelBindingResult"/> representing a successful model bind.</returns>
public static ModelBindingResult Success(object model) public static ModelBindingResult Success(object? model)
{ {
return new ModelBindingResult(model, isModelSet: true); return new ModelBindingResult(model, isModelSet: true);
} }

View File

@ -290,12 +290,12 @@ Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext.OutputFormatterW
Microsoft.AspNetCore.Mvc.IActionResult Microsoft.AspNetCore.Mvc.IActionResult
Microsoft.AspNetCore.Mvc.IActionResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Mvc.IActionResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task!
Microsoft.AspNetCore.Mvc.IUrlHelper Microsoft.AspNetCore.Mvc.IUrlHelper
Microsoft.AspNetCore.Mvc.IUrlHelper.Action(Microsoft.AspNetCore.Mvc.Routing.UrlActionContext! actionContext) -> string! Microsoft.AspNetCore.Mvc.IUrlHelper.Action(Microsoft.AspNetCore.Mvc.Routing.UrlActionContext! actionContext) -> string?
Microsoft.AspNetCore.Mvc.IUrlHelper.ActionContext.get -> Microsoft.AspNetCore.Mvc.ActionContext! Microsoft.AspNetCore.Mvc.IUrlHelper.ActionContext.get -> Microsoft.AspNetCore.Mvc.ActionContext!
Microsoft.AspNetCore.Mvc.IUrlHelper.Content(string! contentPath) -> string! Microsoft.AspNetCore.Mvc.IUrlHelper.Content(string? contentPath) -> string?
Microsoft.AspNetCore.Mvc.IUrlHelper.IsLocalUrl(string! url) -> bool Microsoft.AspNetCore.Mvc.IUrlHelper.IsLocalUrl(string? url) -> bool
Microsoft.AspNetCore.Mvc.IUrlHelper.Link(string! routeName, object! values) -> string! Microsoft.AspNetCore.Mvc.IUrlHelper.Link(string? routeName, object? values) -> string?
Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext! routeContext) -> string! Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext! routeContext) -> string?
Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo
Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo.BinderModelName.get -> string? Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo.BinderModelName.get -> string?
Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo.BinderModelName.set -> void Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo.BinderModelName.set -> void
@ -337,7 +337,7 @@ Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata.BindingSource.get -
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder.BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext! bindingContext) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder.BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext! bindingContext) -> System.Threading.Tasks.Task!
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider.GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext! context) -> Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder! Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider.GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext! context) -> Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder?
Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider
Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider.GetMetadataForProperties(System.Type! modelType) -> System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata!>! Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider.GetMetadataForProperties(System.Type! modelType) -> System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata!>!
Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider.GetMetadataForType(System.Type! modelType) -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata! Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider.GetMetadataForType(System.Type! modelType) -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata!
@ -742,7 +742,7 @@ static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.ForP
static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.ForProperty(System.Type! modelType, string! name, System.Type! containerType) -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.ForProperty(System.Type! modelType, string! name, System.Type! containerType) -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.ForType(System.Type! modelType) -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.ForType(System.Type! modelType) -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.Failed() -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.Failed() -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult
static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.Success(object! model) -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.Success(object? model) -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult
static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) -> bool static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) -> bool
static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) -> bool static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult.operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) -> bool
static Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.StartsWithPrefix(string! prefix, string! key) -> bool static Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.StartsWithPrefix(string! prefix, string! key) -> bool

View File

@ -15,15 +15,15 @@ namespace Microsoft.Extensions.DependencyInjection
=> builder.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme); => builder.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme);
public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme) public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme)
=> builder.AddCookie(authenticationScheme, configureOptions: null); => builder.AddCookie(authenticationScheme, configureOptions: null!);
public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, Action<CookieAuthenticationOptions>? configureOptions) public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, Action<CookieAuthenticationOptions> configureOptions)
=> builder.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, configureOptions); => builder.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, configureOptions);
public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, Action<CookieAuthenticationOptions>? configureOptions) public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, Action<CookieAuthenticationOptions> configureOptions)
=> builder.AddCookie(authenticationScheme, displayName: null, configureOptions: configureOptions); => builder.AddCookie(authenticationScheme, displayName: null, configureOptions: configureOptions);
public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<CookieAuthenticationOptions>? configureOptions) public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<CookieAuthenticationOptions> configureOptions)
{ {
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<CookieAuthenticationOptions>, PostConfigureCookieAuthenticationOptions>()); builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<CookieAuthenticationOptions>, PostConfigureCookieAuthenticationOptions>());
builder.Services.AddOptions<CookieAuthenticationOptions>(authenticationScheme).Validate(o => o.Cookie.Expiration == null, "Cookie.Expiration is ignored, use ExpireTimeSpan instead."); builder.Services.AddOptions<CookieAuthenticationOptions>(authenticationScheme).Validate(o => o.Cookie.Expiration == null, "Cookie.Expiration is ignored, use ExpireTimeSpan instead.");