diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs index eff3051ae197..e21434969841 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs @@ -13,7 +13,7 @@ public class ModelValidationResult /// /// The name of the entry on which validation was performed. /// The validation message. - public ModelValidationResult(string memberName, string message) + public ModelValidationResult(string? memberName, string? message) { MemberName = memberName ?? string.Empty; Message = message ?? string.Empty; diff --git a/src/Mvc/Mvc.Abstractions/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.Abstractions/src/PublicAPI.Unshipped.txt index c81e387fcba5..e0688ab1c831 100644 --- a/src/Mvc/Mvc.Abstractions/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.Abstractions/src/PublicAPI.Unshipped.txt @@ -50,6 +50,7 @@ *REMOVED*Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo.Name.get -> string! *REMOVED*static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult.Success(object! model) -> Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult! *REMOVED*static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult.SuccessAsync(object! model) -> System.Threading.Tasks.Task! +*REMOVED*Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationResult.ModelValidationResult(string! memberName, string! message) -> void Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor.RouteValues.get -> System.Collections.Generic.IDictionary! Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor.BindingInfo.get -> Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo? Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintItem.Constraint.get -> Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint? @@ -101,3 +102,4 @@ virtual Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext.Result.get -> Mic virtual Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext.ActionArguments.get -> System.Collections.Generic.IDictionary! virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.BoundConstructorInvoker.get -> System.Func? virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.ContainerMetadata.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? +Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationResult.ModelValidationResult(string? memberName, string? message) -> void diff --git a/src/Mvc/Mvc.Core/src/Formatters/ResponseContentTypeHelper.cs b/src/Mvc/Mvc.Core/src/Formatters/ResponseContentTypeHelper.cs index 31ba0b303d8d..3e941e9199ca 100644 --- a/src/Mvc/Mvc.Core/src/Formatters/ResponseContentTypeHelper.cs +++ b/src/Mvc/Mvc.Core/src/Formatters/ResponseContentTypeHelper.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#nullable enable - using System.Diagnostics; using System.Text; using Microsoft.AspNetCore.Http; diff --git a/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilter.cs b/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilter.cs index 2ad0f3ebb428..9e75af8351b6 100644 --- a/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilter.cs +++ b/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilter.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Primitives; @@ -64,7 +65,7 @@ public CorsAuthorizationFilter( /// /// The policy name used to fetch a . /// - public string PolicyName { get; set; } + public string? PolicyName { get; set; } /// // Since clients' preflight requests would not have data to authenticate requests, this @@ -72,7 +73,7 @@ public CorsAuthorizationFilter( public int Order => int.MinValue + 100; /// - public async Task OnAuthorizationAsync(Filters.AuthorizationFilterContext context) + public async Task OnAuthorizationAsync(AuthorizationFilterContext context) { if (context == null) { diff --git a/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilterFactory.cs b/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilterFactory.cs index 517a85aea1ba..3dfe22f70960 100644 --- a/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilterFactory.cs +++ b/src/Mvc/Mvc.Cors/src/CorsAuthorizationFilterFactory.cs @@ -12,13 +12,13 @@ namespace Microsoft.AspNetCore.Mvc.Cors /// internal class CorsAuthorizationFilterFactory : IFilterFactory, IOrderedFilter { - private readonly string _policyName; + private readonly string? _policyName; /// /// Creates a new instance of . /// /// Name used to fetch a CORS policy. - public CorsAuthorizationFilterFactory(string policyName) + public CorsAuthorizationFilterFactory(string? policyName) { _policyName = policyName; } diff --git a/src/Mvc/Mvc.Cors/src/CorsLoggerExtensions.cs b/src/Mvc/Mvc.Cors/src/CorsLoggerExtensions.cs index 2dda61895967..ccba2a65e4c9 100644 --- a/src/Mvc/Mvc.Cors/src/CorsLoggerExtensions.cs +++ b/src/Mvc/Mvc.Cors/src/CorsLoggerExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Mvc.Cors { internal static class CorsLoggerExtensions { - private static readonly Action _notMostEffectiveFilter; + private static readonly Action _notMostEffectiveFilter; static CorsLoggerExtensions() { diff --git a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj index 8a5421737e96..74f4d8a64c6d 100644 --- a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj +++ b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj @@ -7,6 +7,7 @@ true aspnetcore;aspnetcoremvc;cors false + enable diff --git a/src/Mvc/Mvc.Cors/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.Cors/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..a986536cbbce 100644 --- a/src/Mvc/Mvc.Cors/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.Cors/src/PublicAPI.Unshipped.txt @@ -1 +1,18 @@ #nullable enable +*REMOVED*~Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.OnAuthorizationAsync(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext context) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.PolicyName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.PolicyName.set -> void +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.ConfigureCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService! corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider! policyProvider) -> void +Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService! corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider! policyProvider, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.OnAuthorizationAsync(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext! context) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.PolicyName.get -> string? +Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.PolicyName.set -> void +static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions.ConfigureCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! + diff --git a/src/Mvc/Mvc.DataAnnotations/src/AttributeAdapterBase.cs b/src/Mvc/Mvc.DataAnnotations/src/AttributeAdapterBase.cs index 6f8d1a0d26ce..3f884f4614aa 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/AttributeAdapterBase.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/AttributeAdapterBase.cs @@ -22,7 +22,7 @@ public abstract class AttributeAdapterBase : /// /// The being wrapped. /// The to be used in error generation. - public AttributeAdapterBase(TAttribute attribute, IStringLocalizer stringLocalizer) + public AttributeAdapterBase(TAttribute attribute, IStringLocalizer? stringLocalizer) : base(attribute, stringLocalizer) { } diff --git a/src/Mvc/Mvc.DataAnnotations/src/CompareAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/CompareAttributeAdapter.cs index 43e60f89e570..e45f1db82f43 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/CompareAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/CompareAttributeAdapter.cs @@ -14,7 +14,7 @@ internal class CompareAttributeAdapter : AttributeAdapterBase { private readonly string _otherProperty; - public CompareAttributeAdapter(CompareAttribute attribute, IStringLocalizer stringLocalizer) + public CompareAttributeAdapter(CompareAttribute attribute, IStringLocalizer? stringLocalizer) : base(new CompareAttributeWrapper(attribute), stringLocalizer) { _otherProperty = "*." + attribute.OtherProperty; @@ -54,7 +54,7 @@ public override string GetErrorMessage(ModelValidationContextBase validationCont // populate OtherPropertyDisplayName until you call FormatErrorMessage. private sealed class CompareAttributeWrapper : CompareAttribute { - public ModelValidationContextBase ValidationContext { get; set; } + public ModelValidationContextBase ValidationContext { get; set; } = default!; public CompareAttributeWrapper(CompareAttribute attribute) : base(attribute.OtherProperty) diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsClientModelValidatorProvider.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsClientModelValidatorProvider.cs index 7e5b77756a15..9ac106205e19 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsClientModelValidatorProvider.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsClientModelValidatorProvider.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations internal class DataAnnotationsClientModelValidatorProvider : IClientModelValidatorProvider { private readonly IOptions _options; - private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly IStringLocalizerFactory? _stringLocalizerFactory; private readonly IValidationAttributeAdapterProvider _validationAttributeAdapterProvider; /// @@ -32,7 +32,7 @@ internal class DataAnnotationsClientModelValidatorProvider : IClientModelValidat public DataAnnotationsClientModelValidatorProvider( IValidationAttributeAdapterProvider validationAttributeAdapterProvider, IOptions options, - IStringLocalizerFactory stringLocalizerFactory) + IStringLocalizerFactory? stringLocalizerFactory) { if (validationAttributeAdapterProvider == null) { @@ -55,7 +55,7 @@ public void CreateValidators(ClientValidatorProviderContext context) { throw new ArgumentNullException(nameof(context)); } - IStringLocalizer stringLocalizer = null; + IStringLocalizer? stringLocalizer = null; if (_options.Value.DataAnnotationLocalizerProvider != null && _stringLocalizerFactory != null) { // This will pass first non-null type (either containerType or modelType) to delegate. diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsLocalizationServices.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsLocalizationServices.cs index 37a8b654e61d..f8546af65f26 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsLocalizationServices.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsLocalizationServices.cs @@ -12,7 +12,7 @@ internal static class DataAnnotationsLocalizationServices { public static void AddDataAnnotationsLocalizationServices( IServiceCollection services, - Action setupAction) + Action? setupAction) { services.AddLocalization(); diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs index 404a1d134835..d1fecd226bf6 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsMetadataProvider.cs @@ -2,15 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Diagnostics.Contracts; using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Microsoft.Extensions.Localization; @@ -34,14 +30,14 @@ internal class DataAnnotationsMetadataProvider : private const string NullableContextAttributeFullName = "System.Runtime.CompilerServices.NullableContextAttribute"; private const string NullableContextFlagsFieldName = "Flag"; - private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly IStringLocalizerFactory? _stringLocalizerFactory; private readonly MvcOptions _options; private readonly MvcDataAnnotationsLocalizationOptions _localizationOptions; public DataAnnotationsMetadataProvider( MvcOptions options, IOptions localizationOptions, - IStringLocalizerFactory stringLocalizerFactory) + IStringLocalizerFactory? stringLocalizerFactory) { if (options == null) { @@ -120,7 +116,7 @@ public void CreateDisplayMetadata(DisplayMetadataProviderContext context) } var containerType = context.Key.ContainerType ?? context.Key.ModelType; - IStringLocalizer localizer = null; + IStringLocalizer? localizer = null; if (_stringLocalizerFactory != null && _localizationOptions.DataAnnotationLocalizerProvider != null) { localizer = _localizationOptions.DataAnnotationLocalizerProvider(containerType, _stringLocalizerFactory); @@ -201,20 +197,20 @@ public void CreateDisplayMetadata(DisplayMetadataProviderContext context) var groupedDisplayNamesAndValues = new List>(); var namesAndValues = new Dictionary(); - IStringLocalizer enumLocalizer = null; + IStringLocalizer? enumLocalizer = null; if (_stringLocalizerFactory != null && _localizationOptions.DataAnnotationLocalizerProvider != null) { enumLocalizer = _localizationOptions.DataAnnotationLocalizerProvider(underlyingType, _stringLocalizerFactory); } var enumFields = Enum.GetNames(underlyingType) - .Select(name => underlyingType.GetField(name)) + .Select(name => underlyingType.GetField(name)!) .OrderBy(field => field.GetCustomAttribute(inherit: false)?.GetOrder() ?? 1000); foreach (var field in enumFields) { var groupName = GetDisplayGroup(field); - var value = ((Enum)field.GetValue(obj: null)).ToString("d"); + var value = ((Enum)field.GetValue(obj: null)!).ToString("d"); groupedDisplayNamesAndValues.Add(new KeyValuePair( new EnumGroupAndName( @@ -271,9 +267,9 @@ public void CreateDisplayMetadata(DisplayMetadataProviderContext context) } // Order - if (displayAttribute?.GetOrder() != null) + if (displayAttribute?.GetOrder() is int order) { - displayMetadata.Order = displayAttribute.GetOrder().Value; + displayMetadata.Order = order; } // Placeholder @@ -374,7 +370,7 @@ public void CreateValidationMetadata(ValidationMetadataProviderContext context) // The only way we could arrive here is if the ModelMetadata was constructed using the non-default provider. // We'll cursorily examine the attributes on the property, but not the ContainerType to make a decision about it's nullability. - if (HasNullableAttribute(context.PropertyAttributes, out var propertyHasNullableAttribute)) + if (HasNullableAttribute(context.PropertyAttributes!, out var propertyHasNullableAttribute)) { addInferredRequiredAttribute = propertyHasNullableAttribute; } @@ -382,17 +378,17 @@ public void CreateValidationMetadata(ValidationMetadataProviderContext context) else { addInferredRequiredAttribute = IsNullableReferenceType( - property.DeclaringType, + property.DeclaringType!, member: null, - context.PropertyAttributes); + context.PropertyAttributes!); } } else if (context.Key.MetadataKind == ModelMetadataKind.Parameter) { addInferredRequiredAttribute = IsNullableReferenceType( - context.Key.ParameterInfo?.Member.ReflectedType, + context.Key.ParameterInfo!.Member.ReflectedType, context.Key.ParameterInfo.Member, - context.ParameterAttributes); + context.ParameterAttributes!); } else { @@ -431,7 +427,7 @@ public void CreateValidationMetadata(ValidationMetadataProviderContext context) } } - private static string GetDisplayName(FieldInfo field, IStringLocalizer stringLocalizer) + private static string GetDisplayName(FieldInfo field, IStringLocalizer? stringLocalizer) { var display = field.GetCustomAttribute(inherit: false); if (display != null) @@ -466,7 +462,7 @@ private static string GetDisplayGroup(FieldInfo field) return string.Empty; } - internal static bool IsNullableReferenceType(Type containingType, MemberInfo member, IEnumerable attributes) + internal static bool IsNullableReferenceType(Type? containingType, MemberInfo? member, IEnumerable attributes) { if (HasNullableAttribute(attributes, out var result)) { @@ -508,8 +504,13 @@ internal static bool HasNullableAttribute(IEnumerable attributes, out bo return true; // [Nullable] found but type is not an NNRT } - internal static bool IsNullableBasedOnContext(Type containingType, MemberInfo member) + internal static bool IsNullableBasedOnContext(Type? containingType, MemberInfo? member) { + if (containingType is null) + { + return false; + } + // For generic types, inspecting the nullability requirement additionally requires // inspecting the nullability constraint on generic type parameters. This is fairly non-triviial // so we'll just avoid calculating it. Users should still be able to apply an explicit [Required] diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidator.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidator.cs index b70a7c48254b..d51581dfd205 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidator.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidator.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations internal class DataAnnotationsModelValidator : IModelValidator { private static readonly object _emptyValidationContextInstance = new object(); - private readonly IStringLocalizer _stringLocalizer; + private readonly IStringLocalizer? _stringLocalizer; private readonly IValidationAttributeAdapterProvider _validationAttributeAdapterProvider; /// @@ -29,7 +29,7 @@ internal class DataAnnotationsModelValidator : IModelValidator public DataAnnotationsModelValidator( IValidationAttributeAdapterProvider validationAttributeAdapterProvider, ValidationAttribute attribute, - IStringLocalizer stringLocalizer) + IStringLocalizer? stringLocalizer) { if (validationAttributeAdapterProvider == null) { @@ -93,9 +93,9 @@ public IEnumerable Validate(ModelValidationContext valida }; var result = Attribute.GetValidationResult(validationContext.Model, context); - if (result != ValidationResult.Success) + if (result is not null) { - string errorMessage; + string? errorMessage; if (_stringLocalizer != null && !string.IsNullOrEmpty(Attribute.ErrorMessage) && string.IsNullOrEmpty(Attribute.ErrorMessageResourceName) && @@ -141,7 +141,7 @@ public IEnumerable Validate(ModelValidationContext valida return Enumerable.Empty(); } - private string GetErrorMessage(ModelValidationContextBase validationContext) + private string? GetErrorMessage(ModelValidationContextBase validationContext) { var adapter = _validationAttributeAdapterProvider.GetAttributeAdapter(Attribute, _stringLocalizer); return adapter?.GetErrorMessage(validationContext); diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidatorProvider.cs b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidatorProvider.cs index eedb31a78130..3906af7469d2 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidatorProvider.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataAnnotationsModelValidatorProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations internal sealed class DataAnnotationsModelValidatorProvider : IMetadataBasedModelValidatorProvider { private readonly IOptions _options; - private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly IStringLocalizerFactory? _stringLocalizerFactory; private readonly IValidationAttributeAdapterProvider _validationAttributeAdapterProvider; /// @@ -33,7 +33,7 @@ internal sealed class DataAnnotationsModelValidatorProvider : IMetadataBasedMode public DataAnnotationsModelValidatorProvider( IValidationAttributeAdapterProvider validationAttributeAdapterProvider, IOptions options, - IStringLocalizerFactory stringLocalizerFactory) + IStringLocalizerFactory? stringLocalizerFactory) { if (validationAttributeAdapterProvider == null) { @@ -51,7 +51,7 @@ public DataAnnotationsModelValidatorProvider( public void CreateValidators(ModelValidatorProviderContext context) { - IStringLocalizer stringLocalizer = null; + IStringLocalizer? stringLocalizer = null; if (_stringLocalizerFactory != null && _options.Value.DataAnnotationLocalizerProvider != null) { stringLocalizer = _options.Value.DataAnnotationLocalizerProvider( diff --git a/src/Mvc/Mvc.DataAnnotations/src/DataTypeAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/DataTypeAttributeAdapter.cs index 0c6bf4e11579..d80b949bbf34 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DataTypeAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DataTypeAttributeAdapter.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations /// internal class DataTypeAttributeAdapter : AttributeAdapterBase { - public DataTypeAttributeAdapter(DataTypeAttribute attribute, string ruleName, IStringLocalizer stringLocalizer) + public DataTypeAttributeAdapter(DataTypeAttribute attribute, string ruleName, IStringLocalizer? stringLocalizer) : base(attribute, stringLocalizer) { if (string.IsNullOrEmpty(ruleName)) diff --git a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs index 8ed3212e8ba5..400d80126835 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcBuilderExtensions.cs @@ -35,7 +35,7 @@ public static IMvcBuilder AddDataAnnotationsLocalization(this IMvcBuilder builde /// The . public static IMvcBuilder AddDataAnnotationsLocalization( this IMvcBuilder builder, - Action setupAction) + Action? setupAction) { if (builder == null) { diff --git a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs index 76a9ae46bb12..4480d215682a 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcCoreBuilderExtensions.cs @@ -54,7 +54,7 @@ public static IMvcCoreBuilder AddDataAnnotationsLocalization(this IMvcCoreBuilde /// The . public static IMvcCoreBuilder AddDataAnnotationsLocalization( this IMvcCoreBuilder builder, - Action setupAction) + Action? setupAction) { if (builder == null) { @@ -76,7 +76,7 @@ internal static void AddDataAnnotationsServices(IServiceCollection services) // Internal for testing. internal static void AddDataAnnotationsLocalizationServices( IServiceCollection services, - Action setupAction) + Action? setupAction) { DataAnnotationsLocalizationServices.AddDataAnnotationsLocalizationServices(services, setupAction); } diff --git a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs index 1de8755e9744..973997421fac 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/DependencyInjection/MvcDataAnnotationsMvcOptionsSetup.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection /// internal class MvcDataAnnotationsMvcOptionsSetup : IConfigureOptions { - private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly IStringLocalizerFactory? _stringLocalizerFactory; private readonly IValidationAttributeAdapterProvider _validationAttributeAdapterProvider; private readonly IOptions _dataAnnotationLocalizationOptions; diff --git a/src/Mvc/Mvc.DataAnnotations/src/FileExtensionsAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/FileExtensionsAttributeAdapter.cs index c7f62c67ad97..d5a30c0092c1 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/FileExtensionsAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/FileExtensionsAttributeAdapter.cs @@ -14,7 +14,7 @@ internal class FileExtensionsAttributeAdapter : AttributeAdapterBaseThe which will be used to create messages. /// /// An for the given . - IAttributeAdapter GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer stringLocalizer); + IAttributeAdapter? GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer? stringLocalizer); } } diff --git a/src/Mvc/Mvc.DataAnnotations/src/MaxLengthAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/MaxLengthAttributeAdapter.cs index e07e1165af8d..697593013e3f 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/MaxLengthAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/MaxLengthAttributeAdapter.cs @@ -13,7 +13,7 @@ internal class MaxLengthAttributeAdapter : AttributeAdapterBasetrue aspnetcore;aspnetcoremvc false + enable diff --git a/src/Mvc/Mvc.DataAnnotations/src/MinLengthAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/MinLengthAttributeAdapter.cs index 488e17d59bd0..1edfbf12c598 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/MinLengthAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/MinLengthAttributeAdapter.cs @@ -13,7 +13,7 @@ internal class MinLengthAttributeAdapter : AttributeAdapterBase /// The delegate to invoke for creating . /// - public Func DataAnnotationLocalizerProvider; + public Func DataAnnotationLocalizerProvider = null!; IEnumerator IEnumerable.GetEnumerator() => _switches.GetEnumerator(); diff --git a/src/Mvc/Mvc.DataAnnotations/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.DataAnnotations/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..eded8be2eaef 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.DataAnnotations/src/PublicAPI.Unshipped.txt @@ -1 +1,41 @@ #nullable enable +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase.AttributeAdapterBase(TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.IValidationAttributeAdapterProvider.GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions.DataAnnotationLocalizerProvider -> System.Func +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.RequiredAttributeAdapter(System.ComponentModel.DataAnnotations.RequiredAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.Attribute.get -> TAttribute +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.ValidationAttributeAdapter(TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapterProvider.GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter +*REMOVED*~abstract Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext) -> string +*REMOVED*~abstract Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> void +*REMOVED*~abstract Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationProviderAttribute.GetValidationAttributes() -> System.Collections.Generic.IEnumerable +*REMOVED*~override Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> void +*REMOVED*~override Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext) -> string +*REMOVED*~static Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.MergeAttribute(System.Collections.Generic.IDictionary attributes, string key, string value) -> bool +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotations(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, params object[] arguments) -> string +Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase.AttributeAdapterBase(TAttribute! attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer) -> void +Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase! validationContext) -> string! +Microsoft.AspNetCore.Mvc.DataAnnotations.IValidationAttributeAdapterProvider.GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute! attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer) -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter? +Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions.DataAnnotationLocalizerProvider -> System.Func! +Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.RequiredAttributeAdapter(System.ComponentModel.DataAnnotations.RequiredAttribute! attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer) -> void +Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.Attribute.get -> TAttribute! +Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.ValidationAttributeAdapter(TAttribute! attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer) -> void +Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapterProvider.GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute! attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer) -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter? +abstract Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase! validationContext) -> string! +abstract Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> void +abstract Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationProviderAttribute.GetValidationAttributes() -> System.Collections.Generic.IEnumerable! +override Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> void +override Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase! validationContext) -> string! +static Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.MergeAttribute(System.Collections.Generic.IDictionary! attributes, string! key, string! value) -> bool +static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotations(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +virtual Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter.GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata! modelMetadata, params object![]! arguments) -> string! diff --git a/src/Mvc/Mvc.DataAnnotations/src/RangeAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/RangeAttributeAdapter.cs index 692dc900d0f9..f958c5f87128 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/RangeAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/RangeAttributeAdapter.cs @@ -14,7 +14,7 @@ internal class RangeAttributeAdapter : AttributeAdapterBase private readonly string _max; private readonly string _min; - public RangeAttributeAdapter(RangeAttribute attribute, IStringLocalizer stringLocalizer) + public RangeAttributeAdapter(RangeAttribute attribute, IStringLocalizer? stringLocalizer) : base(attribute, stringLocalizer) { // This will trigger the conversion of Attribute.Minimum and Attribute.Maximum. @@ -24,8 +24,8 @@ public RangeAttributeAdapter(RangeAttribute attribute, IStringLocalizer stringLo // Validate a randomly selected number. attribute.IsValid(3); - _max = Convert.ToString(Attribute.Maximum, CultureInfo.InvariantCulture); - _min = Convert.ToString(Attribute.Minimum, CultureInfo.InvariantCulture); + _max = Convert.ToString(Attribute.Maximum, CultureInfo.InvariantCulture)!; + _min = Convert.ToString(Attribute.Minimum, CultureInfo.InvariantCulture)!; } public override void AddValidation(ClientModelValidationContext context) diff --git a/src/Mvc/Mvc.DataAnnotations/src/RegularExpressionAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/RegularExpressionAttributeAdapter.cs index d0278580cc56..0fbeb8f6c3b7 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/RegularExpressionAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/RegularExpressionAttributeAdapter.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations { internal class RegularExpressionAttributeAdapter : AttributeAdapterBase { - public RegularExpressionAttributeAdapter(RegularExpressionAttribute attribute, IStringLocalizer stringLocalizer) + public RegularExpressionAttributeAdapter(RegularExpressionAttribute attribute, IStringLocalizer? stringLocalizer) : base(attribute, stringLocalizer) { } diff --git a/src/Mvc/Mvc.DataAnnotations/src/RequiredAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/RequiredAttributeAdapter.cs index 776f3742a5ec..e29a44d030c9 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/RequiredAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/RequiredAttributeAdapter.cs @@ -18,7 +18,7 @@ public sealed class RequiredAttributeAdapter : AttributeAdapterBase /// The . /// The . - public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer stringLocalizer) + public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer? stringLocalizer) : base(attribute, stringLocalizer) { } diff --git a/src/Mvc/Mvc.DataAnnotations/src/StringLengthAttributeAdapter.cs b/src/Mvc/Mvc.DataAnnotations/src/StringLengthAttributeAdapter.cs index e1df7efab2a9..22c852a701a0 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/StringLengthAttributeAdapter.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/StringLengthAttributeAdapter.cs @@ -14,7 +14,7 @@ internal class StringLengthAttributeAdapter : AttributeAdapterBase : IClientModelValidator where TAttribute : ValidationAttribute { - private readonly IStringLocalizer _stringLocalizer; + private readonly IStringLocalizer? _stringLocalizer; /// /// Create a new instance of . /// /// The instance to validate. /// The . - public ValidationAttributeAdapter(TAttribute attribute, IStringLocalizer stringLocalizer) + public ValidationAttributeAdapter(TAttribute attribute, IStringLocalizer? stringLocalizer) { Attribute = attribute; _stringLocalizer = stringLocalizer; diff --git a/src/Mvc/Mvc.DataAnnotations/src/ValidationAttributeAdapterProvider.cs b/src/Mvc/Mvc.DataAnnotations/src/ValidationAttributeAdapterProvider.cs index a32a28a0326f..8eb7d246c9c7 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/ValidationAttributeAdapterProvider.cs +++ b/src/Mvc/Mvc.DataAnnotations/src/ValidationAttributeAdapterProvider.cs @@ -18,71 +18,67 @@ public class ValidationAttributeAdapterProvider : IValidationAttributeAdapterPro /// The attribute to create an adapter for. /// The localizer to provide to the adapter. /// An for the given attribute. - public IAttributeAdapter GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer stringLocalizer) + public IAttributeAdapter? GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer? stringLocalizer) { if (attribute == null) { throw new ArgumentNullException(nameof(attribute)); } - IAttributeAdapter adapter; - var type = attribute.GetType(); if (typeof(RegularExpressionAttribute).IsAssignableFrom(type)) { - adapter = new RegularExpressionAttributeAdapter((RegularExpressionAttribute)attribute, stringLocalizer); + return new RegularExpressionAttributeAdapter((RegularExpressionAttribute)attribute, stringLocalizer); } else if (typeof(MaxLengthAttribute).IsAssignableFrom(type)) { - adapter = new MaxLengthAttributeAdapter((MaxLengthAttribute)attribute, stringLocalizer); + return new MaxLengthAttributeAdapter((MaxLengthAttribute)attribute, stringLocalizer); } else if (typeof(RequiredAttribute).IsAssignableFrom(type)) { - adapter = new RequiredAttributeAdapter((RequiredAttribute)attribute, stringLocalizer); + return new RequiredAttributeAdapter((RequiredAttribute)attribute, stringLocalizer); } else if (typeof(CompareAttribute).IsAssignableFrom(type)) { - adapter = new CompareAttributeAdapter((CompareAttribute)attribute, stringLocalizer); + return new CompareAttributeAdapter((CompareAttribute)attribute, stringLocalizer); } else if (typeof(MinLengthAttribute).IsAssignableFrom(type)) { - adapter = new MinLengthAttributeAdapter((MinLengthAttribute)attribute, stringLocalizer); + return new MinLengthAttributeAdapter((MinLengthAttribute)attribute, stringLocalizer); } else if (typeof(CreditCardAttribute).IsAssignableFrom(type)) { - adapter = new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-creditcard", stringLocalizer); + return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-creditcard", stringLocalizer); } else if (typeof(StringLengthAttribute).IsAssignableFrom(type)) { - adapter = new StringLengthAttributeAdapter((StringLengthAttribute)attribute, stringLocalizer); + return new StringLengthAttributeAdapter((StringLengthAttribute)attribute, stringLocalizer); } else if (typeof(RangeAttribute).IsAssignableFrom(type)) { - adapter = new RangeAttributeAdapter((RangeAttribute)attribute, stringLocalizer); + return new RangeAttributeAdapter((RangeAttribute)attribute, stringLocalizer); } else if (typeof(EmailAddressAttribute).IsAssignableFrom(type)) { - adapter = new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-email", stringLocalizer); + return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-email", stringLocalizer); } else if (typeof(PhoneAttribute).IsAssignableFrom(type)) { - adapter = new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-phone", stringLocalizer); + return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-phone", stringLocalizer); } else if (typeof(UrlAttribute).IsAssignableFrom(type)) { - adapter = new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-url", stringLocalizer); + return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-url", stringLocalizer); } else if (typeof(FileExtensionsAttribute).IsAssignableFrom(type)) { - adapter = new FileExtensionsAttributeAdapter((FileExtensionsAttribute)attribute, stringLocalizer); + return new FileExtensionsAttributeAdapter((FileExtensionsAttribute)attribute, stringLocalizer); } else { - adapter = null; + return null; } - - return adapter; } }; } diff --git a/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcBuilderExtensions.cs b/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcBuilderExtensions.cs index d5c3c6df4cb5..ac1656935677 100644 --- a/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcBuilderExtensions.cs +++ b/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcBuilderExtensions.cs @@ -56,7 +56,7 @@ public static IMvcBuilder AddViewLocalization( /// The . public static IMvcBuilder AddViewLocalization( this IMvcBuilder builder, - Action setupAction) + Action? setupAction) { if (builder == null) { @@ -77,7 +77,7 @@ public static IMvcBuilder AddViewLocalization( public static IMvcBuilder AddViewLocalization( this IMvcBuilder builder, LanguageViewLocationExpanderFormat format, - Action setupAction) + Action? setupAction) { if (builder == null) { @@ -125,7 +125,7 @@ public static IMvcBuilder AddMvcLocalization(this IMvcBuilder builder) /// public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, - Action localizationOptionsSetupAction) + Action? localizationOptionsSetupAction) { if (builder == null) { @@ -181,7 +181,7 @@ public static IMvcBuilder AddMvcLocalization( /// public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, - Action localizationOptionsSetupAction, + Action? localizationOptionsSetupAction, LanguageViewLocationExpanderFormat format) { if (builder == null) @@ -210,7 +210,7 @@ public static IMvcBuilder AddMvcLocalization( /// public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -240,8 +240,8 @@ public static IMvcBuilder AddMvcLocalization( /// public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, - Action localizationOptionsSetupAction, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? localizationOptionsSetupAction, + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -271,7 +271,7 @@ public static IMvcBuilder AddMvcLocalization( public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, LanguageViewLocationExpanderFormat format, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -302,9 +302,9 @@ public static IMvcBuilder AddMvcLocalization( /// public static IMvcBuilder AddMvcLocalization( this IMvcBuilder builder, - Action localizationOptionsSetupAction, + Action? localizationOptionsSetupAction, LanguageViewLocationExpanderFormat format, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -316,4 +316,4 @@ public static IMvcBuilder AddMvcLocalization( .AddDataAnnotationsLocalization(dataAnnotationsLocalizationOptionsSetupAction); } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcCoreBuilderExtensions.cs b/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcCoreBuilderExtensions.cs index e0a970ab88e9..f710b9acacfb 100644 --- a/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcCoreBuilderExtensions.cs +++ b/src/Mvc/Mvc.Localization/src/DependencyInjection/MvcLocalizationMvcCoreBuilderExtensions.cs @@ -74,7 +74,7 @@ public static IMvcCoreBuilder AddViewLocalization( /// public static IMvcCoreBuilder AddViewLocalization( this IMvcCoreBuilder builder, - Action setupAction) + Action? setupAction) { if (builder == null) { @@ -99,7 +99,7 @@ public static IMvcCoreBuilder AddViewLocalization( public static IMvcCoreBuilder AddViewLocalization( this IMvcCoreBuilder builder, LanguageViewLocationExpanderFormat format, - Action setupAction) + Action? setupAction) { if (builder == null) { @@ -150,7 +150,7 @@ public static IMvcCoreBuilder AddMvcLocalization(this IMvcCoreBuilder builder) /// public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, - Action localizationOptionsSetupAction) + Action? localizationOptionsSetupAction) { if (builder == null) { @@ -206,7 +206,7 @@ public static IMvcCoreBuilder AddMvcLocalization( /// public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, - Action localizationOptionsSetupAction, + Action? localizationOptionsSetupAction, LanguageViewLocationExpanderFormat format) { if (builder == null) @@ -235,7 +235,7 @@ public static IMvcCoreBuilder AddMvcLocalization( /// public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -265,8 +265,8 @@ public static IMvcCoreBuilder AddMvcLocalization( /// public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, - Action localizationOptionsSetupAction, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? localizationOptionsSetupAction, + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -296,7 +296,7 @@ public static IMvcCoreBuilder AddMvcLocalization( public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, LanguageViewLocationExpanderFormat format, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -327,9 +327,9 @@ public static IMvcCoreBuilder AddMvcLocalization( /// public static IMvcCoreBuilder AddMvcLocalization( this IMvcCoreBuilder builder, - Action localizationOptionsSetupAction, + Action? localizationOptionsSetupAction, LanguageViewLocationExpanderFormat format, - Action dataAnnotationsLocalizationOptionsSetupAction) + Action? dataAnnotationsLocalizationOptionsSetupAction) { if (builder == null) { @@ -341,4 +341,4 @@ public static IMvcCoreBuilder AddMvcLocalization( .AddDataAnnotationsLocalization(dataAnnotationsLocalizationOptionsSetupAction); } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj index e9df28758ea6..bc38a86acad1 100644 --- a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -10,6 +10,7 @@ Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer true aspnetcore;aspnetcoremvc;localization false + enable diff --git a/src/Mvc/Mvc.Localization/src/MvcLocalizationServices.cs b/src/Mvc/Mvc.Localization/src/MvcLocalizationServices.cs index a1b056250b08..9c5375ef3841 100644 --- a/src/Mvc/Mvc.Localization/src/MvcLocalizationServices.cs +++ b/src/Mvc/Mvc.Localization/src/MvcLocalizationServices.cs @@ -14,7 +14,7 @@ internal static class MvcLocalizationServices public static void AddLocalizationServices( IServiceCollection services, LanguageViewLocationExpanderFormat format, - Action setupAction) + Action? setupAction) { AddMvcViewLocalizationServices(services, format); @@ -44,4 +44,4 @@ public static void AddMvcViewLocalizationServices( services.TryAdd(ServiceDescriptor.Transient()); } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.Localization/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..75f68e8b7c98 100644 --- a/src/Mvc/Mvc.Localization/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.Localization/src/PublicAPI.Unshipped.txt @@ -1 +1,129 @@ #nullable enable +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.HtmlLocalizer(Microsoft.Extensions.Localization.IStringLocalizer localizer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.HtmlLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory factory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.HtmlLocalizerFactory(Microsoft.Extensions.Localization.IStringLocalizerFactory localizerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetString(string name) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetString(string name, params object[] arguments) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.this[string name, params object[] arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.this[string name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory.Create(System.Type resourceSource) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory.Create(string baseName, string location) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string name, string value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string name, string value, bool isResourceNotFound) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string name, string value, bool isResourceNotFound, params object[] arguments) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Name.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Value.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetString(string name) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetString(string name, params object[] values) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.ViewLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory localizerFactory, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) -> void +*REMOVED*~static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetAllStrings(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer) -> System.Collections.Generic.IEnumerable +*REMOVED*~static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer, string name) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer, string name, params object[] arguments) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, System.Action dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string name) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string name, params object[] arguments) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.ToHtmlString(Microsoft.Extensions.Localization.LocalizedString result) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.ToHtmlString(Microsoft.Extensions.Localization.LocalizedString result, object[] arguments) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string name, params object[] arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string name) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string name, params object[] arguments) -> Microsoft.Extensions.Localization.LocalizedString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string name, params object[] arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.Create(System.Type resourceSource) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.Create(string baseName, string location) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.this[string key, params object[] arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.this[string key].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString +Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.HtmlLocalizer(Microsoft.Extensions.Localization.IStringLocalizer! localizer) -> void +Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.HtmlLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory! factory) -> void +Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.HtmlLocalizerFactory(Microsoft.Extensions.Localization.IStringLocalizerFactory! localizerFactory) -> void +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetString(string! name) -> Microsoft.Extensions.Localization.LocalizedString! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.GetString(string! name, params object![]! arguments) -> Microsoft.Extensions.Localization.LocalizedString! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.this[string! name, params object![]! arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.this[string! name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory.Create(System.Type! resourceSource) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! +Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory.Create(string! baseName, string! location) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string! name, string! value) -> void +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string! name, string! value, bool isResourceNotFound) -> void +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.LocalizedHtmlString(string! name, string! value, bool isResourceNotFound, params object![]! arguments) -> void +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Name.get -> string! +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Value.get -> string! +Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.WriteTo(System.IO.TextWriter! writer, System.Text.Encodings.Web.HtmlEncoder! encoder) -> void +Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext) -> void +Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable! +Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetString(string! name) -> Microsoft.Extensions.Localization.LocalizedString! +Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.GetString(string! name, params object![]! values) -> Microsoft.Extensions.Localization.LocalizedString! +Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.ViewLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory! localizerFactory, Microsoft.AspNetCore.Hosting.IWebHostEnvironment! hostingEnvironment) -> void +static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetAllStrings(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! htmlLocalizer) -> System.Collections.Generic.IEnumerable! +static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! htmlLocalizer, string! name) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +static Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions.GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! htmlLocalizer, string! name, params object![]! arguments) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? localizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? localizationOptionsSetupAction, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? localizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? localizationOptionsSetupAction, System.Action? dataAnnotationsLocalizationOptionsSetupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action? setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string! name) -> Microsoft.Extensions.Localization.LocalizedString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string! name, params object![]! arguments) -> Microsoft.Extensions.Localization.LocalizedString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.ToHtmlString(Microsoft.Extensions.Localization.LocalizedString! result) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.ToHtmlString(Microsoft.Extensions.Localization.LocalizedString! result, object![]! arguments) -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string! name, params object![]! arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string! name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetAllStrings(bool includeParentCultures) -> System.Collections.Generic.IEnumerable! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string! name) -> Microsoft.Extensions.Localization.LocalizedString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.GetString(string! name, params object![]! arguments) -> Microsoft.Extensions.Localization.LocalizedString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string! name, params object![]! arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer.this[string! name].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.Create(System.Type! resourceSource) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! +virtual Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory.Create(string! baseName, string! location) -> Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer! +virtual Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.this[string! key, params object![]! arguments].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! +virtual Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer.this[string! key].get -> Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString! diff --git a/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs b/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs index 29401fe5df34..2f1895e4b75f 100644 --- a/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs +++ b/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; using System.IO; using System.Text; using Microsoft.AspNetCore.Hosting; @@ -22,7 +21,7 @@ public class ViewLocalizer : IViewLocalizer, IViewContextAware { private readonly IHtmlLocalizerFactory _localizerFactory; private readonly string _applicationName; - private IHtmlLocalizer _localizer; + private IHtmlLocalizer _localizer = default!; /// /// Creates a new . diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/AnnotatedProblemDetails.cs b/src/Mvc/Mvc.NewtonsoftJson/src/AnnotatedProblemDetails.cs index 1faf982d9f9b..9e43eccbb8d1 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/AnnotatedProblemDetails.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/AnnotatedProblemDetails.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -29,22 +29,22 @@ public AnnotatedProblemDetails(ProblemDetails problemDetails) } [JsonProperty(PropertyName = "type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } + public string? Type { get; set; } [JsonProperty(PropertyName = "title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; set; } + public string? Title { get; set; } [JsonProperty(PropertyName = "status", NullValueHandling = NullValueHandling.Ignore)] public int? Status { get; set; } [JsonProperty(PropertyName = "detail", NullValueHandling = NullValueHandling.Ignore)] - public string Detail { get; set; } + public string? Detail { get; set; } [JsonProperty(PropertyName = "instance", NullValueHandling = NullValueHandling.Ignore)] - public string Instance { get; set; } + public string? Instance { get; set; } [JsonExtensionData] - public IDictionary Extensions { get; } = new Dictionary(StringComparer.Ordinal); + public IDictionary Extensions { get; } = new Dictionary(StringComparer.Ordinal); public void CopyTo(ProblemDetails problemDetails) { diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/BsonTempDataSerializer.cs b/src/Mvc/Mvc.NewtonsoftJson/src/BsonTempDataSerializer.cs index 9b02a95e97f9..02f6eab2abce 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/BsonTempDataSerializer.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/BsonTempDataSerializer.cs @@ -22,9 +22,9 @@ internal class BsonTempDataSerializer : TempDataSerializer JsonSerializer.Create(JsonSerializerSettingsProvider.CreateSerializerSettings()); private static readonly MethodInfo _convertArrayMethodInfo = typeof(BsonTempDataSerializer).GetMethod( - nameof(ConvertArray), BindingFlags.Static | BindingFlags.NonPublic); + nameof(ConvertArray), BindingFlags.Static | BindingFlags.NonPublic)!; private static readonly MethodInfo _convertDictionaryMethodInfo = typeof(BsonTempDataSerializer).GetMethod( - nameof(ConvertDictionary), BindingFlags.Static | BindingFlags.NonPublic); + nameof(ConvertDictionary), BindingFlags.Static | BindingFlags.NonPublic)!; private static readonly ConcurrentDictionary> _arrayConverters = new ConcurrentDictionary>(); @@ -43,21 +43,21 @@ internal class BsonTempDataSerializer : TempDataSerializer { JTokenType.Uri, typeof(Uri) }, }; - public override IDictionary Deserialize(byte[] value) + public override IDictionary Deserialize(byte[] value) { - Dictionary tempDataDictionary; + Dictionary tempDataDictionary; using (var memoryStream = new MemoryStream(value)) using (var reader = new BsonDataReader(memoryStream)) { - tempDataDictionary = _jsonSerializer.Deserialize>(reader); + tempDataDictionary = _jsonSerializer.Deserialize>(reader); if (tempDataDictionary == null) { - return new Dictionary(StringComparer.OrdinalIgnoreCase); + return new Dictionary(StringComparer.OrdinalIgnoreCase); } } - var convertedDictionary = new Dictionary( + var convertedDictionary = new Dictionary( tempDataDictionary, StringComparer.OrdinalIgnoreCase); foreach (var item in tempDataDictionary) @@ -124,10 +124,9 @@ public override IDictionary Deserialize(byte[] value) return convertedDictionary; } - public override byte[] Serialize(IDictionary values) + public override byte[] Serialize(IDictionary values) { - var hasValues = (values != null && values.Count > 0); - if (hasValues) + if (values?.Count > 0) { foreach (var item in values.Values) { @@ -167,13 +166,13 @@ public void EnsureObjectCanBeSerialized(object item) public override bool CanSerializeType(Type type) => CanSerializeType(type, out _); - private static bool CanSerializeType(Type typeToSerialize, out string errorMessage) + private static bool CanSerializeType(Type typeToSerialize, out string? errorMessage) { typeToSerialize = typeToSerialize ?? throw new ArgumentNullException(nameof(typeToSerialize)); errorMessage = null; - Type actualType = null; + Type? actualType = null; if (typeToSerialize.IsArray) { actualType = typeToSerialize.GetElementType(); @@ -209,7 +208,7 @@ private static bool CanSerializeType(Type typeToSerialize, out string errorMessa } } - actualType = actualType ?? typeToSerialize; + actualType ??= typeToSerialize; actualType = Nullable.GetUnderlyingType(actualType) ?? actualType; if (!IsSimpleType(actualType)) diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj index 5f0cdeada558..57e3effb81a7 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -7,6 +7,7 @@ aspnetcore;aspnetcoremvc;json true $(DefineConstants);JSONNET + enable diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonInputFormatter.cs b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonInputFormatter.cs index 461df9bf9fa7..d2e238169e5c 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonInputFormatter.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonInputFormatter.cs @@ -28,7 +28,7 @@ public class NewtonsoftJsonInputFormatter : TextInputFormatter, IInputFormatterE private readonly MvcOptions _options; private readonly MvcNewtonsoftJsonOptions _jsonOptions; - private ObjectPool _jsonSerializerPool; + private ObjectPool? _jsonSerializerPool; /// /// Initializes a new instance of . @@ -163,7 +163,7 @@ public override async Task ReadRequestBodyAsync( } var successful = true; - Exception exception = null; + Exception? exception = null; object model; using (var streamReader = context.ReaderFactory(readStream, encoding)) @@ -208,7 +208,7 @@ public override async Task ReadRequestBodyAsync( } } - if (!(exception is JsonException || exception is OverflowException || exception is FormatException)) + if (exception is not null && exception is not (JsonException or OverflowException or FormatException)) { // At this point we've already recorded all exceptions as an entry in the ModelStateDictionary. // We only need to rethrow an exception if we believe it needs to be handled by something further up @@ -223,7 +223,7 @@ public override async Task ReadRequestBodyAsync( return InputFormatterResult.Failure(); - void ErrorHandler(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs eventArgs) + void ErrorHandler(object? sender, Newtonsoft.Json.Serialization.ErrorEventArgs eventArgs) { successful = false; @@ -234,7 +234,7 @@ void ErrorHandler(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs ev if (addMember) { // Path.Member case (path.Length < member.Length) needs no further checks. - if (path.Length == member.Length) + if (path.Length == member!.Length) { // Add Member in Path.Memb case but not for Path.Path. addMember = !string.Equals(path, member, StringComparison.Ordinal); @@ -321,7 +321,7 @@ protected virtual JsonSerializer CreateJsonSerializer(InputFormatterContext cont /// manage the lifetimes of instances. /// protected virtual void ReleaseJsonSerializer(JsonSerializer serializer) - => _jsonSerializerPool.Return(serializer); + => _jsonSerializerPool!.Return(serializer); private ModelMetadata GetPathMetadata(ModelMetadata metadata, string path) { @@ -355,13 +355,13 @@ private ModelMetadata GetPathMetadata(ModelMetadata metadata, string path) } var propertyName = path.Substring(index, endIndex - index); - if (metadata.Properties[propertyName] == null) + var propertyMetadata = metadata.Properties[propertyName]; + if (propertyMetadata is null) { // Odd case but don't throw just because ErrorContext had an odd-looking path. break; } - - metadata = metadata.Properties[propertyName]; + metadata = propertyMetadata; index = endIndex; } } diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonLoggerExtensions.cs b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonLoggerExtensions.cs index a8be4c791787..c1089748899c 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonLoggerExtensions.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonLoggerExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -10,7 +10,6 @@ internal static class NewtonsoftJsonLoggerExtensions { private static readonly Action _jsonInputFormatterException; - static NewtonsoftJsonLoggerExtensions() { _jsonInputFormatterException = LoggerMessage.Define( diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs index d184f54b21ff..6dae68eac0cd 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs @@ -20,7 +20,7 @@ public class NewtonsoftJsonOutputFormatter : TextOutputFormatter { private readonly IArrayPool _charPool; private readonly MvcOptions _mvcOptions; - private JsonSerializerSettings _serializerSettings; + private JsonSerializerSettings? _serializerSettings; /// /// Initializes a new instance. @@ -132,7 +132,7 @@ public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext co var response = context.HttpContext.Response; var responseStream = response.Body; - FileBufferingWriteStream fileBufferingWriteStream = null; + FileBufferingWriteStream? fileBufferingWriteStream = null; if (!_mvcOptions.SuppressOutputFormatterBuffering) { fileBufferingWriteStream = new FileBufferingWriteStream(); diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonPatchInputFormatter.cs b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonPatchInputFormatter.cs index 63670160ace5..793bbe014e59 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonPatchInputFormatter.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonPatchInputFormatter.cs @@ -78,8 +78,7 @@ public async override Task ReadRequestBodyAsync( var result = await base.ReadRequestBodyAsync(context, encoding); if (!result.HasError) { - var jsonPatchDocument = (IJsonPatchDocument)result.Model; - if (jsonPatchDocument != null && SerializerSettings.ContractResolver != null) + if (result.Model is IJsonPatchDocument jsonPatchDocument && SerializerSettings.ContractResolver is not null) { jsonPatchDocument.ContractResolver = SerializerSettings.ContractResolver; } diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonResultExecutor.cs b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonResultExecutor.cs index d16e45f16981..cfbc124c893d 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonResultExecutor.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonResultExecutor.cs @@ -114,7 +114,7 @@ public async Task ExecuteAsync(ActionContext context, JsonResult result) Log.JsonResultExecuting(_logger, result.Value); var responseStream = response.Body; - FileBufferingWriteStream fileBufferingWriteStream = null; + FileBufferingWriteStream? fileBufferingWriteStream = null; if (!_mvcOptions.SuppressOutputFormatterBuffering) { fileBufferingWriteStream = new FileBufferingWriteStream(); @@ -178,23 +178,23 @@ private JsonSerializerSettings GetSerializerSettings(JsonResult result) private static class Log { - private static readonly Action _jsonResultExecuting; - private static readonly Action _bufferingAsyncEnumerable; + private static readonly Action _jsonResultExecuting; + private static readonly Action _bufferingAsyncEnumerable; static Log() { - _jsonResultExecuting = LoggerMessage.Define( + _jsonResultExecuting = LoggerMessage.Define( LogLevel.Information, new EventId(1, "JsonResultExecuting"), "Executing JsonResult, writing value of type '{Type}'."); - _bufferingAsyncEnumerable = LoggerMessage.Define( + _bufferingAsyncEnumerable = LoggerMessage.Define( LogLevel.Debug, new EventId(1, "BufferingAsyncEnumerable"), "Buffering IAsyncEnumerable instance of type '{Type}'."); } - public static void JsonResultExecuting(ILogger logger, object value) + public static void JsonResultExecuting(ILogger logger, object? value) { if (logger.IsEnabled(LogLevel.Information)) { diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/ProblemDetailsConverter.cs b/src/Mvc/Mvc.NewtonsoftJson/src/ProblemDetailsConverter.cs index 2ef8f768243f..9624e3559c6c 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/ProblemDetailsConverter.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/ProblemDetailsConverter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -18,7 +18,7 @@ public override bool CanConvert(Type objectType) } /// - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + public override object? ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var annotatedProblemDetails = serializer.Deserialize(reader); if (annotatedProblemDetails == null) diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.NewtonsoftJson/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..cb34db91dd65 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.NewtonsoftJson/src/PublicAPI.Unshipped.txt @@ -1 +1,65 @@ #nullable enable +*REMOVED*~Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.NewtonsoftJsonInputFormatter(Microsoft.Extensions.Logging.ILogger logger, Newtonsoft.Json.JsonSerializerSettings serializerSettings, System.Buffers.ArrayPool charPool, Microsoft.Extensions.ObjectPool.ObjectPoolProvider objectPoolProvider, Microsoft.AspNetCore.Mvc.MvcOptions options, Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions jsonOptions) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings +*REMOVED*~Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.NewtonsoftJsonOutputFormatter(Newtonsoft.Json.JsonSerializerSettings serializerSettings, System.Buffers.ArrayPool charPool, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings +*REMOVED*~Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.NewtonsoftJsonPatchInputFormatter(Microsoft.Extensions.Logging.ILogger logger, Newtonsoft.Json.JsonSerializerSettings serializerSettings, System.Buffers.ArrayPool charPool, Microsoft.Extensions.ObjectPool.ObjectPoolProvider objectPoolProvider, Microsoft.AspNetCore.Mvc.MvcOptions options, Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions jsonOptions) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings +*REMOVED*~override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.CanRead(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) -> bool +*REMOVED*~override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.CanConvert(System.Type objectType) -> bool +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) -> object +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) -> void +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.CanConvert(System.Type objectType) -> bool +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) -> object +*REMOVED*~override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) -> void +*REMOVED*~static Microsoft.AspNetCore.Mvc.JsonPatchExtensions.ApplyTo(this Microsoft.AspNetCore.JsonPatch.JsonPatchDocument patchDoc, T objectToApplyTo, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) -> void +*REMOVED*~static Microsoft.AspNetCore.Mvc.JsonPatchExtensions.ApplyTo(this Microsoft.AspNetCore.JsonPatch.JsonPatchDocument patchDoc, T objectToApplyTo, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, string prefix) -> void +*REMOVED*~static Microsoft.AspNetCore.Mvc.NewtonsoftJson.JsonSerializerSettingsProvider.CreateSerializerSettings() -> Newtonsoft.Json.JsonSerializerSettings +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.JsonHelperExtensions.Serialize(this Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper jsonHelper, object value, Newtonsoft.Json.JsonSerializerSettings serializerSettings) -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcNewtonsoftJsonOptionsExtensions.UseCamelCasing(this Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions options, bool processDictionaryKeys) -> Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcNewtonsoftJsonOptionsExtensions.UseMemberCasing(this Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions options) -> Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions +*REMOVED*~static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcCoreBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcCoreBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.CreateJsonSerializer() -> Newtonsoft.Json.JsonSerializer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.CreateJsonSerializer(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) -> Newtonsoft.Json.JsonSerializer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReleaseJsonSerializer(Newtonsoft.Json.JsonSerializer serializer) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonSerializer() -> Newtonsoft.Json.JsonSerializer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonSerializer(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) -> Newtonsoft.Json.JsonSerializer +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonWriter(System.IO.TextWriter writer) -> Newtonsoft.Json.JsonWriter +Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.NewtonsoftJsonInputFormatter(Microsoft.Extensions.Logging.ILogger! logger, Newtonsoft.Json.JsonSerializerSettings! serializerSettings, System.Buffers.ArrayPool! charPool, Microsoft.Extensions.ObjectPool.ObjectPoolProvider! objectPoolProvider, Microsoft.AspNetCore.Mvc.MvcOptions! options, Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! jsonOptions) -> void +Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings! +Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.NewtonsoftJsonOutputFormatter(Newtonsoft.Json.JsonSerializerSettings! serializerSettings, System.Buffers.ArrayPool! charPool, Microsoft.AspNetCore.Mvc.MvcOptions! mvcOptions) -> void +Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings! +Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.NewtonsoftJsonPatchInputFormatter(Microsoft.Extensions.Logging.ILogger! logger, Newtonsoft.Json.JsonSerializerSettings! serializerSettings, System.Buffers.ArrayPool! charPool, Microsoft.Extensions.ObjectPool.ObjectPoolProvider! objectPoolProvider, Microsoft.AspNetCore.Mvc.MvcOptions! options, Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! jsonOptions) -> void +Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions.SerializerSettings.get -> Newtonsoft.Json.JsonSerializerSettings! +override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context, System.Text.Encoding! encoding) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext! context, System.Text.Encoding! selectedEncoding) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.CanRead(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context) -> bool +override Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context, System.Text.Encoding! encoding) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.CanConvert(System.Type! objectType) -> bool +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.ReadJson(Newtonsoft.Json.JsonReader! reader, System.Type! objectType, object! existingValue, Newtonsoft.Json.JsonSerializer! serializer) -> object? +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ProblemDetailsConverter.WriteJson(Newtonsoft.Json.JsonWriter! writer, object! value, Newtonsoft.Json.JsonSerializer! serializer) -> void +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.CanConvert(System.Type! objectType) -> bool +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.ReadJson(Newtonsoft.Json.JsonReader! reader, System.Type! objectType, object! existingValue, Newtonsoft.Json.JsonSerializer! serializer) -> object? +override Microsoft.AspNetCore.Mvc.NewtonsoftJson.ValidationProblemDetailsConverter.WriteJson(Newtonsoft.Json.JsonWriter! writer, object! value, Newtonsoft.Json.JsonSerializer! serializer) -> void +~static Microsoft.AspNetCore.Mvc.JsonPatchExtensions.ApplyTo(this Microsoft.AspNetCore.JsonPatch.JsonPatchDocument! patchDoc, T! objectToApplyTo, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelState) -> void +~static Microsoft.AspNetCore.Mvc.JsonPatchExtensions.ApplyTo(this Microsoft.AspNetCore.JsonPatch.JsonPatchDocument! patchDoc, T! objectToApplyTo, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelState, string! prefix) -> void +static Microsoft.AspNetCore.Mvc.NewtonsoftJson.JsonSerializerSettingsProvider.CreateSerializerSettings() -> Newtonsoft.Json.JsonSerializerSettings! +static Microsoft.AspNetCore.Mvc.Rendering.JsonHelperExtensions.Serialize(this Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper! jsonHelper, object! value, Newtonsoft.Json.JsonSerializerSettings! serializerSettings) -> Microsoft.AspNetCore.Html.IHtmlContent! +static Microsoft.Extensions.DependencyInjection.MvcNewtonsoftJsonOptionsExtensions.UseCamelCasing(this Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! options, bool processDictionaryKeys) -> Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! +static Microsoft.Extensions.DependencyInjection.MvcNewtonsoftJsonOptionsExtensions.UseMemberCasing(this Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! options) -> Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions! +static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcCoreBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.NewtonsoftJsonMvcCoreBuilderExtensions.AddNewtonsoftJson(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.CreateJsonSerializer() -> Newtonsoft.Json.JsonSerializer! +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.CreateJsonSerializer(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext! context) -> Newtonsoft.Json.JsonSerializer! +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReleaseJsonSerializer(Newtonsoft.Json.JsonSerializer! serializer) -> void +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonSerializer() -> Newtonsoft.Json.JsonSerializer! +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonSerializer(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext! context) -> Newtonsoft.Json.JsonSerializer! +virtual Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter.CreateJsonWriter(System.IO.TextWriter! writer) -> Newtonsoft.Json.JsonWriter! diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/ValidationProblemDetailsConverter.cs b/src/Mvc/Mvc.NewtonsoftJson/src/ValidationProblemDetailsConverter.cs index 776eccc66a42..6df2ce20b494 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/ValidationProblemDetailsConverter.cs +++ b/src/Mvc/Mvc.NewtonsoftJson/src/ValidationProblemDetailsConverter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -19,7 +19,7 @@ public override bool CanConvert(Type objectType) } /// - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + public override object? ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var annotatedProblemDetails = serializer.Deserialize(reader); if (annotatedProblemDetails == null) diff --git a/src/Mvc/Mvc.Razor/src/ApplicationParts/CompiledRazorAssemblyPart.cs b/src/Mvc/Mvc.Razor/src/ApplicationParts/CompiledRazorAssemblyPart.cs index 36291ec4e8e7..a74e22b606bb 100644 --- a/src/Mvc/Mvc.Razor/src/ApplicationParts/CompiledRazorAssemblyPart.cs +++ b/src/Mvc/Mvc.Razor/src/ApplicationParts/CompiledRazorAssemblyPart.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -28,7 +28,7 @@ public CompiledRazorAssemblyPart(Assembly assembly) public Assembly Assembly { get; } /// - public override string Name => Assembly.GetName().Name; + public override string Name => Assembly.GetName().Name!; IEnumerable IRazorCompiledItemProvider.CompiledItems { diff --git a/src/Mvc/Mvc.Razor/src/Compilation/CompiledViewDescriptor.cs b/src/Mvc/Mvc.Razor/src/Compilation/CompiledViewDescriptor.cs index d7b36c1d09fc..ab2b4b118c3a 100644 --- a/src/Mvc/Mvc.Razor/src/Compilation/CompiledViewDescriptor.cs +++ b/src/Mvc/Mvc.Razor/src/Compilation/CompiledViewDescriptor.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -33,7 +33,6 @@ public CompiledViewDescriptor(RazorCompiledItem item) } Item = item; - ExpirationTokens = Array.Empty(); RelativePath = ViewPath.NormalizePath(item.Identifier); } @@ -69,14 +68,13 @@ public CompiledViewDescriptor(RazorCompiledItem item, RazorViewAttribute attribu // We don't have access to the file provider here so we can't check if the files // even exist or what their checksums are. For now leave this empty, it will be updated // later. - ExpirationTokens = Array.Empty(); RelativePath = ViewPath.NormalizePath(item?.Identifier ?? attribute.Path); } /// /// The normalized application relative path of the view. /// - public string RelativePath { get; set; } + public string RelativePath { get; set; } = default!; #pragma warning disable CS0618 // Type or member is obsolete @@ -87,22 +85,22 @@ public CompiledViewDescriptor(RazorCompiledItem item, RazorViewAttribute attribu /// May be null. /// [Obsolete("Use Item instead. RazorViewAttribute has been superseded by RazorCompiledItem and will not be used by the runtime.")] - public RazorViewAttribute ViewAttribute { get; set; } + public RazorViewAttribute? ViewAttribute { get; set; } #pragma warning restore CS0618 // Type or member is obsolete /// /// instances that indicate when this result has expired. /// - public IList ExpirationTokens { get; set; } + public IList? ExpirationTokens { get; set; } /// /// Gets the descriptor for this view. /// - public RazorCompiledItem Item { get; set; } + public RazorCompiledItem? Item { get; set; } /// /// Gets the type of the compiled item. /// - public Type Type => Item?.Type; + public Type? Type => Item?.Type; } } diff --git a/src/Mvc/Mvc.Razor/src/Compilation/DefaultRazorPageFactoryProvider.cs b/src/Mvc/Mvc.Razor/src/Compilation/DefaultRazorPageFactoryProvider.cs index f0c35634e7e0..10d8ce762dfb 100644 --- a/src/Mvc/Mvc.Razor/src/Compilation/DefaultRazorPageFactoryProvider.cs +++ b/src/Mvc/Mvc.Razor/src/Compilation/DefaultRazorPageFactoryProvider.cs @@ -47,7 +47,7 @@ public RazorPageFactoryResult CreateFactory(string relativePath) if (viewType != null) { var newExpression = Expression.New(viewType); - var pathProperty = viewType.GetProperty(nameof(IRazorPage.Path)); + var pathProperty = viewType.GetProperty(nameof(IRazorPage.Path))!; // Generate: page.Path = relativePath; // Use the normalized path specified from the result. diff --git a/src/Mvc/Mvc.Razor/src/DefaultTagHelperFactory.cs b/src/Mvc/Mvc.Razor/src/DefaultTagHelperFactory.cs index f394d34581e9..c06329bf933c 100644 --- a/src/Mvc/Mvc.Razor/src/DefaultTagHelperFactory.cs +++ b/src/Mvc/Mvc.Razor/src/DefaultTagHelperFactory.cs @@ -76,7 +76,7 @@ private static void InitializeTagHelper(TTagHelper tagHelper, ViewCo { // Run any tag helper initializers in the container var serviceProvider = context.HttpContext.RequestServices; - var initializers = serviceProvider.GetService>>(); + var initializers = serviceProvider.GetService>>()!; foreach (var initializer in initializers) { diff --git a/src/Mvc/Mvc.Razor/src/IRazorPage.cs b/src/Mvc/Mvc.Razor/src/IRazorPage.cs index 6a7773eae343..362aaa8fa43f 100644 --- a/src/Mvc/Mvc.Razor/src/IRazorPage.cs +++ b/src/Mvc/Mvc.Razor/src/IRazorPage.cs @@ -21,7 +21,7 @@ public interface IRazorPage /// /// Gets or sets the body content. /// - IHtmlContent BodyContent { get; set; } + IHtmlContent? BodyContent { get; set; } /// /// Gets or sets a flag that determines if the layout of this page is being rendered. @@ -41,7 +41,7 @@ public interface IRazorPage /// /// Gets or sets the path of a layout page. /// - string Layout { get; set; } + string? Layout { get; set; } /// /// Gets or sets the sections that can be rendered by this page. @@ -67,4 +67,4 @@ public interface IRazorPage /// defined and the body was not rendered. void EnsureRenderedBodyOrSections(); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Razor/src/IRazorViewEngine.cs b/src/Mvc/Mvc.Razor/src/IRazorViewEngine.cs index 6af2cafef8a1..8218ee2b55cf 100644 --- a/src/Mvc/Mvc.Razor/src/IRazorViewEngine.cs +++ b/src/Mvc/Mvc.Razor/src/IRazorViewEngine.cs @@ -45,6 +45,6 @@ public interface IRazorViewEngine : IViewEngine /// is a relative path. The value (unchanged) /// otherwise. /// - string GetAbsolutePath(string executingFilePath, string pagePath); + string? GetAbsolutePath(string? executingFilePath, string? pagePath); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj index fc9baf22e70e..91ed0eb119b1 100644 --- a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj +++ b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj @@ -7,6 +7,7 @@ true aspnetcore;aspnetcoremvc;cshtml;razor false + enable diff --git a/src/Mvc/Mvc.Razor/src/MvcRazorLoggerExtensions.cs b/src/Mvc/Mvc.Razor/src/MvcRazorLoggerExtensions.cs index 4a11e49085eb..c6b40a1c9be1 100644 --- a/src/Mvc/Mvc.Razor/src/MvcRazorLoggerExtensions.cs +++ b/src/Mvc/Mvc.Razor/src/MvcRazorLoggerExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -11,25 +11,24 @@ internal static class MvcRazorLoggerExtensions { private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency; - private static readonly Action _generatedCodeToAssemblyCompilationStart; - private static readonly Action _generatedCodeToAssemblyCompilationEnd; + private static readonly Action _generatedCodeToAssemblyCompilationStart; + private static readonly Action _generatedCodeToAssemblyCompilationEnd; - private static readonly Action _viewCompilerStartCodeGeneration; - private static readonly Action _viewCompilerEndCodeGeneration; - private static readonly Action _viewCompilerLocatedCompiledView; - private static readonly Action _viewCompilerNoCompiledViewsFound; - private static readonly Action _viewCompilerLocatedCompiledViewForPath; - private static readonly Action _viewCompilerRecompilingCompiledView; - private static readonly Action _viewCompilerCouldNotFindFileToCompileForPath; - private static readonly Action _viewCompilerFoundFileToCompileForPath; - private static readonly Action _viewCompilerInvalidatingCompiledFile; + private static readonly Action _viewCompilerStartCodeGeneration; + private static readonly Action _viewCompilerEndCodeGeneration; + private static readonly Action _viewCompilerLocatedCompiledView; + private static readonly Action _viewCompilerNoCompiledViewsFound; + private static readonly Action _viewCompilerLocatedCompiledViewForPath; + private static readonly Action _viewCompilerCouldNotFindFileToCompileForPath; + private static readonly Action _viewCompilerFoundFileToCompileForPath; + private static readonly Action _viewCompilerInvalidatingCompiledFile; - private static readonly Action _viewLookupCacheMiss; - private static readonly Action _viewLookupCacheHit; - private static readonly Action _precompiledViewFound; + private static readonly Action _viewLookupCacheMiss; + private static readonly Action _viewLookupCacheHit; + private static readonly Action _precompiledViewFound; - private static readonly Action _tagHelperComponentInitialized; - private static readonly Action _tagHelperComponentProcessed; + private static readonly Action _tagHelperComponentInitialized; + private static readonly Action _tagHelperComponentProcessed; static MvcRazorLoggerExtensions() @@ -59,10 +58,7 @@ static MvcRazorLoggerExtensions() new EventId(5, "ViewCompilerLocatedCompiledViewForPath"), "Located compiled view for view at path '{Path}'."); - _viewCompilerRecompilingCompiledView = LoggerMessage.Define( - LogLevel.Trace, - new EventId(6, "ViewCompilerRecompilingCompiledView"), - "Invalidating compiled view for view at path '{Path}'."); + // 6, ViewCompilerRecompilingCompiledView - removed _viewCompilerCouldNotFindFileToCompileForPath = LoggerMessage.Define( LogLevel.Trace, @@ -79,12 +75,12 @@ static MvcRazorLoggerExtensions() new EventId(9, "ViewCompilerInvalidingCompiledFile"), "Invalidating compiled view at path '{Path}' with a file since the checksum did not match."); - _viewLookupCacheMiss = LoggerMessage.Define( + _viewLookupCacheMiss = LoggerMessage.Define( LogLevel.Debug, new EventId(1, "ViewLookupCacheMiss"), "View lookup cache miss for view '{ViewName}' in controller '{ControllerName}'."); - _viewLookupCacheHit = LoggerMessage.Define( + _viewLookupCacheHit = LoggerMessage.Define( LogLevel.Debug, new EventId(2, "ViewLookupCacheHit"), "View lookup cache hit for view '{ViewName}' in controller '{ControllerName}'."); @@ -161,12 +157,12 @@ public static void ViewCompilerInvalidingCompiledFile(this ILogger logger, strin _viewCompilerInvalidatingCompiledFile(logger, path, null); } - public static void ViewLookupCacheMiss(this ILogger logger, string viewName, string controllerName) + public static void ViewLookupCacheMiss(this ILogger logger, string viewName, string? controllerName) { _viewLookupCacheMiss(logger, viewName, controllerName, null); } - public static void ViewLookupCacheHit(this ILogger logger, string viewName, string controllerName) + public static void ViewLookupCacheHit(this ILogger logger, string viewName, string? controllerName) { _viewLookupCacheHit(logger, viewName, controllerName, null); } diff --git a/src/Mvc/Mvc.Razor/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.Razor/src/PublicAPI.Unshipped.txt index 59bcc0faaa4f..c149c8302b95 100644 --- a/src/Mvc/Mvc.Razor/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.Razor/src/PublicAPI.Unshipped.txt @@ -1,4 +1,380 @@ #nullable enable Microsoft.AspNetCore.Mvc.ApplicationParts.ConsolidatedAssemblyApplicationPartFactory Microsoft.AspNetCore.Mvc.ApplicationParts.ConsolidatedAssemblyApplicationPartFactory.ConsolidatedAssemblyApplicationPartFactory() -> void -~override Microsoft.AspNetCore.Mvc.ApplicationParts.ConsolidatedAssemblyApplicationPartFactory.GetApplicationParts(System.Reflection.Assembly assembly) -> System.Collections.Generic.IEnumerable +override Microsoft.AspNetCore.Mvc.ApplicationParts.ConsolidatedAssemblyApplicationPartFactory.GetApplicationParts(System.Reflection.Assembly! assembly) -> System.Collections.Generic.IEnumerable! +*REMOVED*Microsoft.AspNetCore.Mvc.Razor.RazorPage.Model.get -> TModel +*REMOVED*Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewBag.get -> dynamic +*REMOVED*~Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.Assembly.get -> System.Reflection.Assembly +*REMOVED*~Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.CompiledRazorAssemblyPart(System.Reflection.Assembly assembly) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ApplicationParts.IRazorCompiledItemProvider.CompiledItems.get -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.ActionDescriptor.get -> Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.AfterViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.ActionDescriptor.get -> Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.BeforeViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage +*REMOVED*~Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem item) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem item, Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute attribute) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ExpirationTokens.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ExpirationTokens.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Item.get -> Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Item.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.RelativePath.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.RelativePath.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Type.get -> System.Type +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ViewAttribute.get -> Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ViewAttribute.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler.CompileAsync(string relativePath) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider.GetCompiler() -> Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.Path.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.RazorViewAttribute(string path, System.Type viewType) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.ViewType.get -> System.Type +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeature.ViewDescriptors.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.HelperResult.HelperResult(System.Func asyncAction) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteAction.get -> System.Func +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.BodyContent.get -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.BodyContent.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ExecuteAsync() -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Layout.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Layout.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Path.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Path.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.SectionWriters.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ViewContext.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator.Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider.CreateFactory(string relativePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.FindPage(Microsoft.AspNetCore.Mvc.ActionContext context, string pageName) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.GetAbsolutePath(string executingFilePath, string pagePath) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.GetPage(string executingFilePath, string pagePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ITagHelperActivator.Create(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> TTagHelper +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ITagHelperFactory.CreateTagHelper(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> TTagHelper +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer.Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander.ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable viewLocations) -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander.PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.Cache.get -> Microsoft.Extensions.Caching.Memory.IMemoryCache +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpander.PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.Context.get -> Microsoft.AspNetCore.Http.HttpContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.IgnoreSection(string sectionName) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.IsSectionDefined(string name) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(string name) -> Microsoft.AspNetCore.Html.HtmlString +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(string name, bool required) -> Microsoft.AspNetCore.Html.HtmlString +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSectionAsync(string name) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSectionAsync(string name, bool required) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPage.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.RazorPageActivator(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper jsonHelper, System.Diagnostics.DiagnosticSource diagnosticSource, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider modelExpressionProvider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.AddHtmlAttributeValue(string prefix, int prefixOffset, object value, int valueOffset, int valueLength, bool isLiteral) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BeginAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext executionContext, string attributeName, int attributeValuesCount, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle attributeValueStyle) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BodyContent.get -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BodyContent.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.CreateTagHelper() -> TTagHelper +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DefineSection(string name, System.Func section) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DiagnosticSource.get -> System.Diagnostics.DiagnosticSource +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DiagnosticSource.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext executionContext) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndTagHelperWritingScope() -> Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndWriteTagHelperAttribute() -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.HtmlEncoder.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.InvalidTagHelperIndexerAssignment(string attributeName, string tagHelperTypeName, string propertyName) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Layout.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Layout.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Path.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Path.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PreviousSectionWriters.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PreviousSectionWriters.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.SectionWriters.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.StartTagHelperWritingScope(System.Text.Encodings.Web.HtmlEncoder encoder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteAttributeValue(string prefix, int prefixOffset, object value, int valueOffset, int valueLength, bool isLiteral) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.RazorPageFactory.get -> System.Func +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.RazorPageFactoryResult(Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor viewDescriptor, System.Func razorPageFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.ViewDescriptor.get -> Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.Name.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.RazorPageResult(string name, Microsoft.AspNetCore.Mvc.Razor.IRazorPage page) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.RazorPageResult(string name, System.Collections.Generic.IEnumerable searchedLocations) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.SearchedLocations.get -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorView.Path.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorView.RazorPage.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorView.RazorView(Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine viewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Collections.Generic.IReadOnlyList viewStartPages, Microsoft.AspNetCore.Mvc.Razor.IRazorPage razorPage, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Diagnostics.DiagnosticListener diagnosticListener) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorView.ViewStartPages.get -> System.Collections.Generic.IReadOnlyList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindPage(Microsoft.AspNetCore.Mvc.ActionContext context, string pageName) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetAbsolutePath(string executingFilePath, string pagePath) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetPage(string executingFilePath, string pagePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(string executingFilePath, string viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.RazorViewEngine(Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticListener diagnosticListener) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.ViewLookupCache.get -> Microsoft.Extensions.Caching.Memory.IMemoryCache +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.AreaPageViewLocationFormats.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.AreaViewLocationFormats.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.PageViewLocationFormats.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.ViewLocationExpanders.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.ViewLocationFormats.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer.Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer.TagHelperInitializer(System.Action action) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper.BodyTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper.HeadTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager.Components.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator.Activate(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context, Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent tagHelperComponent) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.PropertyActivator.get -> Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.PropertyActivator.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.TagHelperComponentTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ViewContext.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature.TagHelpers.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.PopulateFeature(System.Collections.Generic.IEnumerable parts, Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature feature) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ProcessUrlAttribute(string attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.TryResolveUrl(string url, out Microsoft.AspNetCore.Html.IHtmlContent resolvedUrl) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.TryResolveUrl(string url, out string resolvedUrl) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.UrlHelperFactory.get -> Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.UrlResolutionTagHelper(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ViewContext.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ActionContext.get -> Microsoft.AspNetCore.Mvc.ActionContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.AreaName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ControllerName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.PageName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.Values.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.Values.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ViewLocationExpanderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, string viewName, string controllerName, string areaName, string pageName, bool isMainPage) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ViewName.get -> string +*REMOVED*~abstract Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ExecuteAsync() -> System.Threading.Tasks.Task +*REMOVED*~const Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.EventName = "Microsoft.AspNetCore.Mvc.Razor.AfterViewPage" -> string +*REMOVED*~const Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.EventName = "Microsoft.AspNetCore.Mvc.Razor.BeforeViewPage" -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory.GetApplicationParts(System.Reflection.Assembly assembly) -> System.Collections.Generic.IEnumerable +*REMOVED*~override Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.Name.get -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.Razor.RazorPage.DefineSection(string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section) -> void +*REMOVED*~override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) -> void +*REMOVED*~override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) -> void +*REMOVED*~static Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory.GetDefaultApplicationParts(System.Reflection.Assembly assembly) -> System.Collections.Generic.IEnumerable +*REMOVED*~static Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetNormalizedRouteValue(Microsoft.AspNetCore.Mvc.ActionContext context, string key) -> string +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.AddRazorOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action initialize) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action initialize) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder +*REMOVED*~static readonly Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.ViewExtension -> string +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpander.ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable viewLocations) -> System.Collections.Generic.IEnumerable +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderBody() -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BeginWriteAttribute(string name, string prefix, int prefixOffset, string suffix, int suffixOffset, int attributeValuesCount) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DefineSection(string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.FlushAsync() -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Href(string contentPath) -> string +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Output.get -> System.IO.TextWriter +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PopWriter() -> System.IO.TextWriter +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PushWriter(System.IO.TextWriter writer) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.SetAntiforgeryCookieAndHeader() -> Microsoft.AspNetCore.Html.HtmlString +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.User.get -> System.Security.Claims.ClaimsPrincipal +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewContext.set -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Write(object value) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Write(string value) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteLiteral(object value) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteLiteral(string value) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.IncludePart(Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart part) -> bool +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.IncludeType(System.Reflection.TypeInfo type) -> bool +Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.Assembly.get -> System.Reflection.Assembly! +Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.CompiledRazorAssemblyPart(System.Reflection.Assembly! assembly) -> void +Microsoft.AspNetCore.Mvc.ApplicationParts.IRazorCompiledItemProvider.CompiledItems.get -> System.Collections.Generic.IEnumerable! +Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.ActionDescriptor.get -> Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor! +Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.AfterViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage! page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor! actionDescriptor, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> void +Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext! +Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage! +Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.ActionDescriptor.get -> Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor! +Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.BeforeViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage! page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor! actionDescriptor, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> void +Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext! +Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage! +Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem! item) -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem! item, Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute! attribute) -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ExpirationTokens.get -> System.Collections.Generic.IList? +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ExpirationTokens.set -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Item.get -> Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem? +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Item.set -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.RelativePath.get -> string! +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.RelativePath.set -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.Type.get -> System.Type? +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ViewAttribute.get -> Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute? +Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor.ViewAttribute.set -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler.CompileAsync(string! relativePath) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider.GetCompiler() -> Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler! +Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.Path.get -> string! +Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.RazorViewAttribute(string! path, System.Type! viewType) -> void +Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute.ViewType.get -> System.Type! +Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeature.ViewDescriptors.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.HelperResult.HelperResult(System.Func! asyncAction) -> void +Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteAction.get -> System.Func! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.BodyContent.get -> Microsoft.AspNetCore.Html.IHtmlContent? +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.BodyContent.set -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ExecuteAsync() -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Layout.get -> string? +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Layout.set -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Path.get -> string! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Path.set -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters.set -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.SectionWriters.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ViewContext.set -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator.Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage! page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider.CreateFactory(string! relativePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult +Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.FindPage(Microsoft.AspNetCore.Mvc.ActionContext! context, string! pageName) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.GetAbsolutePath(string? executingFilePath, string? pagePath) -> string? +Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine.GetPage(string! executingFilePath, string! pagePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +Microsoft.AspNetCore.Mvc.Razor.ITagHelperActivator.Create(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> TTagHelper +Microsoft.AspNetCore.Mvc.Razor.ITagHelperFactory.CreateTagHelper(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> TTagHelper +Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer +Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer.Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander.ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext! context, System.Collections.Generic.IEnumerable! viewLocations) -> System.Collections.Generic.IEnumerable! +Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander.PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.Cache.get -> Microsoft.Extensions.Caching.Memory.IMemoryCache! +Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpander.PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPage.Context.get -> Microsoft.AspNetCore.Http.HttpContext! +Microsoft.AspNetCore.Mvc.Razor.RazorPage.IgnoreSection(string! sectionName) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPage.IsSectionDefined(string! name) -> bool +Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(string! name) -> Microsoft.AspNetCore.Html.HtmlString? +Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(string! name, bool required) -> Microsoft.AspNetCore.Html.HtmlString? +Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSectionAsync(string! name) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSectionAsync(string! name, bool required) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.Razor.RazorPage.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.Razor.RazorPage.ViewData.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage! page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.RazorPageActivator(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory! urlHelperFactory, Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper! jsonHelper, System.Diagnostics.DiagnosticSource! diagnosticSource, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider! modelExpressionProvider) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.AddHtmlAttributeValue(string? prefix, int prefixOffset, object? value, int valueOffset, int valueLength, bool isLiteral) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BeginAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext! executionContext, string! attributeName, int attributeValuesCount, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle attributeValueStyle) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BodyContent.get -> Microsoft.AspNetCore.Html.IHtmlContent? +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BodyContent.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.CreateTagHelper() -> TTagHelper +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DefineSection(string! name, System.Func! section) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DiagnosticSource.get -> System.Diagnostics.DiagnosticSource! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DiagnosticSource.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext! executionContext) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndTagHelperWritingScope() -> Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.EndWriteTagHelperAttribute() -> string! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.HtmlEncoder.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.InvalidTagHelperIndexerAssignment(string! attributeName, string! tagHelperTypeName, string! propertyName) -> string! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Layout.get -> string? +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Layout.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Path.get -> string! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Path.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PreviousSectionWriters.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PreviousSectionWriters.set -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.SectionWriters.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.StartTagHelperWritingScope(System.Text.Encodings.Web.HtmlEncoder! encoder) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteAttributeValue(string! prefix, int prefixOffset, object? value, int valueOffset, int valueLength, bool isLiteral) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.RazorPageFactory.get -> System.Func? +Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.RazorPageFactoryResult(Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor! viewDescriptor, System.Func? razorPageFactory) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult.ViewDescriptor.get -> Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor? +Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.Name.get -> string! +Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.Page.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage? +Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.RazorPageResult(string! name, Microsoft.AspNetCore.Mvc.Razor.IRazorPage! page) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.RazorPageResult(string! name, System.Collections.Generic.IEnumerable! searchedLocations) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorPageResult.SearchedLocations.get -> System.Collections.Generic.IEnumerable? +Microsoft.AspNetCore.Mvc.Razor.RazorView.Path.get -> string! +Microsoft.AspNetCore.Mvc.Razor.RazorView.RazorPage.get -> Microsoft.AspNetCore.Mvc.Razor.IRazorPage! +Microsoft.AspNetCore.Mvc.Razor.RazorView.RazorView(Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine! viewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator! pageActivator, System.Collections.Generic.IReadOnlyList! viewStartPages, Microsoft.AspNetCore.Mvc.Razor.IRazorPage! razorPage, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, System.Diagnostics.DiagnosticListener! diagnosticListener) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorView.ViewStartPages.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindPage(Microsoft.AspNetCore.Mvc.ActionContext! context, string! pageName) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext! context, string! viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetAbsolutePath(string? executingFilePath, string? pagePath) -> string? +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetPage(string! executingFilePath, string! pagePath) -> Microsoft.AspNetCore.Mvc.Razor.RazorPageResult +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(string? executingFilePath, string! viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +~Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.RazorViewEngine(Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider! pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator! pageActivator, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, Microsoft.Extensions.Options.IOptions! optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory, System.Diagnostics.DiagnosticListener! diagnosticListener) -> void +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.ViewLookupCache.get -> Microsoft.Extensions.Caching.Memory.IMemoryCache! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.AreaPageViewLocationFormats.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.AreaViewLocationFormats.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.PageViewLocationFormats.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.ViewLocationExpanders.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.ViewLocationFormats.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer +Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer.Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer.TagHelperInitializer(System.Action! action) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper.BodyTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager! manager, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper.HeadTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager! manager, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager.Components.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator.Activate(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context, Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent! tagHelperComponent) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.PropertyActivator.get -> Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.PropertyActivator.set -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.TagHelperComponentTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager! manager, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ViewContext.set -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature.TagHelpers.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.PopulateFeature(System.Collections.Generic.IEnumerable! parts, Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature! feature) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ProcessUrlAttribute(string! attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput! output) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.TryResolveUrl(string! url, out Microsoft.AspNetCore.Html.IHtmlContent? resolvedUrl) -> bool +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.TryResolveUrl(string! url, out string? resolvedUrl) -> bool +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.UrlHelperFactory.get -> Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.UrlResolutionTagHelper(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory! urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder) -> void +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.ViewContext.set -> void +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ActionContext.get -> Microsoft.AspNetCore.Mvc.ActionContext! +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.AreaName.get -> string? +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ControllerName.get -> string? +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.PageName.get -> string? +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.Values.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.Values.set -> void +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ViewLocationExpanderContext(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, string! viewName, string? controllerName, string? areaName, string? pageName, bool isMainPage) -> void +Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext.ViewName.get -> string! +abstract Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ExecuteAsync() -> System.Threading.Tasks.Task! +const Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData.EventName = "Microsoft.AspNetCore.Mvc.Razor.AfterViewPage" -> string! +const Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData.EventName = "Microsoft.AspNetCore.Mvc.Razor.BeforeViewPage" -> string! +override Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory.GetApplicationParts(System.Reflection.Assembly! assembly) -> System.Collections.Generic.IEnumerable! +override Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart.Name.get -> string! +override Microsoft.AspNetCore.Mvc.Razor.RazorPage.DefineSection(string! name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate! section) -> void +override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext! context) -> void +override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper.ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext! context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput! output) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper.Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext! context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput! output) -> void +static Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory.GetDefaultApplicationParts(System.Reflection.Assembly! assembly) -> System.Collections.Generic.IEnumerable! +static Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetNormalizedRouteValue(Microsoft.AspNetCore.Mvc.ActionContext! context, string! key) -> string? +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.AddRazorOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions.InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcBuilder! builder, System.Action! initialize) -> Microsoft.Extensions.DependencyInjection.IMvcBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions.InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! builder, System.Action! initialize) -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder! +static readonly Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.ViewExtension -> string! +virtual Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteTo(System.IO.TextWriter! writer, System.Text.Encodings.Web.HtmlEncoder! encoder) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpander.ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext! context, System.Collections.Generic.IEnumerable! viewLocations) -> System.Collections.Generic.IEnumerable! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderBody() -> Microsoft.AspNetCore.Html.IHtmlContent! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.BeginWriteAttribute(string! name, string! prefix, int prefixOffset, string! suffix, int suffixOffset, int attributeValuesCount) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.DefineSection(string! name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate! section) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.FlushAsync() -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Href(string! contentPath) -> string! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Output.get -> System.IO.TextWriter! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PopWriter() -> System.IO.TextWriter! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.PushWriter(System.IO.TextWriter! writer) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.SetAntiforgeryCookieAndHeader() -> Microsoft.AspNetCore.Html.HtmlString! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.User.get -> System.Security.Claims.ClaimsPrincipal! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewContext.set -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Write(object? value) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.Write(string? value) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteLiteral(object? value) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.WriteLiteral(string? value) -> void +virtual Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.IncludePart(Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart! part) -> bool +virtual Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider.IncludeType(System.Reflection.TypeInfo! type) -> bool +Microsoft.AspNetCore.Mvc.Razor.RazorPage.Model.get -> TModel? +Microsoft.AspNetCore.Mvc.Razor.RazorPageBase.ViewBag.get -> dynamic! diff --git a/src/Mvc/Mvc.Razor/src/RazorPage.cs b/src/Mvc/Mvc.Razor/src/RazorPage.cs index e86b582879ee..b624d0d53f5c 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPage.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPage.cs @@ -18,12 +18,12 @@ public abstract class RazorPage : RazorPageBase private readonly HashSet _renderedSections = new HashSet(StringComparer.OrdinalIgnoreCase); private bool _renderedBody; private bool _ignoreBody; - private HashSet _ignoredSections; + private HashSet? _ignoredSections; /// /// An representing the current request execution. /// - public HttpContext Context => ViewContext?.HttpContext; + public HttpContext Context => ViewContext?.HttpContext!; /// /// In a Razor layout page, renders the portion of a content page that is not within a named section. @@ -98,7 +98,7 @@ public bool IsSectionDefined(string name) /// The method writes to the and the value returned is a token /// value that allows the Write (produced due to @RenderSection(..)) to succeed. However the /// value does not represent the rendered content. - public HtmlString RenderSection(string name) + public HtmlString? RenderSection(string name) { if (name == null) { @@ -117,7 +117,7 @@ public HtmlString RenderSection(string name) /// The method writes to the and the value returned is a token /// value that allows the Write (produced due to @RenderSection(..)) to succeed. However the /// value does not represent the rendered content. - public HtmlString RenderSection(string name, bool required) + public HtmlString? RenderSection(string name, bool required) { if (name == null) { @@ -140,7 +140,7 @@ public HtmlString RenderSection(string name, bool required) /// The method writes to the and the value returned is a token /// value that allows the Write (produced due to @RenderSection(..)) to succeed. However the /// value does not represent the rendered content. - public Task RenderSectionAsync(string name) + public Task RenderSectionAsync(string name) { if (name == null) { @@ -164,7 +164,7 @@ public Task RenderSectionAsync(string name) /// value does not represent the rendered content. /// if is true and the section /// was not registered using the @section in the Razor page. - public Task RenderSectionAsync(string name, bool required) + public Task RenderSectionAsync(string name, bool required) { if (name == null) { @@ -175,7 +175,7 @@ public Task RenderSectionAsync(string name, bool required) return RenderSectionAsyncCore(name, required); } - private async Task RenderSectionAsyncCore(string sectionName, bool required) + private async Task RenderSectionAsyncCore(string sectionName, bool required) { if (_renderedSections.Contains(sectionName)) { diff --git a/src/Mvc/Mvc.Razor/src/RazorPageActivator.cs b/src/Mvc/Mvc.Razor/src/RazorPageActivator.cs index 49eb5c05a978..f5ddb5343dd8 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPageActivator.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPageActivator.cs @@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; -using Microsoft.Extensions.Internal; namespace Microsoft.AspNetCore.Mvc.Razor { @@ -69,7 +68,7 @@ public void Activate(IRazorPage page, ViewContext context) internal RazorPagePropertyActivator GetOrAddCacheEntry(IRazorPage page) { var pageType = page.GetType(); - Type providedModelType = null; + Type? providedModelType = null; if (page is IModelTypeProvider modelTypeProvider) { providedModelType = modelTypeProvider.GetModelType(); @@ -105,7 +104,7 @@ internal RazorPagePropertyActivator GetOrAddCacheEntry(IRazorPage page) private readonly struct CacheKey : IEquatable { - public CacheKey(Type pageType, Type providedModelType) + public CacheKey(Type pageType, Type? providedModelType) { PageType = pageType; ProvidedModelType = providedModelType; @@ -113,7 +112,7 @@ public CacheKey(Type pageType, Type providedModelType) public Type PageType { get; } - public Type ProvidedModelType { get; } + public Type? ProvidedModelType { get; } public bool Equals(CacheKey other) { @@ -134,4 +133,4 @@ public override int GetHashCode() } } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Razor/src/RazorPageBase.cs b/src/Mvc/Mvc.Razor/src/RazorPageBase.cs index 034ba678065f..6016867fa122 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPageBase.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPageBase.cs @@ -29,19 +29,19 @@ namespace Microsoft.AspNetCore.Mvc.Razor public abstract class RazorPageBase : IRazorPage { private readonly Stack _textWriterStack = new Stack(); - private StringWriter _valueBuffer; - private ITagHelperFactory _tagHelperFactory; - private IViewBufferScope _bufferScope; - private TextWriter _pageWriter; + private StringWriter? _valueBuffer; + private ITagHelperFactory? _tagHelperFactory; + private IViewBufferScope? _bufferScope; + private TextWriter? _pageWriter; private AttributeInfo _attributeInfo; private TagHelperAttributeInfo _tagHelperAttributeInfo; - private IUrlHelper _urlHelper; + private IUrlHelper? _urlHelper; /// - public virtual ViewContext ViewContext { get; set; } + public virtual ViewContext ViewContext { get; set; } = default!; /// - public string Layout { get; set; } + public string? Layout { get; set; } /// /// Gets the that the page is writing output to. @@ -64,7 +64,7 @@ public virtual TextWriter Output } /// - public string Path { get; set; } + public string Path { get; set; } = default!; /// public IDictionary SectionWriters { get; } = @@ -73,40 +73,40 @@ public virtual TextWriter Output /// /// Gets the dynamic view data dictionary. /// - public dynamic ViewBag => ViewContext?.ViewBag; + public dynamic ViewBag => ViewContext?.ViewBag!; /// public bool IsLayoutBeingRendered { get; set; } /// - public IHtmlContent BodyContent { get; set; } + public IHtmlContent? BodyContent { get; set; } /// - public IDictionary PreviousSectionWriters { get; set; } + public IDictionary PreviousSectionWriters { get; set; } = default!; /// /// Gets or sets a instance used to instrument the page execution. /// [RazorInject] - public DiagnosticSource DiagnosticSource { get; set; } + public DiagnosticSource DiagnosticSource { get; set; } = default!; /// /// Gets the to use when this /// handles non- C# expressions. /// [RazorInject] - public HtmlEncoder HtmlEncoder { get; set; } + public HtmlEncoder HtmlEncoder { get; set; } = default!; /// /// Gets the of the current logged in user. /// - public virtual ClaimsPrincipal User => ViewContext?.HttpContext?.User; + public virtual ClaimsPrincipal User => ViewContext.HttpContext.User; /// /// Gets the from the . /// /// Returns null if is null. - public ITempDataDictionary TempData => ViewContext?.TempData; + public ITempDataDictionary TempData => ViewContext?.TempData!; private Stack TagHelperScopes { get; } = new Stack(); @@ -271,6 +271,8 @@ public string EndWriteTagHelperAttribute() throw new InvalidOperationException(Resources.RazorPage_ThereIsNoActiveWritingScopeToEnd); } + Debug.Assert(_valueBuffer is not null); + var content = _valueBuffer.ToString(); _valueBuffer.GetStringBuilder().Clear(); @@ -326,7 +328,7 @@ public virtual string Href(string contentPath) if (_urlHelper == null) { var viewContext = ViewContext; - var services = viewContext?.HttpContext.RequestServices; + var services = viewContext.HttpContext.RequestServices; var factory = services.GetRequiredService(); _urlHelper = factory.GetUrlHelper(viewContext); } @@ -342,7 +344,7 @@ public virtual string Href(string contentPath) /// The delegate to execute when rendering the section. /// This is a temporary placeholder method to support ASP.NET Core 2.0.0 editor code generation. [EditorBrowsable(EditorBrowsableState.Never)] - protected void DefineSection(string name, Func section) + protected void DefineSection(string name, Func section) => DefineSection(name, () => section(null /* writer */)); /// @@ -370,14 +372,13 @@ public virtual void DefineSection(string name, RenderAsyncDelegate section) SectionWriters[name] = section; } - /// /// Writes the specified with HTML encoding to . /// /// The to write. - public virtual void Write(object value) + public virtual void Write(object? value) { - if (value == null || value == HtmlString.Empty) + if (value is null || value == HtmlString.Empty) { return; } @@ -415,7 +416,7 @@ public virtual void Write(object value) /// Writes the specified with HTML encoding to . /// /// The to write. - public virtual void Write(string value) + public virtual void Write(string? value) { var writer = Output; var encoder = HtmlEncoder; @@ -432,9 +433,9 @@ public virtual void Write(string value) /// Writes the specified without HTML encoding to . /// /// The to write. - public virtual void WriteLiteral(object value) + public virtual void WriteLiteral(object? value) { - if (value == null) + if (value is null) { return; } @@ -446,7 +447,7 @@ public virtual void WriteLiteral(object value) /// Writes the specified without HTML encoding to . /// /// The to write. - public virtual void WriteLiteral(string value) + public virtual void WriteLiteral(string? value) { if (!string.IsNullOrEmpty(value)) { @@ -503,7 +504,7 @@ public virtual void BeginWriteAttribute( public void WriteAttributeValue( string prefix, int prefixOffset, - object value, + object? value, int valueOffset, int valueLength, bool isLiteral) @@ -586,9 +587,9 @@ public void BeginAddHtmlAttributeValues( /// The value length. /// Whether the attribute is a literal. public void AddHtmlAttributeValue( - string prefix, + string? prefix, int prefixOffset, - object value, + object? value, int valueOffset, int valueLength, bool isLiteral) @@ -687,7 +688,7 @@ public virtual async Task FlushAsync() } await Output.FlushAsync(); - await ViewContext?.HttpContext.Response.Body.FlushAsync(); + await ViewContext.HttpContext.Response.Body.FlushAsync(); return HtmlString.Empty; } @@ -708,23 +709,24 @@ public virtual HtmlString SetAntiforgeryCookieAndHeader() return HtmlString.Empty; } - private void WriteUnprefixedAttributeValue(object value, bool isLiteral) + private void WriteUnprefixedAttributeValue(object? value, bool isLiteral) { - var stringValue = value as string; - // The extra branching here is to ensure that we call the Write*To(string) overload where possible. - if (isLiteral && stringValue != null) + if (value is string stringValue) { - WriteLiteral(stringValue); + if (isLiteral) + { + WriteLiteral(stringValue); + } + else + { + Write(stringValue); + } } else if (isLiteral) { WriteLiteral(value); } - else if (stringValue != null) - { - Write(stringValue); - } else { Write(value); @@ -744,18 +746,18 @@ private void WritePositionTaggedLiteral(string value, int position) /// public abstract void EndContext(); - private bool IsBoolFalseOrNullValue(string prefix, object value) + private static bool IsBoolFalseOrNullValue(string? prefix, object? value) { return string.IsNullOrEmpty(prefix) && - (value == null || - (value is bool && !(bool)value)); + (value is null || + (value is bool boolValue && !boolValue)); } - private bool IsBoolTrueWithEmptyPrefixValue(string prefix, object value) + private static bool IsBoolTrueWithEmptyPrefixValue(string? prefix, object? value) { // If the value is just the bool 'true', use the attribute name as the value. return string.IsNullOrEmpty(prefix) && - (value is bool && (bool)value); + (value is bool boolValue && boolValue); } /// diff --git a/src/Mvc/Mvc.Razor/src/RazorPageFactoryResult.cs b/src/Mvc/Mvc.Razor/src/RazorPageFactoryResult.cs index 45537550f7c4..4eaf8ced7e0c 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPageFactoryResult.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPageFactoryResult.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.Mvc.Razor.Compilation; namespace Microsoft.AspNetCore.Mvc.Razor @@ -19,7 +20,7 @@ public readonly struct RazorPageFactoryResult /// The . public RazorPageFactoryResult( CompiledViewDescriptor viewDescriptor, - Func razorPageFactory) + Func? razorPageFactory) { ViewDescriptor = viewDescriptor ?? throw new ArgumentNullException(nameof(viewDescriptor)); RazorPageFactory = razorPageFactory; @@ -29,16 +30,17 @@ public RazorPageFactoryResult( /// The factory. /// /// This property is null when is false. - public Func RazorPageFactory { get; } + public Func? RazorPageFactory { get; } /// /// Gets the . /// - public CompiledViewDescriptor ViewDescriptor { get; } + public CompiledViewDescriptor? ViewDescriptor { get; } /// /// Gets a value that determines if the page was successfully located. /// + [MemberNotNullWhen(true, nameof(RazorPageFactory))] public bool Success => RazorPageFactory != null; } } diff --git a/src/Mvc/Mvc.Razor/src/RazorPageOfT.cs b/src/Mvc/Mvc.Razor/src/RazorPageOfT.cs index 923cf1352571..e8598db13815 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPageOfT.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPageOfT.cs @@ -15,13 +15,13 @@ public abstract class RazorPage : RazorPage /// /// Gets the Model property of the property. /// - public TModel Model => ViewData == null ? default(TModel) : ViewData.Model; + public TModel? Model => ViewData == null ? default(TModel) : ViewData.Model; /// /// Gets or sets the dictionary for view data. /// [RazorInject] - public ViewDataDictionary ViewData { get; set; } + public ViewDataDictionary ViewData { get; set; } = default!; } } diff --git a/src/Mvc/Mvc.Razor/src/RazorPagePropertyActivator.cs b/src/Mvc/Mvc.Razor/src/RazorPagePropertyActivator.cs index b96908621cc6..e657441abc9c 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPagePropertyActivator.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPagePropertyActivator.cs @@ -24,7 +24,7 @@ internal class RazorPagePropertyActivator public RazorPagePropertyActivator( Type pageType, - Type declaredModelType, + Type? declaredModelType, IModelMetadataProvider metadataProvider, PropertyValueAccessors propertyValueAccessors) { @@ -33,12 +33,9 @@ public RazorPagePropertyActivator( // In the absence of a model on the current type, we'll attempt to use ViewDataDictionary on the current type. var viewDataDictionaryModelType = declaredModelType ?? typeof(object); - if (viewDataDictionaryModelType != null) - { - _viewDataDictionaryType = typeof(ViewDataDictionary<>).MakeGenericType(viewDataDictionaryModelType); - _rootFactory = ViewDataDictionaryFactory.CreateFactory(viewDataDictionaryModelType); - _nestedFactory = ViewDataDictionaryFactory.CreateNestedFactory(viewDataDictionaryModelType); - } + _viewDataDictionaryType = typeof(ViewDataDictionary<>).MakeGenericType(viewDataDictionaryModelType); + _rootFactory = ViewDataDictionaryFactory.CreateFactory(viewDataDictionaryModelType); + _nestedFactory = ViewDataDictionaryFactory.CreateNestedFactory(viewDataDictionaryModelType); _propertyActivators = PropertyActivator.GetPropertiesToActivate( pageType, @@ -54,11 +51,7 @@ public void Activate(object page, ViewContext context) throw new ArgumentNullException(nameof(context)); } - if (_viewDataDictionaryType != null) - { - context.ViewData = CreateViewDataDictionary(context); - } - + context.ViewData = CreateViewDataDictionary(context); for (var i = 0; i < _propertyActivators.Length; i++) { var activateInfo = _propertyActivators[i]; @@ -137,15 +130,15 @@ private static PropertyActivator CreateActivateInfo( public class PropertyValueAccessors { - public Func UrlHelperAccessor { get; set; } + public Func UrlHelperAccessor { get; init; } = default!; - public Func JsonHelperAccessor { get; set; } + public Func JsonHelperAccessor { get; init; } = default!; - public Func DiagnosticSourceAccessor { get; set; } + public Func DiagnosticSourceAccessor { get; init; } = default!; - public Func HtmlEncoderAccessor { get; set; } + public Func HtmlEncoderAccessor { get; init; } = default!; - public Func ModelExpressionProviderAccessor { get; set; } + public Func ModelExpressionProviderAccessor { get; init; } = default!; } } } diff --git a/src/Mvc/Mvc.Razor/src/RazorPageResult.cs b/src/Mvc/Mvc.Razor/src/RazorPageResult.cs index 044e3ee581f6..c84bcc1061cd 100644 --- a/src/Mvc/Mvc.Razor/src/RazorPageResult.cs +++ b/src/Mvc/Mvc.Razor/src/RazorPageResult.cs @@ -64,12 +64,12 @@ public RazorPageResult(string name, IEnumerable searchedLocations) /// Gets the if found. /// /// This property is null if the page was not found. - public IRazorPage Page { get; } + public IRazorPage? Page { get; } /// /// Gets the locations that were searched when could not be found. /// /// This property is null if the page was found. - public IEnumerable SearchedLocations { get; } + public IEnumerable? SearchedLocations { get; } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Razor/src/RazorView.cs b/src/Mvc/Mvc.Razor/src/RazorView.cs index 61d3c17e3fef..b9c7de4fbe7b 100644 --- a/src/Mvc/Mvc.Razor/src/RazorView.cs +++ b/src/Mvc/Mvc.Razor/src/RazorView.cs @@ -24,7 +24,7 @@ public class RazorView : IView private readonly IRazorPageActivator _pageActivator; private readonly HtmlEncoder _htmlEncoder; private readonly DiagnosticListener _diagnosticListener; - private IViewBufferScope _bufferScope; + private IViewBufferScope? _bufferScope; /// /// Initializes a new instance of @@ -95,7 +95,7 @@ public RazorView( /// public IReadOnlyList ViewStartPages { get; } - internal Action OnAfterPageActivated { get; set; } + internal Action? OnAfterPageActivated { get; set; } /// public virtual async Task RenderAsync(ViewContext context) @@ -184,7 +184,7 @@ private async Task RenderPageCoreAsync(IRazorPage page, ViewContext context) private async Task RenderViewStartsAsync(ViewContext context) { - string layout = null; + string? layout = null; var oldFilePath = context.ExecutingFilePath; try { @@ -286,7 +286,7 @@ private async Task RenderLayoutAsync( { // This means we're writing to a 'real' writer, probably to the actual output stream. // We're using PagedBufferedTextWriter here to 'smooth' synchronous writes of IHtmlContent values. - await using (var writer = _bufferScope.CreateWriter(context.Writer)) + await using (var writer = _bufferScope!.CreateWriter(context.Writer)) { await bodyWriter.Buffer.WriteToAsync(writer, _htmlEncoder); await writer.FlushAsync(); @@ -305,8 +305,10 @@ private IRazorPage GetLayoutPage(ViewContext context, string executingFilePath, if (layoutPageResult.Page == null) { + Debug.Assert(originalLocations is not null && layoutPageResult.SearchedLocations is not null); + var locations = string.Empty; - if (originalLocations.Any()) + if (originalLocations!.Any()) { locations = Environment.NewLine + string.Join(Environment.NewLine, originalLocations); } diff --git a/src/Mvc/Mvc.Razor/src/RazorViewEngine.cs b/src/Mvc/Mvc.Razor/src/RazorViewEngine.cs index 34f3e8c0dddd..da8d5a4b68e0 100644 --- a/src/Mvc/Mvc.Razor/src/RazorViewEngine.cs +++ b/src/Mvc/Mvc.Razor/src/RazorViewEngine.cs @@ -97,7 +97,7 @@ public RazorViewEngine( /// to get route values /// produces consistently cased results. /// - public static string GetNormalizedRouteValue(ActionContext context, string key) + public static string? GetNormalizedRouteValue(ActionContext context, string key) => NormalizedRouteValue.GetNormalizedRouteValue(context, key); /// @@ -127,7 +127,7 @@ public RazorPageResult FindPage(ActionContext context, string pageName) } else { - return new RazorPageResult(pageName, cacheResult.SearchedLocations); + return new RazorPageResult(pageName, cacheResult.SearchedLocations!); } } @@ -153,7 +153,7 @@ public RazorPageResult GetPage(string executingFilePath, string pagePath) } else { - return new RazorPageResult(pagePath, cacheResult.SearchedLocations); + return new RazorPageResult(pagePath, cacheResult.SearchedLocations!); } } @@ -181,7 +181,7 @@ public ViewEngineResult FindView(ActionContext context, string viewName, bool is } /// - public ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage) + public ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage) { if (string.IsNullOrEmpty(viewPath)) { @@ -198,11 +198,11 @@ public ViewEngineResult GetView(string executingFilePath, string viewPath, bool return CreateViewEngineResult(cacheResult, viewPath); } - private ViewLocationCacheResult LocatePageFromPath(string executingFilePath, string pagePath, bool isMainPage) + private ViewLocationCacheResult LocatePageFromPath(string? executingFilePath, string pagePath, bool isMainPage) { - var applicationRelativePath = GetAbsolutePath(executingFilePath, pagePath); + var applicationRelativePath = GetAbsolutePath(executingFilePath, pagePath)!; var cacheKey = new ViewLocationCacheKey(applicationRelativePath, isMainPage); - if (!ViewLookupCache.TryGetValue(cacheKey, out ViewLocationCacheResult cacheResult)) + if (!ViewLookupCache.TryGetValue(cacheKey, out ViewLocationCacheResult? cacheResult)) { var expirationTokens = new HashSet(); cacheResult = CreateCacheResult(expirationTokens, applicationRelativePath, isMainPage); @@ -226,7 +226,7 @@ private ViewLocationCacheResult LocatePageFromPath(string executingFilePath, str cacheEntryOptions); } - return cacheResult; + return cacheResult!; } private ViewLocationCacheResult LocatePageFromViewLocations( @@ -236,7 +236,7 @@ private ViewLocationCacheResult LocatePageFromViewLocations( { var controllerName = GetNormalizedRouteValue(actionContext, ControllerKey); var areaName = GetNormalizedRouteValue(actionContext, AreaKey); - string razorPageName = null; + string? razorPageName = null; if (actionContext.ActionDescriptor.RouteValues.ContainsKey(PageKey)) { // Only calculate the Razor Page name if "page" is registered in RouteValues. @@ -250,14 +250,14 @@ private ViewLocationCacheResult LocatePageFromViewLocations( areaName, razorPageName, isMainPage); - Dictionary expanderValues = null; + Dictionary? expanderValues = null; var expanders = _options.ViewLocationExpanders; // Read interface .Count once rather than per iteration var expandersCount = expanders.Count; if (expandersCount > 0) { - expanderValues = new Dictionary(StringComparer.Ordinal); + expanderValues = new Dictionary(StringComparer.Ordinal); expanderContext.Values = expanderValues; // Perf: Avoid allocations @@ -289,7 +289,7 @@ private ViewLocationCacheResult LocatePageFromViewLocations( } /// - public string GetAbsolutePath(string executingFilePath, string pagePath) + public string? GetAbsolutePath(string? executingFilePath, string? pagePath) { if (string.IsNullOrEmpty(pagePath)) { @@ -364,7 +364,7 @@ private ViewLocationCacheResult OnCacheMiss( viewLocations = expanders[i].ExpandViewLocations(expanderContext, viewLocations); } - ViewLocationCacheResult cacheResult = null; + ViewLocationCacheResult? cacheResult = null; var searchedLocations = new List(); var expirationTokens = new HashSet(); foreach (var location in viewLocations) @@ -404,7 +404,7 @@ private ViewLocationCacheResult OnCacheMiss( } // Internal for unit testing - internal ViewLocationCacheResult CreateCacheResult( + internal ViewLocationCacheResult? CreateCacheResult( HashSet expirationTokens, string relativePath, bool isMainPage) @@ -426,7 +426,7 @@ internal ViewLocationCacheResult CreateCacheResult( { // Only need to lookup _ViewStarts for the main page. var viewStartPages = isMainPage ? - GetViewStartPages(viewDescriptor.RelativePath, expirationTokens) : + GetViewStartPages(viewDescriptor!.RelativePath, expirationTokens) : Array.Empty(); return new ViewLocationCacheResult( @@ -471,12 +471,12 @@ private ViewEngineResult CreateViewEngineResult(ViewLocationCacheResult result, { if (!result.Success) { - return ViewEngineResult.NotFound(viewName, result.SearchedLocations); + return ViewEngineResult.NotFound(viewName, result.SearchedLocations!); } var page = result.ViewEntry.PageFactory(); - var viewStarts = new IRazorPage[result.ViewStartEntries.Count]; + var viewStarts = new IRazorPage[result.ViewStartEntries!.Count]; for (var i = 0; i < viewStarts.Length; i++) { var viewStartItem = result.ViewStartEntries[i]; diff --git a/src/Mvc/Mvc.Razor/src/TagHelpers/TagHelperComponentTagHelper.cs b/src/Mvc/Mvc.Razor/src/TagHelpers/TagHelperComponentTagHelper.cs index e3df1d85a71b..7a467e8128fa 100644 --- a/src/Mvc/Mvc.Razor/src/TagHelpers/TagHelperComponentTagHelper.cs +++ b/src/Mvc/Mvc.Razor/src/TagHelpers/TagHelperComponentTagHelper.cs @@ -54,14 +54,14 @@ public TagHelperComponentTagHelper( /// Activates the property of all the . /// [HtmlAttributeNotBound] - public ITagHelperComponentPropertyActivator PropertyActivator { get; set; } + public ITagHelperComponentPropertyActivator PropertyActivator { get; set; } = default!; /// /// The . /// [ViewContext] [HtmlAttributeNotBound] - public ViewContext ViewContext { get; set; } + public ViewContext ViewContext { get; set; } = default!; /// public override void Init(TagHelperContext context) @@ -78,7 +78,7 @@ public override void Init(TagHelperContext context) component.Init(context); if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.TagHelperComponentInitialized(component.GetType().FullName); + _logger.TagHelperComponentInitialized(component.GetType().FullName!); } } } @@ -91,7 +91,7 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu await component.ProcessAsync(context, output); if (_logger.IsEnabled(LogLevel.Debug)) { - _logger.TagHelperComponentProcessed(component.GetType().FullName); + _logger.TagHelperComponentProcessed(component.GetType().FullName!); } } } diff --git a/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs b/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs index 7bcda54a9627..b3cbce85787b 100644 --- a/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs +++ b/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs @@ -3,9 +3,8 @@ using System; using System.Collections.Generic; -using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Reflection; using System.Text.Encodings.Web; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Mvc.Rendering; @@ -112,7 +111,7 @@ public UrlResolutionTagHelper(IUrlHelperFactory urlHelperFactory, HtmlEncoder ht /// [HtmlAttributeNotBound] [ViewContext] - public ViewContext ViewContext { get; set; } + public ViewContext ViewContext { get; set; } = default!; /// public override void Process(TagHelperContext context, TagHelperOutput output) @@ -132,8 +131,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output) return; } - string[] attributeNames; - if (ElementAttributeLookups.TryGetValue(output.TagName, out attributeNames)) + if (ElementAttributeLookups.TryGetValue(output.TagName, out var attributeNames)) { for (var i = 0; i < attributeNames.Length; i++) { @@ -178,8 +176,7 @@ protected void ProcessUrlAttribute(string attributeName, TagHelperOutput output) var stringValue = attribute.Value as string; if (stringValue != null) { - string resolvedUrl; - if (TryResolveUrl(stringValue, resolvedUrl: out resolvedUrl)) + if (TryResolveUrl(stringValue, resolvedUrl: out string? resolvedUrl)) { attributes[i] = new TagHelperAttribute( attribute.Name, @@ -207,8 +204,7 @@ protected void ProcessUrlAttribute(string attributeName, TagHelperOutput output) } } - IHtmlContent resolvedUrl; - if (TryResolveUrl(stringValue, resolvedUrl: out resolvedUrl)) + if (TryResolveUrl(stringValue, resolvedUrl: out IHtmlContent? resolvedUrl)) { attributes[i] = new TagHelperAttribute( attribute.Name, @@ -235,7 +231,7 @@ protected void ProcessUrlAttribute(string attributeName, TagHelperOutput output) /// Absolute URL beginning with the application's virtual root. null if /// could not be resolved. /// true if the could be resolved; false otherwise. - protected bool TryResolveUrl(string url, out string resolvedUrl) + protected bool TryResolveUrl(string url, out string? resolvedUrl) { resolvedUrl = null; var start = FindRelativeStart(url); @@ -261,7 +257,7 @@ protected bool TryResolveUrl(string url, out string resolvedUrl) /// not be resolved. /// /// true if the could be resolved; false otherwise. - protected bool TryResolveUrl(string url, out IHtmlContent resolvedUrl) + protected bool TryResolveUrl(string url, [NotNullWhen(true)] out IHtmlContent? resolvedUrl) { resolvedUrl = null; var start = FindRelativeStart(url); diff --git a/src/Mvc/Mvc.Razor/src/ViewLocationCacheKey.cs b/src/Mvc/Mvc.Razor/src/ViewLocationCacheKey.cs index 140b55ba9e69..60e3d692f6a8 100644 --- a/src/Mvc/Mvc.Razor/src/ViewLocationCacheKey.cs +++ b/src/Mvc/Mvc.Razor/src/ViewLocationCacheKey.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.Extensions.Internal; namespace Microsoft.AspNetCore.Mvc.Razor { @@ -41,11 +40,11 @@ public ViewLocationCacheKey( /// Values from instances. public ViewLocationCacheKey( string viewName, - string controllerName, - string areaName, - string pageName, + string? controllerName, + string? areaName, + string? pageName, bool isMainPage, - IReadOnlyDictionary values) + IReadOnlyDictionary? values) { ViewName = viewName; ControllerName = controllerName; @@ -63,17 +62,17 @@ public ViewLocationCacheKey( /// /// Gets the controller name. /// - public string ControllerName { get; } + public string? ControllerName { get; } /// /// Gets the area name. /// - public string AreaName { get; } + public string? AreaName { get; } /// /// Gets the page name. /// - public string PageName { get; } + public string? PageName { get; } /// /// Determines if the page being found is the main page for an action. @@ -83,7 +82,7 @@ public ViewLocationCacheKey( /// /// Gets the values populated by instances. /// - public IReadOnlyDictionary ViewLocationExpanderValues { get; } + public IReadOnlyDictionary? ViewLocationExpanderValues { get; } /// public bool Equals(ViewLocationCacheKey y) @@ -122,14 +121,9 @@ public bool Equals(ViewLocationCacheKey y) } /// - public override bool Equals(object obj) + public override bool Equals(object? obj) { - if (obj is ViewLocationCacheKey) - { - return Equals((ViewLocationCacheKey)obj); - } - - return false; + return obj is ViewLocationCacheKey cacheKey && Equals(cacheKey); } /// diff --git a/src/Mvc/Mvc.Razor/src/ViewLocationCacheResult.cs b/src/Mvc/Mvc.Razor/src/ViewLocationCacheResult.cs index 2b72934aa36e..0df8b2ecebaa 100644 --- a/src/Mvc/Mvc.Razor/src/ViewLocationCacheResult.cs +++ b/src/Mvc/Mvc.Razor/src/ViewLocationCacheResult.cs @@ -49,14 +49,14 @@ public ViewLocationCacheResult(IEnumerable searchedLocations) /// /// for the located view. /// - /// null if is false. + /// Uninitialized when is false. public ViewLocationCacheItem ViewEntry { get; } /// /// s for applicable _ViewStarts. /// /// null if is false. - public IReadOnlyList ViewStartEntries { get; } + public IReadOnlyList? ViewStartEntries { get; } /// /// The sequence of locations that were searched. @@ -66,7 +66,7 @@ public ViewLocationCacheResult(IEnumerable searchedLocations) /// a view at . When is false, this includes /// all search paths. /// - public IEnumerable SearchedLocations { get; } + public IEnumerable? SearchedLocations { get; } /// /// Gets a value that indicates whether the view was successfully found. diff --git a/src/Mvc/Mvc.Razor/src/ViewLocationExpanderContext.cs b/src/Mvc/Mvc.Razor/src/ViewLocationExpanderContext.cs index 0ecc042ed39c..3c51029774a4 100644 --- a/src/Mvc/Mvc.Razor/src/ViewLocationExpanderContext.cs +++ b/src/Mvc/Mvc.Razor/src/ViewLocationExpanderContext.cs @@ -23,9 +23,9 @@ public class ViewLocationExpanderContext public ViewLocationExpanderContext( ActionContext actionContext, string viewName, - string controllerName, - string areaName, - string pageName, + string? controllerName, + string? areaName, + string? pageName, bool isMainPage) { if (actionContext == null) @@ -59,18 +59,18 @@ public ViewLocationExpanderContext( /// /// Gets the controller name. /// - public string ControllerName { get; } + public string? ControllerName { get; } /// /// Gets the page name. This will be the value of the page route value when rendering a Page from the /// Razor Pages framework. This value will be null if rendering a view as the result of a controller. /// - public string PageName { get; } + public string? PageName { get; } /// /// Gets the area name. /// - public string AreaName { get; } + public string? AreaName { get; } /// /// Determines if the page being found is the main page for an action. @@ -81,6 +81,6 @@ public ViewLocationExpanderContext( /// Gets or sets the that is populated with values as part of /// . /// - public IDictionary Values { get; set; } + public IDictionary Values { get; set; } = default!; } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.RazorPages/src/Infrastructure/CompiledPageActionDescriptorFactory.cs b/src/Mvc/Mvc.RazorPages/src/Infrastructure/CompiledPageActionDescriptorFactory.cs index d49ae94631ae..fff30b97f5ef 100644 --- a/src/Mvc/Mvc.RazorPages/src/Infrastructure/CompiledPageActionDescriptorFactory.cs +++ b/src/Mvc/Mvc.RazorPages/src/Infrastructure/CompiledPageActionDescriptorFactory.cs @@ -35,7 +35,7 @@ public CompiledPageActionDescriptor CreateCompiledDescriptor( PageActionDescriptor actionDescriptor, CompiledViewDescriptor viewDescriptor) { - var context = new PageApplicationModelProviderContext(actionDescriptor, viewDescriptor.Type.GetTypeInfo()); + var context = new PageApplicationModelProviderContext(actionDescriptor, viewDescriptor.Type!.GetTypeInfo()); for (var i = 0; i < _applicationModelProviders.Length; i++) { _applicationModelProviders[i].OnProvidersExecuting(context); diff --git a/src/Mvc/Mvc.ViewFeatures/src/AntiforgeryExtensions.cs b/src/Mvc/Mvc.ViewFeatures/src/AntiforgeryExtensions.cs index 6faa76a80523..43b1c7cc1cc3 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/AntiforgeryExtensions.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/AntiforgeryExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.IO; using System.Text.Encodings.Web; @@ -52,7 +54,7 @@ private class InputContent : IHtmlContent public InputContent(AntiforgeryTokenSet tokenSet) { _fieldName = tokenSet.FormFieldName; - _requestToken = tokenSet.RequestToken; + _requestToken = tokenSet.RequestToken!; } // Though _requestToken normally contains only US-ASCII letters, numbers, '-', and '_', must assume the diff --git a/src/Mvc/Mvc.ViewFeatures/src/AttributeDictionary.cs b/src/Mvc/Mvc.ViewFeatures/src/AttributeDictionary.cs index 0c55c80a4e6f..81ab80177a5b 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/AttributeDictionary.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/AttributeDictionary.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections; using System.Collections.Generic; @@ -11,12 +13,12 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures /// /// A dictionary for HTML attributes. /// - public class AttributeDictionary : IDictionary, IReadOnlyDictionary + public class AttributeDictionary : IDictionary, IReadOnlyDictionary { - private List> _items; + private List>? _items; /// - public string this[string key] + public string? this[string key] { get { @@ -43,7 +45,7 @@ public string this[string key] throw new ArgumentNullException(nameof(key)); } - var item = new KeyValuePair(key, value); + var item = new KeyValuePair(key, value); var index = Find(key); if (index < 0) { @@ -66,41 +68,41 @@ public string this[string key] public ICollection Keys => new KeyCollection(this); /// - public ICollection Values => new ValueCollection(this); + public ICollection Values => new ValueCollection(this); /// - IEnumerable IReadOnlyDictionary.Keys => new KeyCollection(this); + IEnumerable IReadOnlyDictionary.Keys => new KeyCollection(this); /// - IEnumerable IReadOnlyDictionary.Values => new ValueCollection(this); + IEnumerable IReadOnlyDictionary.Values => new ValueCollection(this); - private KeyValuePair Get(int index) + private KeyValuePair Get(int index) { - Debug.Assert(index >= 0 && index < Count); + Debug.Assert(index >= 0 && index < Count && _items != null); return _items[index]; } - private void Set(int index, KeyValuePair value) + private void Set(int index, KeyValuePair value) { Debug.Assert(index >= 0 && index <= Count); Debug.Assert(value.Key != null); if (_items == null) { - _items = new List>(); + _items = new List>(); } _items[index] = value; } - private void Insert(int index, KeyValuePair value) + private void Insert(int index, KeyValuePair value) { Debug.Assert(index >= 0 && index <= Count); Debug.Assert(value.Key != null); if (_items == null) { - _items = new List>(); + _items = new List>(); } _items.Insert(index, value); @@ -110,6 +112,7 @@ private void Remove(int index) { Debug.Assert(index >= 0 && index < Count); + Debug.Assert(_items != null); _items.RemoveAt(index); } @@ -160,14 +163,14 @@ public void Clear() } /// - public void Add(KeyValuePair item) + public void Add(KeyValuePair item) { if (item.Key == null) { throw new ArgumentException( Resources.FormatPropertyOfTypeCannotBeNull( - nameof(KeyValuePair.Key), - nameof(KeyValuePair)), + nameof(KeyValuePair.Key), + nameof(KeyValuePair)), nameof(item)); } @@ -183,25 +186,25 @@ public void Add(KeyValuePair item) } /// - public void Add(string key, string value) + public void Add(string key, string? value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - Add(new KeyValuePair(key, value)); + Add(new KeyValuePair(key, value)); } /// - public bool Contains(KeyValuePair item) + public bool Contains(KeyValuePair item) { if (item.Key == null) { throw new ArgumentException( Resources.FormatPropertyOfTypeCannotBeNull( - nameof(KeyValuePair.Key), - nameof(KeyValuePair)), + nameof(KeyValuePair.Key), + nameof(KeyValuePair)), nameof(item)); } @@ -233,7 +236,7 @@ public bool ContainsKey(string key) } /// - public void CopyTo(KeyValuePair[] array, int arrayIndex) + public void CopyTo(KeyValuePair[] array, int arrayIndex) { if (array == null) { @@ -258,14 +261,14 @@ public Enumerator GetEnumerator() } /// - public bool Remove(KeyValuePair item) + public bool Remove(KeyValuePair item) { if (item.Key == null) { throw new ArgumentException( Resources.FormatPropertyOfTypeCannotBeNull( - nameof(KeyValuePair.Key), - nameof(KeyValuePair)), + nameof(KeyValuePair.Key), + nameof(KeyValuePair)), nameof(item)); } @@ -306,7 +309,7 @@ public bool Remove(string key) } /// - public bool TryGetValue(string key, out string value) + public bool TryGetValue(string key, out string? value) { if (key == null) { @@ -333,7 +336,7 @@ IEnumerator IEnumerable.GetEnumerator() } /// - IEnumerator> IEnumerable>.GetEnumerator() + IEnumerator> IEnumerable>.GetEnumerator() { return GetEnumerator(); } @@ -341,7 +344,7 @@ IEnumerator> IEnumerable /// An enumerator for . /// - public struct Enumerator : IEnumerator> + public struct Enumerator : IEnumerator> { private readonly AttributeDictionary _attributes; @@ -359,7 +362,7 @@ public Enumerator(AttributeDictionary attributes) } /// - public KeyValuePair Current => _attributes.Get(_index); + public KeyValuePair Current => _attributes.Get(_index); /// object IEnumerator.Current => Current; @@ -462,7 +465,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } - public struct Enumerator : IEnumerator + public struct Enumerator : IEnumerator { private readonly AttributeDictionary _attributes; @@ -496,7 +499,7 @@ public void Reset() } } - private class ValueCollection : ICollection + private class ValueCollection : ICollection { private readonly AttributeDictionary _attributes; @@ -509,7 +512,7 @@ public ValueCollection(AttributeDictionary attributes) public bool IsReadOnly => true; - public void Add(string item) + public void Add(string? item) { throw new NotSupportedException(); } @@ -519,7 +522,7 @@ public void Clear() throw new NotSupportedException(); } - public bool Contains(string item) + public bool Contains(string? item) { for (var i = 0; i < _attributes.Count; i++) { @@ -532,7 +535,7 @@ public bool Contains(string item) return false; } - public void CopyTo(string[] array, int arrayIndex) + public void CopyTo(string?[] array, int arrayIndex) { if (array == null) { @@ -555,12 +558,12 @@ public Enumerator GetEnumerator() return new Enumerator(_attributes); } - public bool Remove(string item) + public bool Remove(string? item) { throw new NotSupportedException(); } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } @@ -570,7 +573,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } - public struct Enumerator : IEnumerator + public struct Enumerator : IEnumerator { private readonly AttributeDictionary _attributes; @@ -583,9 +586,9 @@ public Enumerator(AttributeDictionary attributes) _index = -1; } - public string Current => _attributes.Get(_index).Key; + public string? Current => _attributes.Get(_index).Value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() { diff --git a/src/Mvc/Mvc.ViewFeatures/src/AutoValidateAntiforgeryTokenAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/AutoValidateAntiforgeryTokenAttribute.cs index 8fc67240748d..1f3027ade676 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/AutoValidateAntiforgeryTokenAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/AutoValidateAntiforgeryTokenAttribute.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ViewFeatures.Filters; diff --git a/src/Mvc/Mvc.ViewFeatures/src/Controller.cs b/src/Mvc/Mvc.ViewFeatures/src/Controller.cs index 0171f04797f5..41d43bd598eb 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Controller.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/Controller.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Text.Json; using System.Threading.Tasks; @@ -16,9 +18,9 @@ namespace Microsoft.AspNetCore.Mvc /// public abstract class Controller : ControllerBase, IActionFilter, IAsyncActionFilter, IDisposable { - private ITempDataDictionary _tempData; - private DynamicViewData _viewBag; - private ViewDataDictionary _viewData; + private ITempDataDictionary? _tempData; + private DynamicViewData? _viewBag; + private ViewDataDictionary? _viewData; /// /// Gets or sets used by and . @@ -46,7 +48,7 @@ public ViewDataDictionary ViewData _viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), ControllerContext.ModelState); } - return _viewData; + return _viewData!; } set { @@ -72,7 +74,7 @@ public ITempDataDictionary TempData _tempData = factory?.GetTempData(HttpContext); } - return _tempData; + return _tempData!; } set { @@ -117,7 +119,7 @@ public virtual ViewResult View() /// The name or path of the view that is rendered to the response. /// The created object for the response. [NonAction] - public virtual ViewResult View(string viewName) + public virtual ViewResult View(string? viewName) { return View(viewName, model: ViewData.Model); } @@ -129,7 +131,7 @@ public virtual ViewResult View(string viewName) /// The model that is rendered by the view. /// The created object for the response. [NonAction] - public virtual ViewResult View(object model) + public virtual ViewResult View(object? model) { return View(viewName: null, model: model); } @@ -142,7 +144,7 @@ public virtual ViewResult View(object model) /// The model that is rendered by the view. /// The created object for the response. [NonAction] - public virtual ViewResult View(string viewName, object model) + public virtual ViewResult View(string? viewName, object? model) { ViewData.Model = model; @@ -170,7 +172,7 @@ public virtual PartialViewResult PartialView() /// The name or path of the partial view that is rendered to the response. /// The created object for the response. [NonAction] - public virtual PartialViewResult PartialView(string viewName) + public virtual PartialViewResult PartialView(string? viewName) { return PartialView(viewName, model: ViewData.Model); } @@ -182,7 +184,7 @@ public virtual PartialViewResult PartialView(string viewName) /// The model that is rendered by the partial view. /// The created object for the response. [NonAction] - public virtual PartialViewResult PartialView(object model) + public virtual PartialViewResult PartialView(object? model) { return PartialView(viewName: null, model: model); } @@ -195,7 +197,7 @@ public virtual PartialViewResult PartialView(object model) /// The model that is rendered by the partial view. /// The created object for the response. [NonAction] - public virtual PartialViewResult PartialView(string viewName, object model) + public virtual PartialViewResult PartialView(string? viewName, object? model) { ViewData.Model = model; @@ -247,7 +249,7 @@ public virtual ViewComponentResult ViewComponent(Type componentType) /// /// The created object for the response. [NonAction] - public virtual ViewComponentResult ViewComponent(string componentName, object arguments) + public virtual ViewComponentResult ViewComponent(string componentName, object? arguments) { return new ViewComponentResult { @@ -270,7 +272,7 @@ public virtual ViewComponentResult ViewComponent(string componentName, object ar /// /// The created object for the response. [NonAction] - public virtual ViewComponentResult ViewComponent(Type componentType, object arguments) + public virtual ViewComponentResult ViewComponent(Type componentType, object? arguments) { return new ViewComponentResult { @@ -289,7 +291,7 @@ public virtual ViewComponentResult ViewComponent(Type componentType, object argu /// The created that serializes the specified /// to JSON format for the response. [NonAction] - public virtual JsonResult Json(object data) + public virtual JsonResult Json(object? data) { return new JsonResult(data); } @@ -312,7 +314,7 @@ public virtual JsonResult Json(object data) /// Callers should cache an instance of serializer settings to avoid /// recreating cached data with each call. [NonAction] - public virtual JsonResult Json(object data, object serializerSettings) + public virtual JsonResult Json(object? data, object? serializerSettings) { return new JsonResult(data, serializerSettings); } diff --git a/src/Mvc/Mvc.ViewFeatures/src/ITempDataDictionary.cs b/src/Mvc/Mvc.ViewFeatures/src/ITempDataDictionary.cs index 3b40c43407c6..62fde7dd865a 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ITempDataDictionary.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ITempDataDictionary.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System.Collections.Generic; namespace Microsoft.AspNetCore.Mvc.ViewFeatures @@ -8,7 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures /// /// Represents a set of data that persists only from one request to the next. /// - public interface ITempDataDictionary : IDictionary + public interface ITempDataDictionary : IDictionary { /// /// Loads the dictionary by using the registered . @@ -37,6 +39,6 @@ public interface ITempDataDictionary : IDictionary /// /// The key of the element to return. /// An object that contains the element that is associated with the specified key. - object Peek(string key); + object? Peek(string key); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/ITempDataProvider.cs b/src/Mvc/Mvc.ViewFeatures/src/ITempDataProvider.cs index 2ebfa3eb9653..97edc9961724 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ITempDataProvider.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ITempDataProvider.cs @@ -25,4 +25,4 @@ public interface ITempDataProvider /// The values to save. void SaveTempData(HttpContext context, IDictionary values); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/IViewComponentHelper.cs b/src/Mvc/Mvc.ViewFeatures/src/IViewComponentHelper.cs index 60c2552ebc88..0ff77593354f 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/IViewComponentHelper.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/IViewComponentHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; @@ -23,7 +25,7 @@ public interface IViewComponentHelper /// /// A that on completion returns the rendered . /// - Task InvokeAsync(string name, object arguments); + Task InvokeAsync(string name, object? arguments); /// /// Invokes a view component of type . @@ -36,6 +38,6 @@ public interface IViewComponentHelper /// /// A that on completion returns the rendered . /// - Task InvokeAsync(Type componentType, object arguments); + Task InvokeAsync(Type componentType, object? arguments); } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/MvcViewOptions.cs b/src/Mvc/Mvc.ViewFeatures/src/MvcViewOptions.cs index 887fc3397d63..57127225f018 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/MvcViewOptions.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/MvcViewOptions.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections; using System.Collections.Generic; diff --git a/src/Mvc/Mvc.ViewFeatures/src/PageRemoteAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/PageRemoteAttribute.cs index 9d8978c9be5d..8bedbdaf5e86 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PageRemoteAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/PageRemoteAttribute.cs @@ -1,6 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Routing; @@ -24,7 +26,7 @@ public class PageRemoteAttribute : RemoteAttributeBase /// /// If not set the ambient value will be used when generating the URL. /// - public string PageHandler { get; set; } + public string? PageHandler { get; set; } /// /// The page name used when generating the URL where client should send a validation request. @@ -32,7 +34,7 @@ public class PageRemoteAttribute : RemoteAttributeBase /// /// If not set the ambient value will be used when generating the URL. /// - public string PageName { get; set; } + public string? PageName { get; set; } /// protected override string GetUrl(ClientModelValidationContext context) diff --git a/src/Mvc/Mvc.ViewFeatures/src/PartialViewResult.cs b/src/Mvc/Mvc.ViewFeatures/src/PartialViewResult.cs index 3213e16c28fd..04264083ce66 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PartialViewResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/PartialViewResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Controllers; @@ -27,34 +29,34 @@ public class PartialViewResult : ActionResult, IStatusCodeActionResult /// /// When null, defaults to . /// - public string ViewName { get; set; } + public string? ViewName { get; set; } /// /// Gets the view data model. /// - public object Model => ViewData?.Model; + public object? Model => ViewData?.Model; /// /// Gets or sets the used for rendering the view for this result. /// - public ViewDataDictionary ViewData { get; set; } + public ViewDataDictionary ViewData { get; set; } = default!; /// /// Gets or sets the used for rendering the view for this result. /// - public ITempDataDictionary TempData { get; set; } + public ITempDataDictionary TempData { get; set; } = default!; /// /// Gets or sets the used to locate views. /// /// When null, an instance of from /// ActionContext.HttpContext.RequestServices is used. - public IViewEngine ViewEngine { get; set; } + public IViewEngine? ViewEngine { get; set; } /// /// Gets or sets the Content-Type header for the response. /// - public string ContentType { get; set; } + public string? ContentType { get; set; } /// public override Task ExecuteResultAsync(ActionContext context) diff --git a/src/Mvc/Mvc.ViewFeatures/src/PartialViewResultExecutor.cs b/src/Mvc/Mvc.ViewFeatures/src/PartialViewResultExecutor.cs index 95b68df50660..4a60c7ec288e 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PartialViewResultExecutor.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/PartialViewResultExecutor.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -75,7 +77,7 @@ public virtual ViewEngineResult FindView(ActionContext actionContext, PartialVie } var viewEngine = viewResult.ViewEngine ?? ViewEngine; - var viewName = viewResult.ViewName ?? GetActionName(actionContext); + var viewName = viewResult.ViewName ?? GetActionName(actionContext) ?? string.Empty; var stopwatch = ValueStopwatch.StartNew(); @@ -192,7 +194,7 @@ public virtual async Task ExecuteAsync(ActionContext context, PartialViewResult Logger.PartialViewResultExecuted(result.ViewName, stopwatch.GetElapsedTime()); } - private static string GetActionName(ActionContext context) + private static string? GetActionName(ActionContext context) { if (context == null) { @@ -205,7 +207,7 @@ private static string GetActionName(ActionContext context) } var actionDescriptor = context.ActionDescriptor; - string normalizedValue = null; + string? normalizedValue = null; if (actionDescriptor.RouteValues.TryGetValue(ActionNameKey, out var value) && !string.IsNullOrEmpty(value)) { diff --git a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt index cb9d3016f9ff..3b4283b363ab 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt @@ -3,3 +3,596 @@ ~Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentFactory.ReleaseViewComponentAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object component) -> System.Threading.Tasks.ValueTask ~Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator.ReleaseAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object viewComponent) -> System.Threading.Tasks.ValueTask ~Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentFactory.ReleaseViewComponentAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object component) -> System.Threading.Tasks.ValueTask +*REMOVED*~Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.CreateInstance(System.IServiceProvider serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.ViewData.set -> void +*REMOVED*Microsoft.AspNetCore.Mvc.Controller.ViewBag.get -> dynamic +*REMOVED*Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewBag.get -> dynamic +*REMOVED*Microsoft.AspNetCore.Mvc.ViewComponent.ViewBag.get -> dynamic +*REMOVED*Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.get -> TModel +*REMOVED*~Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.CreateInstance(System.IServiceProvider serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Controller.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.IViewComponentHelper.InvokeAsync(System.Type componentType, object arguments) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.IViewComponentHelper.InvokeAsync(string name, object arguments) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.MvcViewOptions.ClientModelValidatorProviders.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.MvcViewOptions.HtmlHelperOptions.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions +*REMOVED*~Microsoft.AspNetCore.Mvc.MvcViewOptions.HtmlHelperOptions.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.MvcViewOptions.ViewEngines.get -> System.Collections.Generic.IList +*REMOVED*~Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageHandler.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageHandler.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageName.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ContentType.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ContentType.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.Model.get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewEngine.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.PartialViewResult.ViewName.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string action, string controller) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string action, string controller, string areaName) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string routeName) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttribute.RouteName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttribute.RouteName.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AdditionalFields.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AdditionalFields.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatAdditionalFieldsForClientValidation(string property) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.HttpMethod.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.HttpMethod.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.RemoteAttributeBase.RouteData.get -> Microsoft.AspNetCore.Routing.RouteValueDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.AddCssClass(string value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.Attributes.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.GenerateId(string name, string invalidCharReplacement) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.InnerHtml.get -> Microsoft.AspNetCore.Html.IHtmlContentBuilder +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttribute(string key, string value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttribute(string key, string value, bool replaceExisting) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttributes(System.Collections.Generic.IDictionary attributes) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttributes(System.Collections.Generic.IDictionary attributes, bool replaceExisting) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderBody() -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderEndTag() -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderSelfClosingTag() -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderStartTag() -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagBuilder(Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagBuilder(string tagName) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ExecutingFilePath.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ExecutingFilePath.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.GetFormContextForClientValidation() -> Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationMessageElement.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationMessageElement.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationSummaryMessageElement.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationSummaryMessageElement.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.View.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IView +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.View.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, System.IO.TextWriter writer, Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions htmlHelperOptions) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewContext(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.IO.TextWriter writer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.Writer.get -> System.IO.TextWriter +*REMOVED*~Microsoft.AspNetCore.Mvc.Rendering.ViewContext.Writer.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.TempDataAttribute.Key.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.TempDataAttribute.Key.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute.CreateInstance(System.IServiceProvider serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.Content(string content) -> Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ModelState.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.Request.get -> Microsoft.AspNetCore.Http.HttpRequest +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.RouteData.get -> Microsoft.AspNetCore.Routing.RouteData +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.Url.get -> Microsoft.AspNetCore.Mvc.IUrlHelper +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.Url.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.User.get -> System.Security.Principal.IPrincipal +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.UserClaimsPrincipal.get -> System.Security.Claims.ClaimsPrincipal +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.View() -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.View(string viewName) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.View(TModel model) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.View(string viewName, TModel model) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewComponentContext.get -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewComponentContext.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponent.ViewEngine.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.Arguments.get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.Arguments.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ContentType.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ContentType.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.Model.get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentName.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentType.get -> System.Type +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentType.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.Content.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.ContentViewComponentResult(string content) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.DefaultViewComponentHelper(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider descriptorProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector selector, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory invokerFactory, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope viewBufferScope) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeAsync(System.Type componentType, object arguments) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeAsync(string name, object arguments) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.EncodedContent.get -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.HtmlContentViewComponentResult(Microsoft.AspNetCore.Html.IHtmlContent encodedContent) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Arguments.get -> System.Collections.Generic.IDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Arguments.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.HtmlEncoder.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentContext(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor viewComponentDescriptor, System.Collections.Generic.IDictionary arguments, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, System.IO.TextWriter writer) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentDescriptor.get -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentDescriptor.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewContext.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Writer.get -> System.IO.TextWriter +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewEngine.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewName.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewDataAttribute.Key.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewDataAttribute.Key.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.CompositeViewEngine(Microsoft.Extensions.Options.IOptions optionsAccessor) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.GetView(string executingFilePath, string viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.ViewEngines.get -> System.Collections.Generic.IReadOnlyList +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine.ViewEngines.get -> System.Collections.Generic.IReadOnlyList +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.IView.Path.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.IView.RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine.GetView(string executingFilePath, string viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(System.Collections.Generic.IEnumerable originalLocations) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.SearchedLocations.get -> System.Collections.Generic.IEnumerable +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.View.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IView +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.ViewName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Add(System.Collections.Generic.KeyValuePair item) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Add(string key, string value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Contains(System.Collections.Generic.KeyValuePair item) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.ContainsKey(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator.Enumerator(Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary attributes) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Keys.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Remove(System.Collections.Generic.KeyValuePair item) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Remove(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.TryGetValue(string key, out string value) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Values.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.this[string key].get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.this[string key].set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.Keep(string key) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.Peek(string key) -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.Logger.get -> Microsoft.Extensions.Logging.ILogger +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.PartialViewResultExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.SaveTempDataAttribute.CreateInstance(System.IServiceProvider serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent.StringHtmlContent(string input) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent.WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Add(string key, object value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.ContainsKey(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.ContainsValue(object value) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.GetEnumerator() -> System.Collections.Generic.IEnumerator> +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Keep(string key) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Keys.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Peek(string key) -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Remove(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.TempDataDictionary(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider provider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.TryGetValue(string key, out object value) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Values.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.this[string key].get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.this[string key].set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor.ViewComponentResultExecutor(Microsoft.Extensions.Options.IOptions mvcHelperOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataDictionaryFactory, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Add(System.Collections.Generic.KeyValuePair item) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Add(string key, object value) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Contains(System.Collections.Generic.KeyValuePair item) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ContainsKey(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Eval(string expression) -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Eval(string expression, string format) -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.GetViewDataInfo(string expression) -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Keys.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelExplorer.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelExplorer.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelMetadata.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelState.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Remove(System.Collections.Generic.KeyValuePair item) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Remove(string key) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.TemplateInfo.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.TemplateInfo +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.TryGetValue(string key, out object value) -> bool +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Values.get -> System.Collections.Generic.ICollection +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Type declaredModelType) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, System.Type declaredModelType) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, System.Type declaredModelType) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model, System.Type declaredModelType) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.this[string index].get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.this[string index].set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.DiagnosticListener.get -> System.Diagnostics.DiagnosticListener +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string contentType, int? statusCode) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ModelMetadataProvider.get -> Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.TempDataFactory.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, System.Diagnostics.DiagnosticListener diagnosticListener) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewOptions.get -> Microsoft.AspNetCore.Mvc.MvcViewOptions +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.WriterFactory.get -> Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ViewResult result) -> System.Threading.Tasks.Task +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.Logger.get -> Microsoft.Extensions.Logging.ILogger +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ViewResultExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ContentType.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ContentType.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.Model.get -> object +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.TempData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewData.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewEngine.set -> void +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewName.get -> string +*REMOVED*~Microsoft.AspNetCore.Mvc.ViewResult.ViewName.set -> void +*REMOVED*~abstract Microsoft.AspNetCore.Mvc.RemoteAttributeBase.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.PageRemoteAttribute.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.PartialViewResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.RemoteAttribute.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatErrorMessage(string name) -> string +*REMOVED*~override Microsoft.AspNetCore.Mvc.RemoteAttributeBase.IsValid(object value) -> bool +*REMOVED*~override Microsoft.AspNetCore.Mvc.ViewComponentResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) -> System.Threading.Tasks.Task +*REMOVED*~override Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) -> System.Threading.Tasks.Task +*REMOVED*~static Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatPropertyForClientValidation(string property) -> string +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.CreateSanitizedId(string name, string invalidCharReplacement) -> string +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, System.Type componentType) -> System.Threading.Tasks.Task +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, string name) -> System.Threading.Tasks.Task +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper) -> System.Threading.Tasks.Task +*REMOVED*~static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, object arguments) -> System.Threading.Tasks.Task +*REMOVED*~static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.Found(string viewName, Microsoft.AspNetCore.Mvc.ViewEngines.IView view) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.NotFound(string viewName, System.Collections.Generic.IEnumerable searchedLocations) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~static Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions.GetHtml(this Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.AspNetCore.Http.HttpContext httpContext) -> Microsoft.AspNetCore.Html.IHtmlContent +*REMOVED*~static Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.FormatValue(object value, string format) -> string +*REMOVED*~static readonly Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.DefaultContentType -> string +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.Json(object data) -> Microsoft.AspNetCore.Mvc.JsonResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.Json(object data, object serializerSettings) -> Microsoft.AspNetCore.Mvc.JsonResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate next) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.PartialView() -> Microsoft.AspNetCore.Mvc.PartialViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(object model) -> Microsoft.AspNetCore.Mvc.PartialViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(string viewName) -> Microsoft.AspNetCore.Mvc.PartialViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(string viewName, object model) -> Microsoft.AspNetCore.Mvc.PartialViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.View() -> Microsoft.AspNetCore.Mvc.ViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.View(object model) -> Microsoft.AspNetCore.Mvc.ViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.View(string viewName) -> Microsoft.AspNetCore.Mvc.ViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.View(string viewName, object model) -> Microsoft.AspNetCore.Mvc.ViewResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(System.Type componentType) -> Microsoft.AspNetCore.Mvc.ViewComponentResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(System.Type componentType, object arguments) -> Microsoft.AspNetCore.Mvc.ViewComponentResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(string componentName) -> Microsoft.AspNetCore.Mvc.ViewComponentResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(string componentName, object arguments) -> Microsoft.AspNetCore.Mvc.ViewComponentResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Rendering.ViewContext.FormContext.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.Rendering.ViewContext.FormContext.set -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.PartialViewResult viewResult) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.PartialViewResult result) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.FindView(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.PartialViewResult viewResult) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ViewComponentResult result) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.SetModel(object value) -> void +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string contentType, int? statusCode) -> System.Threading.Tasks.Task +*REMOVED*~virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.FindView(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewResult viewResult) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult +Microsoft.AspNetCore.Mvc.Controller.ViewBag.get -> dynamic! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewBag.get -> dynamic! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewBag.get -> dynamic! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.get -> TModel? +Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute.CreateInstance(System.IServiceProvider! serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata! +Microsoft.AspNetCore.Mvc.Controller.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.Controller.TempData.set -> void +Microsoft.AspNetCore.Mvc.Controller.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.Controller.ViewData.set -> void +Microsoft.AspNetCore.Mvc.IViewComponentHelper.InvokeAsync(System.Type! componentType, object? arguments) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.IViewComponentHelper.InvokeAsync(string! name, object? arguments) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.MvcViewOptions.ClientModelValidatorProviders.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.MvcViewOptions.HtmlHelperOptions.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions! +Microsoft.AspNetCore.Mvc.MvcViewOptions.HtmlHelperOptions.set -> void +Microsoft.AspNetCore.Mvc.MvcViewOptions.ViewEngines.get -> System.Collections.Generic.IList! +Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageHandler.get -> string? +Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageHandler.set -> void +Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageName.get -> string? +Microsoft.AspNetCore.Mvc.PageRemoteAttribute.PageName.set -> void +Microsoft.AspNetCore.Mvc.PartialViewResult.ContentType.get -> string? +Microsoft.AspNetCore.Mvc.PartialViewResult.ContentType.set -> void +Microsoft.AspNetCore.Mvc.PartialViewResult.Model.get -> object? +Microsoft.AspNetCore.Mvc.PartialViewResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.PartialViewResult.TempData.set -> void +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewData.set -> void +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine? +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewEngine.set -> void +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewName.get -> string? +Microsoft.AspNetCore.Mvc.PartialViewResult.ViewName.set -> void +Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string! action, string! controller) -> void +Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string! action, string! controller, string! areaName) -> void +Microsoft.AspNetCore.Mvc.RemoteAttribute.RemoteAttribute(string! routeName) -> void +Microsoft.AspNetCore.Mvc.RemoteAttribute.RouteName.get -> string? +Microsoft.AspNetCore.Mvc.RemoteAttribute.RouteName.set -> void +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AdditionalFields.get -> string! +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AdditionalFields.set -> void +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatAdditionalFieldsForClientValidation(string! property) -> string! +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.HttpMethod.get -> string? +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.HttpMethod.set -> void +Microsoft.AspNetCore.Mvc.RemoteAttributeBase.RouteData.get -> Microsoft.AspNetCore.Routing.RouteValueDictionary! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.AddCssClass(string! value) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.Attributes.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.GenerateId(string! name, string! invalidCharReplacement) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.InnerHtml.get -> Microsoft.AspNetCore.Html.IHtmlContentBuilder! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttribute(string! key, string? value) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttribute(string! key, string? value, bool replaceExisting) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttributes(System.Collections.Generic.IDictionary! attributes) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.MergeAttributes(System.Collections.Generic.IDictionary! attributes, bool replaceExisting) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderBody() -> Microsoft.AspNetCore.Html.IHtmlContent? +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderEndTag() -> Microsoft.AspNetCore.Html.IHtmlContent! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderSelfClosingTag() -> Microsoft.AspNetCore.Html.IHtmlContent! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.RenderStartTag() -> Microsoft.AspNetCore.Html.IHtmlContent! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagBuilder(Microsoft.AspNetCore.Mvc.Rendering.TagBuilder! tagBuilder) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagBuilder(string! tagName) -> void +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.TagName.get -> string! +Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.WriteTo(System.IO.TextWriter! writer, System.Text.Encodings.Web.HtmlEncoder! encoder) -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ExecutingFilePath.get -> string? +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ExecutingFilePath.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.GetFormContextForClientValidation() -> Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext? +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.TempData.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationMessageElement.get -> string! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationMessageElement.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationSummaryMessageElement.get -> string! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ValidationSummaryMessageElement.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.View.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IView! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.View.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewContext(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView! view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! tempData, System.IO.TextWriter! writer, Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions! htmlHelperOptions) -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewContext(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView! view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! viewData, System.IO.TextWriter! writer) -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.ViewData.set -> void +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.Writer.get -> System.IO.TextWriter! +Microsoft.AspNetCore.Mvc.Rendering.ViewContext.Writer.set -> void +Microsoft.AspNetCore.Mvc.TempDataAttribute.Key.get -> string? +Microsoft.AspNetCore.Mvc.TempDataAttribute.Key.set -> void +Microsoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute.CreateInstance(System.IServiceProvider! serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata! +Microsoft.AspNetCore.Mvc.ViewComponent.Content(string! content) -> Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult! +Microsoft.AspNetCore.Mvc.ViewComponent.HttpContext.get -> Microsoft.AspNetCore.Http.HttpContext! +Microsoft.AspNetCore.Mvc.ViewComponent.ModelState.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! +Microsoft.AspNetCore.Mvc.ViewComponent.Request.get -> Microsoft.AspNetCore.Http.HttpRequest! +Microsoft.AspNetCore.Mvc.ViewComponent.RouteData.get -> Microsoft.AspNetCore.Routing.RouteData! +Microsoft.AspNetCore.Mvc.ViewComponent.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponent.Url.get -> Microsoft.AspNetCore.Mvc.IUrlHelper! +Microsoft.AspNetCore.Mvc.ViewComponent.Url.set -> void +Microsoft.AspNetCore.Mvc.ViewComponent.User.get -> System.Security.Principal.IPrincipal! +Microsoft.AspNetCore.Mvc.ViewComponent.UserClaimsPrincipal.get -> System.Security.Claims.ClaimsPrincipal! +Microsoft.AspNetCore.Mvc.ViewComponent.View() -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult! +Microsoft.AspNetCore.Mvc.ViewComponent.View(string? viewName) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult! +Microsoft.AspNetCore.Mvc.ViewComponent.View(TModel? model) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult! +Microsoft.AspNetCore.Mvc.ViewComponent.View(string? viewName, TModel? model) -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewComponentContext.get -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewComponentContext.set -> void +Microsoft.AspNetCore.Mvc.ViewComponent.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine! +Microsoft.AspNetCore.Mvc.ViewComponent.ViewEngine.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.Arguments.get -> object? +Microsoft.AspNetCore.Mvc.ViewComponentResult.Arguments.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.ContentType.get -> string? +Microsoft.AspNetCore.Mvc.ViewComponentResult.ContentType.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.Model.get -> object? +Microsoft.AspNetCore.Mvc.ViewComponentResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponentResult.TempData.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentName.get -> string? +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentName.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentType.get -> System.Type? +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewComponentType.set -> void +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponentResult.ViewData.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.Content.get -> string! +Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.ContentViewComponentResult(string! content) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.DefaultViewComponentHelper(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider! descriptorProvider, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector! selector, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory! invokerFactory, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope! viewBufferScope) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeAsync(System.Type! componentType, object? arguments) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeAsync(string! name, object? arguments) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.EncodedContent.get -> Microsoft.AspNetCore.Html.IHtmlContent! +Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult.HtmlContentViewComponentResult(Microsoft.AspNetCore.Html.IHtmlContent! encodedContent) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Arguments.get -> System.Collections.Generic.IDictionary! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Arguments.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.HtmlEncoder.get -> System.Text.Encodings.Web.HtmlEncoder! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.HtmlEncoder.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentContext(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor! viewComponentDescriptor, System.Collections.Generic.IDictionary! arguments, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext, System.IO.TextWriter! writer) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentDescriptor.get -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewComponentDescriptor.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewContext.get -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewContext.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext.Writer.get -> System.IO.TextWriter! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext! context) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.TempData.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary? +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewData.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine? +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewEngine.set -> void +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewName.get -> string? +Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ViewName.set -> void +Microsoft.AspNetCore.Mvc.ViewDataAttribute.Key.get -> string? +Microsoft.AspNetCore.Mvc.ViewDataAttribute.Key.set -> void +~Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.CompositeViewEngine(Microsoft.Extensions.Options.IOptions! optionsAccessor) -> void +Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext! context, string! viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.GetView(string? executingFilePath, string! viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.ViewEngines.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine.ViewEngines.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.Mvc.ViewEngines.IView.Path.get -> string! +Microsoft.AspNetCore.Mvc.ViewEngines.IView.RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! context) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine.FindView(Microsoft.AspNetCore.Mvc.ActionContext! context, string! viewName, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine.GetView(string? executingFilePath, string! viewPath, bool isMainPage) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(System.Collections.Generic.IEnumerable? originalLocations) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.SearchedLocations.get -> System.Collections.Generic.IEnumerable! +Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.View.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IView? +Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.ViewName.get -> string! +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Add(System.Collections.Generic.KeyValuePair item) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Add(string! key, string? value) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Contains(System.Collections.Generic.KeyValuePair item) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.ContainsKey(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.CopyTo(System.Collections.Generic.KeyValuePair[]! array, int arrayIndex) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator.Enumerator(Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary! attributes) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Keys.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Remove(System.Collections.Generic.KeyValuePair item) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Remove(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.TryGetValue(string! key, out string? value) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Values.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.this[string! key].get -> string? +Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.this[string! key].set -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.Keep(string! key) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary.Peek(string! key) -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.Logger.get -> Microsoft.Extensions.Logging.ILogger! +~Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.PartialViewResultExecutor(Microsoft.Extensions.Options.IOptions! viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine! viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory! tempDataFactory, System.Diagnostics.DiagnosticListener! diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! modelMetadataProvider) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.SaveTempDataAttribute.CreateInstance(System.IServiceProvider! serviceProvider) -> Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata! +Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent.StringHtmlContent(string! input) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent.WriteTo(System.IO.TextWriter! writer, System.Text.Encodings.Web.HtmlEncoder! encoder) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Add(string! key, object? value) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.ContainsKey(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.ContainsValue(object? value) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.GetEnumerator() -> System.Collections.Generic.IEnumerator>! +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Keep(string! key) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Keys.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Peek(string! key) -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Remove(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.TempDataDictionary(Microsoft.AspNetCore.Http.HttpContext! context, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider! provider) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.TryGetValue(string! key, out object? value) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.Values.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.this[string! key].get -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary.this[string! key].set -> void +~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor.ViewComponentResultExecutor(Microsoft.Extensions.Options.IOptions! mvcHelperOptions, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory, System.Text.Encodings.Web.HtmlEncoder! htmlEncoder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! modelMetadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory! tempDataDictionaryFactory, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! writerFactory) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Add(System.Collections.Generic.KeyValuePair item) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Add(string! key, object? value) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Contains(System.Collections.Generic.KeyValuePair item) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ContainsKey(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.CopyTo(System.Collections.Generic.KeyValuePair[]! array, int arrayIndex) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Eval(string? expression) -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Eval(string? expression, string? format) -> string? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.GetViewDataInfo(string? expression) -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Keys.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.get -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Model.set -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelExplorer.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelExplorer.set -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelMetadata.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ModelState.get -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Remove(System.Collections.Generic.KeyValuePair item) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Remove(string! key) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.TemplateInfo.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.TemplateInfo! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.TryGetValue(string! key, out object? value) -> bool +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.Values.get -> System.Collections.Generic.ICollection! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelState) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelState, System.Type! declaredModelType) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! metadataProvider, System.Type! declaredModelType) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! source) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! source, System.Type! declaredModelType) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! source, object? model, System.Type! declaredModelType) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.this[string! index].get -> object? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.this[string! index].set -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary! modelState) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! source) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! source, object? model) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.DiagnosticListener.get -> System.Diagnostics.DiagnosticListener! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext! viewContext, string? contentType, int? statusCode) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ModelMetadataProvider.get -> Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.TempDataFactory.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine! viewEngine, System.Diagnostics.DiagnosticListener! diagnosticListener) -> void +~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewExecutor(Microsoft.Extensions.Options.IOptions! viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine! viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory! tempDataFactory, System.Diagnostics.DiagnosticListener! diagnosticListener, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! modelMetadataProvider) -> void +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ViewOptions.get -> Microsoft.AspNetCore.Mvc.MvcViewOptions? +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.WriterFactory.get -> Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext! context, Microsoft.AspNetCore.Mvc.ViewResult! result) -> System.Threading.Tasks.Task! +Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.Logger.get -> Microsoft.Extensions.Logging.ILogger! +~Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ViewResultExecutor(Microsoft.Extensions.Options.IOptions! viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory! writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine! viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory! tempDataFactory, System.Diagnostics.DiagnosticListener! diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory! loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider! modelMetadataProvider) -> void +Microsoft.AspNetCore.Mvc.ViewResult.ContentType.get -> string? +Microsoft.AspNetCore.Mvc.ViewResult.ContentType.set -> void +Microsoft.AspNetCore.Mvc.ViewResult.Model.get -> object? +Microsoft.AspNetCore.Mvc.ViewResult.TempData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! +Microsoft.AspNetCore.Mvc.ViewResult.TempData.set -> void +Microsoft.AspNetCore.Mvc.ViewResult.ViewData.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! +Microsoft.AspNetCore.Mvc.ViewResult.ViewData.set -> void +Microsoft.AspNetCore.Mvc.ViewResult.ViewEngine.get -> Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine? +Microsoft.AspNetCore.Mvc.ViewResult.ViewEngine.set -> void +Microsoft.AspNetCore.Mvc.ViewResult.ViewName.get -> string? +Microsoft.AspNetCore.Mvc.ViewResult.ViewName.set -> void +abstract Microsoft.AspNetCore.Mvc.RemoteAttributeBase.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> string! +override Microsoft.AspNetCore.Mvc.PageRemoteAttribute.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> string! +override Microsoft.AspNetCore.Mvc.PartialViewResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.RemoteAttribute.GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> string! +override Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatErrorMessage(string! name) -> string! +override Microsoft.AspNetCore.Mvc.RemoteAttributeBase.IsValid(object? value) -> bool +override Microsoft.AspNetCore.Mvc.ViewComponentResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! +override Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext! context) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Mvc.RemoteAttributeBase.FormatPropertyForClientValidation(string! property) -> string! +static Microsoft.AspNetCore.Mvc.Rendering.TagBuilder.CreateSanitizedId(string? name, string! invalidCharReplacement) -> string! +static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper! helper, System.Type! componentType) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper! helper, string! name) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper! helper) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions.InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper! helper, object? arguments) -> System.Threading.Tasks.Task! +static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.Found(string! viewName, Microsoft.AspNetCore.Mvc.ViewEngines.IView! view) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.NotFound(string! viewName, System.Collections.Generic.IEnumerable! searchedLocations) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +static Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions.GetHtml(this Microsoft.AspNetCore.Antiforgery.IAntiforgery! antiforgery, Microsoft.AspNetCore.Http.HttpContext! httpContext) -> Microsoft.AspNetCore.Html.IHtmlContent! +static Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.FormatValue(object? value, string? format) -> string? +static readonly Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.DefaultContentType -> string! +virtual Microsoft.AspNetCore.Mvc.Controller.Json(object? data) -> Microsoft.AspNetCore.Mvc.JsonResult! +virtual Microsoft.AspNetCore.Mvc.Controller.Json(object? data, object? serializerSettings) -> Microsoft.AspNetCore.Mvc.JsonResult! +virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext! context) -> void +virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext! context) -> void +virtual Microsoft.AspNetCore.Mvc.Controller.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext! context, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate! next) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.Controller.PartialView() -> Microsoft.AspNetCore.Mvc.PartialViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(object? model) -> Microsoft.AspNetCore.Mvc.PartialViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(string? viewName) -> Microsoft.AspNetCore.Mvc.PartialViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.PartialView(string? viewName, object? model) -> Microsoft.AspNetCore.Mvc.PartialViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.View() -> Microsoft.AspNetCore.Mvc.ViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.View(object? model) -> Microsoft.AspNetCore.Mvc.ViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.View(string? viewName) -> Microsoft.AspNetCore.Mvc.ViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.View(string? viewName, object? model) -> Microsoft.AspNetCore.Mvc.ViewResult! +virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(System.Type! componentType) -> Microsoft.AspNetCore.Mvc.ViewComponentResult! +virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(System.Type! componentType, object? arguments) -> Microsoft.AspNetCore.Mvc.ViewComponentResult! +virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(string! componentName) -> Microsoft.AspNetCore.Mvc.ViewComponentResult! +virtual Microsoft.AspNetCore.Mvc.Controller.ViewComponent(string! componentName, object? arguments) -> Microsoft.AspNetCore.Mvc.ViewComponentResult! +virtual Microsoft.AspNetCore.Mvc.RemoteAttributeBase.AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext! context) -> void +virtual Microsoft.AspNetCore.Mvc.Rendering.ViewContext.FormContext.get -> Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext! +virtual Microsoft.AspNetCore.Mvc.Rendering.ViewContext.FormContext.set -> void +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView! view, Microsoft.AspNetCore.Mvc.PartialViewResult! viewResult) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext! context, Microsoft.AspNetCore.Mvc.PartialViewResult! result) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.FindView(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, Microsoft.AspNetCore.Mvc.PartialViewResult! viewResult) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext! context, Microsoft.AspNetCore.Mvc.ViewComponentResult! result) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.SetModel(object? value) -> void +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView! view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary! viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary! tempData, string? contentType, int? statusCode) -> System.Threading.Tasks.Task! +virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.FindView(Microsoft.AspNetCore.Mvc.ActionContext! actionContext, Microsoft.AspNetCore.Mvc.ViewResult! viewResult) -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult! diff --git a/src/Mvc/Mvc.ViewFeatures/src/RemoteAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/RemoteAttribute.cs index 574f11cf9164..65d6c58eaece 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/RemoteAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/RemoteAttribute.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Routing; @@ -100,7 +102,7 @@ public RemoteAttribute(string action, string controller, string areaName) /// /// Gets or sets the route name used when generating the URL where client should send a validation request. /// - protected string RouteName { get; set; } + protected string? RouteName { get; set; } /// protected override string GetUrl(ClientModelValidationContext context) @@ -116,7 +118,7 @@ protected override string GetUrl(ClientModelValidationContext context) var url = urlHelper.RouteUrl(new UrlRouteContext() { - RouteName = this.RouteName, + RouteName = RouteName, Values = RouteData, }); diff --git a/src/Mvc/Mvc.ViewFeatures/src/RemoteAttributeBase.cs b/src/Mvc/Mvc.ViewFeatures/src/RemoteAttributeBase.cs index b935c0f6f1b3..85d8a8d574d1 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/RemoteAttributeBase.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/RemoteAttributeBase.cs @@ -1,9 +1,12 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using Microsoft.AspNetCore.Mvc.DataAnnotations; @@ -28,7 +31,7 @@ public abstract class RemoteAttributeBase : ValidationAttribute, IClientModelVal private string _additionalFields = string.Empty; private string[] _additionalFieldsSplit = Array.Empty(); private bool _checkedForLocalizer; - private IStringLocalizer _stringLocalizer; + private IStringLocalizer? _stringLocalizer; /// /// Initialize a new instance of . @@ -49,11 +52,12 @@ protected RemoteAttributeBase() /// Gets or sets the HTTP method ("Get" or "Post") client should use when sending a validation /// request. /// - public string HttpMethod { get; set; } + public string? HttpMethod { get; set; } /// /// Gets or sets the comma-separated names of fields the client should include in a validation request. /// + [AllowNull] public string AdditionalFields { get => _additionalFields; @@ -129,7 +133,7 @@ public override string FormatErrorMessage(string name) /// Always returns true since this does no validation itself. /// Related validations occur only when the client sends a validation request. /// - public override bool IsValid(object value) + public override bool IsValid(object? value) { return true; } @@ -163,7 +167,7 @@ public virtual void AddValidation(ClientModelValidationContext context) MergeAttribute(context.Attributes, "data-val-remote-type", HttpMethod); } - var additionalFields = FormatAdditionalFieldsForClientValidation(context.ModelMetadata.PropertyName); + var additionalFields = FormatAdditionalFieldsForClientValidation(context.ModelMetadata.PropertyName!); MergeAttribute(context.Attributes, "data-val-remote-additionalfields", additionalFields); } @@ -175,7 +179,7 @@ private static void MergeAttribute(IDictionary attributes, strin } } - private static IEnumerable SplitAndTrimPropertyNames(string original) + private static IEnumerable SplitAndTrimPropertyNames(string? original) => original?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty(); private void CheckForLocalizer(ClientModelValidationContext context) diff --git a/src/Mvc/Mvc.ViewFeatures/src/Rendering/TagBuilder.cs b/src/Mvc/Mvc.ViewFeatures/src/Rendering/TagBuilder.cs index bfec077a4d13..0f4359e9d53a 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Rendering/TagBuilder.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/Rendering/TagBuilder.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -20,8 +22,8 @@ namespace Microsoft.AspNetCore.Mvc.Rendering [DebuggerDisplay("{DebuggerToString()}")] public class TagBuilder : IHtmlContent { - private AttributeDictionary _attributes; - private HtmlContentBuilder _innerHtml; + private AttributeDictionary? _attributes; + private HtmlContentBuilder? _innerHtml; /// /// Creates a new HTML tag that has the specified tag name. @@ -122,9 +124,7 @@ public IHtmlContentBuilder InnerHtml /// The CSS class name to add. public void AddCssClass(string value) { - string currentValue; - - if (Attributes.TryGetValue("class", out currentValue)) + if (Attributes.TryGetValue("class", out var currentValue)) { Attributes["class"] = value + " " + currentValue; } @@ -150,7 +150,7 @@ public void AddCssClass(string value) /// /// Valid "id" attributes are defined in https://www.w3.org/TR/html401/types.html#type-id. /// - public static string CreateSanitizedId(string name, string invalidCharReplacement) + public static string CreateSanitizedId(string? name, string invalidCharReplacement) { if (invalidCharReplacement == null) { @@ -281,7 +281,7 @@ private void AppendAttributes(TextWriter writer, HtmlEncoder encoder) /// /// The attribute key. /// The attribute value. - public void MergeAttribute(string key, string value) + public void MergeAttribute(string key, string? value) { MergeAttribute(key, value, replaceExisting: false); } @@ -292,7 +292,7 @@ public void MergeAttribute(string key, string value) /// The attribute key. /// The attribute value. /// Whether to replace an existing value. - public void MergeAttribute(string key, string value, bool replaceExisting) + public void MergeAttribute(string key, string? value, bool replaceExisting) { if (string.IsNullOrEmpty(key)) { @@ -311,7 +311,7 @@ public void MergeAttribute(string key, string value, bool replaceExisting) /// The key type. /// The value type. /// The attributes. - public void MergeAttributes(IDictionary attributes) + public void MergeAttributes(IDictionary attributes) { MergeAttributes(attributes, replaceExisting: false); } @@ -323,14 +323,14 @@ public void MergeAttributes(IDictionary attributes) /// The value type. /// The attributes. /// Whether to replace existing attributes. - public void MergeAttributes(IDictionary attributes, bool replaceExisting) + public void MergeAttributes(IDictionary attributes, bool replaceExisting) { // Perf: Avoid allocating enumerator for `attributes` if possible if (attributes != null && attributes.Count > 0) { foreach (var entry in attributes) { - var key = Convert.ToString(entry.Key, CultureInfo.InvariantCulture); + var key = Convert.ToString(entry.Key, CultureInfo.InvariantCulture)!; var value = Convert.ToString(entry.Value, CultureInfo.InvariantCulture); MergeAttribute(key, value, replaceExisting); } @@ -357,7 +357,7 @@ public void WriteTo(TextWriter writer, HtmlEncoder encoder) /// Returns an that renders the body. /// /// An that renders the body. - public IHtmlContent RenderBody() => _innerHtml; + public IHtmlContent? RenderBody() => _innerHtml; /// /// Returns an that renders the start tag. diff --git a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewComponentHelperExtensions.cs b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewComponentHelperExtensions.cs index d973a8a5eb66..d749451b5ad3 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewComponentHelperExtensions.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewComponentHelperExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; @@ -54,7 +56,7 @@ public static Task InvokeAsync(this IViewComponentHelper helper, T /// The of the view component. /// A that on completion returns the rendered . /// - public static Task InvokeAsync(this IViewComponentHelper helper, object arguments) + public static Task InvokeAsync(this IViewComponentHelper helper, object? arguments) { if (helper == null) { diff --git a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs index 4f13f3b5b412..cb5456c35820 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.IO; @@ -15,9 +17,9 @@ namespace Microsoft.AspNetCore.Mvc.Rendering /// public class ViewContext : ActionContext { - private FormContext _formContext; - private DynamicViewData _viewBag; - private Dictionary _items; + private FormContext _formContext = default!; + private DynamicViewData? _viewBag; + private Dictionary _items = default!; /// /// Creates an empty . @@ -25,10 +27,14 @@ public class ViewContext : ActionContext /// /// The default constructor is provided for unit test purposes only. /// +#nullable disable warnings + // This is a unit-test only constructor where no property is initialized. We'll avoid having to + // using null-forgiveness operator by skipping nullable warnings on this constructor. public ViewContext() { ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), ModelState); } +#nullable enable /// /// Initializes a new instance of . @@ -235,18 +241,18 @@ public dynamic ViewBag /// The rendering of a view may involve one or more files (e.g. _ViewStart, Layouts etc). /// This property contains the path of the file currently being rendered. /// - public string ExecutingFilePath { get; set; } + public string? ExecutingFilePath { get; set; } /// /// Gets a key/value collection that can be used to share data within the scope of this view execution. /// - internal Dictionary Items => _items ??= new Dictionary(); + internal Dictionary Items => _items ??= new Dictionary(); /// /// Gets the if is enabled. /// /// - public FormContext GetFormContextForClientValidation() + public FormContext? GetFormContextForClientValidation() { return ClientValidationEnabled ? FormContext : null; } diff --git a/src/Mvc/Mvc.ViewFeatures/src/SaveTempDataAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/SaveTempDataAttribute.cs index 6736d17b1374..1669fc8f857c 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/SaveTempDataAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/SaveTempDataAttribute.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ViewFeatures.Filters; diff --git a/src/Mvc/Mvc.ViewFeatures/src/StringHtmlContent.cs b/src/Mvc/Mvc.ViewFeatures/src/StringHtmlContent.cs index 38715b89fd58..70af6be9a922 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/StringHtmlContent.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/StringHtmlContent.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Diagnostics; using System.IO; @@ -51,4 +53,4 @@ private string DebuggerToString() } } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/TempDataAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/TempDataAttribute.cs index e4e6e5c74733..ea82c6b4447e 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/TempDataAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/TempDataAttribute.cs @@ -1,6 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.ViewFeatures; @@ -18,6 +20,6 @@ public sealed class TempDataAttribute : Attribute /// Gets or sets the key used to get or add the property from value from . /// When unspecified, the key is derived from the property name. /// - public string Key { get; set; } + public string? Key { get; set; } } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/TempDataDictionary.cs b/src/Mvc/Mvc.ViewFeatures/src/TempDataDictionary.cs index 20a12f9c62ea..06fc3141d6c0 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/TempDataDictionary.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/TempDataDictionary.cs @@ -1,9 +1,14 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Mvc.ViewFeatures @@ -13,12 +18,12 @@ public class TempDataDictionary : ITempDataDictionary { // Perf: Everything here is lazy because the TempDataDictionary is frequently created and passed around // without being manipulated. - private Dictionary _data; + private Dictionary? _data; private bool _loaded; private readonly ITempDataProvider _provider; private readonly HttpContext _context; - private HashSet _initialKeys; - private HashSet _retainedKeys; + private HashSet? _initialKeys; + private HashSet? _retainedKeys; /// /// Initializes a new instance of the class. @@ -63,7 +68,7 @@ public ICollection Keys } /// - public ICollection Values + public ICollection Values { get { @@ -73,23 +78,22 @@ public ICollection Values } /// - bool ICollection>.IsReadOnly + bool ICollection>.IsReadOnly { get { Load(); - return ((ICollection>)_data).IsReadOnly; + return ((ICollection>)_data).IsReadOnly; } } /// - public object this[string key] + public object? this[string key] { get { Load(); - object value; - if (TryGetValue(key, out value)) + if (TryGetValue(key, out var value)) { // Mark the key for deletion since it is read. _initialKeys.Remove(key); @@ -115,6 +119,8 @@ public void Keep() return; } + AssertLoaded(); + _retainedKeys.Clear(); _retainedKeys.UnionWith(_data.Keys); } @@ -127,22 +133,31 @@ public void Keep(string key) } /// + [MemberNotNull(nameof(_initialKeys), nameof(_retainedKeys), nameof(_data))] public void Load() { if (_loaded) { + AssertLoaded(); return; } var providerDictionary = _provider.LoadTempData(_context); _data = (providerDictionary != null) - ? new Dictionary(providerDictionary, StringComparer.OrdinalIgnoreCase) - : new Dictionary(StringComparer.OrdinalIgnoreCase); + ? new Dictionary(providerDictionary, StringComparer.OrdinalIgnoreCase) + : new Dictionary(StringComparer.OrdinalIgnoreCase); _initialKeys = new HashSet(_data.Keys, StringComparer.OrdinalIgnoreCase); _retainedKeys = new HashSet(StringComparer.OrdinalIgnoreCase); _loaded = true; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [MemberNotNull(nameof(_initialKeys), nameof(_retainedKeys), nameof(_data))] + private void AssertLoaded() + { + Debug.Assert(_initialKeys is not null && _retainedKeys is not null && _data is not null); + } + /// public void Save() { @@ -151,6 +166,8 @@ public void Save() return; } + AssertLoaded(); + // In .NET Core 3.0 a Dictionary can have items removed during enumeration // https://github.com/dotnet/coreclr/pull/18854 foreach (var entry in _data) @@ -165,16 +182,15 @@ public void Save() } /// - public object Peek(string key) + public object? Peek(string key) { Load(); - object value; - _data.TryGetValue(key, out value); + _data.TryGetValue(key, out var value); return value; } /// - public void Add(string key, object value) + public void Add(string key, object? value) { Load(); _data.Add(key, value); @@ -198,14 +214,14 @@ public bool ContainsKey(string key) } /// - public bool ContainsValue(object value) + public bool ContainsValue(object? value) { Load(); return _data.ContainsValue(value); } /// - public IEnumerator> GetEnumerator() + public IEnumerator> GetEnumerator() { Load(); return new TempDataDictionaryEnumerator(this); @@ -221,7 +237,7 @@ public bool Remove(string key) } /// - public bool TryGetValue(string key, out object value) + public bool TryGetValue(string key, out object? value) { Load(); // Mark the key for deletion since it is read. @@ -229,30 +245,30 @@ public bool TryGetValue(string key, out object value) return _data.TryGetValue(key, out value); } - void ICollection>.CopyTo(KeyValuePair[] array, int index) + void ICollection>.CopyTo(KeyValuePair[] array, int index) { Load(); - ((ICollection>)_data).CopyTo(array, index); + ((ICollection>)_data).CopyTo(array, index); } - void ICollection>.Add(KeyValuePair keyValuePair) + void ICollection>.Add(KeyValuePair keyValuePair) { Load(); _initialKeys.Add(keyValuePair.Key); - ((ICollection>)_data).Add(keyValuePair); + ((ICollection>)_data).Add(keyValuePair); } - bool ICollection>.Contains(KeyValuePair keyValuePair) + bool ICollection>.Contains(KeyValuePair keyValuePair) { Load(); - return ((ICollection>)_data).Contains(keyValuePair); + return ((ICollection>)_data).Contains(keyValuePair); } - bool ICollection>.Remove(KeyValuePair keyValuePair) + bool ICollection>.Remove(KeyValuePair keyValuePair) { Load(); _initialKeys.Remove(keyValuePair.Key); - return ((ICollection>)_data).Remove(keyValuePair); + return ((ICollection>)_data).Remove(keyValuePair); } IEnumerator IEnumerable.GetEnumerator() @@ -261,22 +277,25 @@ IEnumerator IEnumerable.GetEnumerator() return new TempDataDictionaryEnumerator(this); } - private sealed class TempDataDictionaryEnumerator : IEnumerator> + private sealed class TempDataDictionaryEnumerator : IEnumerator> { - private readonly IEnumerator> _enumerator; + // Do not make this readonly. This prevents MoveNext from functioning. + private Dictionary.Enumerator _enumerator; private readonly TempDataDictionary _tempData; public TempDataDictionaryEnumerator(TempDataDictionary tempData) { _tempData = tempData; + _tempData.AssertLoaded(); _enumerator = _tempData._data.GetEnumerator(); } - public KeyValuePair Current + public KeyValuePair Current { get { var kvp = _enumerator.Current; + _tempData.AssertLoaded(); // Mark the key for deletion since it is read. _tempData._initialKeys.Remove(kvp.Key); return kvp; @@ -292,7 +311,7 @@ public bool MoveNext() public void Reset() { - _enumerator.Reset(); + ((IEnumerator < KeyValuePair>)_enumerator).Reset(); } void IDisposable.Dispose() diff --git a/src/Mvc/Mvc.ViewFeatures/src/ValidateAntiForgeryTokenAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/ValidateAntiForgeryTokenAttribute.cs index cfdc6e14c86c..98ccc00d0214 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ValidateAntiForgeryTokenAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ValidateAntiForgeryTokenAttribute.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ViewFeatures.Filters; @@ -47,4 +49,4 @@ public IFilterMetadata CreateInstance(IServiceProvider serviceProvider) return serviceProvider.GetRequiredService(); } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponent.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponent.cs index df9d17e5b972..f93893606e9f 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponent.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponent.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Security.Claims; using System.Security.Principal; @@ -22,35 +24,35 @@ namespace Microsoft.AspNetCore.Mvc [ViewComponent] public abstract class ViewComponent { - private IUrlHelper _url; - private dynamic _viewBag; - private ViewComponentContext _viewComponentContext; - private ICompositeViewEngine _viewEngine; + private IUrlHelper? _url; + private dynamic? _viewBag; + private ViewComponentContext? _viewComponentContext; + private ICompositeViewEngine? _viewEngine; /// /// Gets the . /// - public HttpContext HttpContext => ViewContext?.HttpContext; + public HttpContext HttpContext => ViewContext?.HttpContext!; /// /// Gets the . /// - public HttpRequest Request => ViewContext?.HttpContext?.Request; + public HttpRequest Request => ViewContext?.HttpContext?.Request!; /// /// Gets the for the current user. /// - public IPrincipal User => ViewContext?.HttpContext?.User; + public IPrincipal User => ViewContext?.HttpContext?.User!; /// /// Gets the for the current user. /// - public ClaimsPrincipal UserClaimsPrincipal => ViewContext?.HttpContext?.User; + public ClaimsPrincipal UserClaimsPrincipal => ViewContext?.HttpContext?.User!; /// /// Gets the for the current request. /// - public RouteData RouteData => ViewContext?.RouteData; + public RouteData RouteData => ViewContext?.RouteData!; /// /// Gets the view bag. @@ -71,7 +73,7 @@ public dynamic ViewBag /// /// Gets the . /// - public ModelStateDictionary ModelState => ViewData?.ModelState; + public ModelStateDictionary ModelState => ViewData?.ModelState!; /// /// Gets or sets the . @@ -85,10 +87,10 @@ public IUrlHelper Url // May be null in unit-testing scenarios. var services = ViewComponentContext.ViewContext?.HttpContext?.RequestServices; var factory = services?.GetRequiredService(); - _url = factory?.GetUrlHelper(ViewComponentContext.ViewContext); + _url = factory?.GetUrlHelper(ViewComponentContext.ViewContext!); } - return _url; + return _url!; } set { @@ -157,7 +159,7 @@ public ICompositeViewEngine ViewEngine _viewEngine = services?.GetRequiredService(); } - return _viewEngine; + return _viewEngine!; } set { @@ -199,7 +201,7 @@ public ViewViewComponentResult View() /// /// The name of the partial view to render. /// A . - public ViewViewComponentResult View(string viewName) + public ViewViewComponentResult View(string? viewName) { return View(viewName, ViewData.Model); } @@ -209,7 +211,7 @@ public ViewViewComponentResult View(string viewName) /// /// The model object for the view. /// A . - public ViewViewComponentResult View(TModel model) + public ViewViewComponentResult View(TModel? model) { return View(viewName: null, model: model); } @@ -220,9 +222,9 @@ public ViewViewComponentResult View(TModel model) /// The name of the partial view to render. /// The model object for the view. /// A . - public ViewViewComponentResult View(string viewName, TModel model) + public ViewViewComponentResult View(string? viewName, TModel? model) { - var viewData = new ViewDataDictionary(ViewData, model); + var viewData = new ViewDataDictionary(ViewData, model); return new ViewViewComponentResult { ViewEngine = ViewEngine, diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResult.cs index f4d2385ea5a1..8eef0910c1cd 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Infrastructure; @@ -17,7 +19,7 @@ public class ViewComponentResult : ActionResult, IStatusCodeActionResult /// /// Gets or sets the arguments provided to the view component. /// - public object Arguments { get; set; } + public object? Arguments { get; set; } /// /// Gets or sets the HTTP status code. @@ -28,32 +30,32 @@ public class ViewComponentResult : ActionResult, IStatusCodeActionResult /// Gets or sets the name of the view component to invoke. Will be ignored if /// is set to a non-null value. /// - public string ViewComponentName { get; set; } + public string? ViewComponentName { get; set; } /// /// Gets or sets the type of the view component to invoke. /// - public Type ViewComponentType { get; set; } + public Type? ViewComponentType { get; set; } /// /// Get the view data model. /// - public object Model => ViewData?.Model; + public object? Model => ViewData?.Model; /// /// Gets or sets the for this result. /// - public ViewDataDictionary ViewData { get; set; } + public ViewDataDictionary ViewData { get; set; } = default!; /// /// Gets or sets the for this result. /// - public ITempDataDictionary TempData { get; set; } + public ITempDataDictionary TempData { get; set; } = default!; /// /// Gets or sets the Content-Type header for the response. /// - public string ContentType { get; set; } + public string? ContentType { get; set; } /// public override Task ExecuteResultAsync(ActionContext context) diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResultExecutor.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResultExecutor.cs index 0dc7618a593c..d31b1d61830d 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResultExecutor.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponentResultExecutor.cs @@ -1,8 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; -using System.IO; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; @@ -29,7 +30,7 @@ public class ViewComponentResultExecutor : IActionResultExecutor _logger; private readonly IModelMetadataProvider _modelMetadataProvider; private readonly ITempDataDictionaryFactory _tempDataDictionaryFactory; - private IHttpResponseStreamWriterFactory _writerFactory; + private readonly IHttpResponseStreamWriterFactory _writerFactory; /// /// Initialize a new instance of @@ -122,42 +123,38 @@ public virtual async Task ExecuteAsync(ActionContext context, ViewComponentResul response.StatusCode = result.StatusCode.Value; } - _writerFactory ??= context.HttpContext.RequestServices.GetRequiredService(); - - await using (var writer = _writerFactory.CreateWriter(response.Body, resolvedContentTypeEncoding)) - { - var viewContext = new ViewContext( - context, - NullView.Instance, - viewData, - tempData, - writer, - _htmlHelperOptions); + await using var writer = _writerFactory.CreateWriter(response.Body, resolvedContentTypeEncoding); + var viewContext = new ViewContext( + context, + NullView.Instance, + viewData, + tempData, + writer, + _htmlHelperOptions); - OnExecuting(viewContext); + OnExecuting(viewContext); - // IViewComponentHelper is stateful, we want to make sure to retrieve it every time we need it. - var viewComponentHelper = context.HttpContext.RequestServices.GetRequiredService(); - (viewComponentHelper as IViewContextAware)?.Contextualize(viewContext); - var viewComponentResult = await GetViewComponentResult(viewComponentHelper, _logger, result); + // IViewComponentHelper is stateful, we want to make sure to retrieve it every time we need it. + var viewComponentHelper = context.HttpContext.RequestServices.GetRequiredService(); + (viewComponentHelper as IViewContextAware)?.Contextualize(viewContext); + var viewComponentResult = await GetViewComponentResult(viewComponentHelper, _logger, result); - if (viewComponentResult is ViewBuffer viewBuffer) + if (viewComponentResult is ViewBuffer viewBuffer) + { + // In the ordinary case, DefaultViewComponentHelper will return an instance of ViewBuffer. We can simply + // invoke WriteToAsync on it. + await viewBuffer.WriteToAsync(writer, _htmlEncoder); + await writer.FlushAsync(); + } + else + { + await using var bufferingStream = new FileBufferingWriteStream(); + await using (var intermediateWriter = _writerFactory.CreateWriter(bufferingStream, resolvedContentTypeEncoding)) { - // In the ordinary case, DefaultViewComponentHelper will return an instance of ViewBuffer. We can simply - // invoke WriteToAsync on it. - await viewBuffer.WriteToAsync(writer, _htmlEncoder); - await writer.FlushAsync(); + viewComponentResult.WriteTo(intermediateWriter, _htmlEncoder); } - else - { - await using var bufferingStream = new FileBufferingWriteStream(); - await using (var intermediateWriter = _writerFactory.CreateWriter(bufferingStream, resolvedContentTypeEncoding)) - { - viewComponentResult.WriteTo(intermediateWriter, _htmlEncoder); - } - await bufferingStream.DrainBufferAsync(response.Body); - } + await bufferingStream.DrainBufferAsync(response.Body); } } @@ -181,7 +178,7 @@ private Task GetViewComponentResult(IViewComponentHelper viewCompo else if (result.ViewComponentType == null) { logger.ViewComponentResultExecuting(result.ViewComponentName); - return viewComponentHelper.InvokeAsync(result.ViewComponentName, result.Arguments); + return viewComponentHelper.InvokeAsync(result.ViewComponentName!, result.Arguments); } else { diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ContentViewComponentResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ContentViewComponentResult.cs index 3f9318967857..43a3284f19dc 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ContentViewComponentResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ContentViewComponentResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentHelper.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentHelper.cs index d446a6c172f5..9e42330080be 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentHelper.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Reflection; @@ -24,7 +26,7 @@ public class DefaultViewComponentHelper : IViewComponentHelper, IViewContextAwar private readonly IViewComponentInvokerFactory _invokerFactory; private readonly IViewComponentSelector _selector; private readonly IViewBufferScope _viewBufferScope; - private ViewContext _viewContext; + private ViewContext _viewContext = default!; /// /// Initializes a new instance of . @@ -41,8 +43,7 @@ public DefaultViewComponentHelper( HtmlEncoder htmlEncoder, IViewComponentSelector selector, IViewComponentInvokerFactory invokerFactory, - IViewBufferScope viewBufferScope - ) + IViewBufferScope viewBufferScope) { if (descriptorProvider == null) { @@ -88,7 +89,7 @@ public void Contextualize(ViewContext viewContext) } /// - public Task InvokeAsync(string name, object arguments) + public Task InvokeAsync(string name, object? arguments) { if (name == null) { @@ -109,7 +110,7 @@ public Task InvokeAsync(string name, object arguments) } /// - public Task InvokeAsync(Type componentType, object arguments) + public Task InvokeAsync(Type componentType, object? arguments) { if (componentType == null) { @@ -126,7 +127,7 @@ private ViewComponentDescriptor SelectComponent(Type componentType) for (var i = 0; i < descriptors.Items.Count; i++) { var descriptor = descriptors.Items[i]; - if (descriptor.TypeInfo == componentType?.GetTypeInfo()) + if (descriptor.TypeInfo == componentType.GetTypeInfo()) { return descriptor; } @@ -140,15 +141,15 @@ private ViewComponentDescriptor SelectComponent(Type componentType) } // Internal for testing - internal IDictionary GetArgumentDictionary(ViewComponentDescriptor descriptor, object arguments) + internal IDictionary GetArgumentDictionary(ViewComponentDescriptor descriptor, object? arguments) { if (arguments != null) { if (descriptor.Parameters.Count == 1 && descriptor.Parameters[0].ParameterType.IsAssignableFrom(arguments.GetType())) { - return new Dictionary(capacity: 1, comparer: StringComparer.OrdinalIgnoreCase) + return new Dictionary(capacity: 1, comparer: StringComparer.OrdinalIgnoreCase) { - { descriptor.Parameters[0].Name, arguments } + { descriptor.Parameters[0].Name!, arguments } }; } } @@ -156,7 +157,7 @@ internal IDictionary GetArgumentDictionary(ViewComponentDescript return PropertyHelper.ObjectToDictionary(arguments); } - private async Task InvokeCoreAsync(ViewComponentDescriptor descriptor, object arguments) + private async Task InvokeCoreAsync(ViewComponentDescriptor descriptor, object? arguments) { var argumentDictionary = GetArgumentDictionary(descriptor, arguments); diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentInvoker.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentInvoker.cs index a2f3e2ae98b7..401d8d8fcaed 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentInvoker.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/DefaultViewComponentInvoker.cs @@ -215,7 +215,7 @@ private static IViewComponentResult CoerceToViewComponentResult(object? value) } private static object?[]? PrepareArguments( - IDictionary parameters, + IDictionary parameters, ObjectMethodExecutor objectMethodExecutor) { var declaredParameterInfos = objectMethodExecutor.MethodParameters; diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/HtmlContentViewComponentResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/HtmlContentViewComponentResult.cs index e13faea8c8f7..2fba108c44bc 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/HtmlContentViewComponentResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/HtmlContentViewComponentResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewComponentContext.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewComponentContext.cs index 32e4fbd33820..63c2190207ec 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewComponentContext.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewComponentContext.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.IO; @@ -39,7 +41,7 @@ public ViewComponentContext() /// The for writing output. public ViewComponentContext( ViewComponentDescriptor viewComponentDescriptor, - IDictionary arguments, + IDictionary arguments, HtmlEncoder htmlEncoder, ViewContext viewContext, TextWriter writer) @@ -88,7 +90,7 @@ public ViewComponentContext( /// /// The property setter is provided for unit test purposes only. /// - public IDictionary Arguments { get; set; } + public IDictionary Arguments { get; set; } = default!; /// /// Gets or sets the . @@ -96,7 +98,7 @@ public ViewComponentContext( /// /// The property setter is provided for unit test purposes only. /// - public HtmlEncoder HtmlEncoder { get; set; } + public HtmlEncoder HtmlEncoder { get; set; } = default!; /// /// Gets or sets the for the view component being invoked. diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewViewComponentResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewViewComponentResult.cs index e9196c5a183b..1dde27d809be 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewViewComponentResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewComponents/ViewViewComponentResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -22,27 +24,27 @@ public class ViewViewComponentResult : IViewComponentResult private const string ViewPathFormat = "Components/{0}/{1}"; private const string DefaultViewName = "Default"; - private DiagnosticListener _diagnosticListener; + private DiagnosticListener? _diagnosticListener; /// /// Gets or sets the view name. /// - public string ViewName { get; set; } + public string? ViewName { get; set; } /// /// Gets or sets the . /// - public ViewDataDictionary ViewData { get; set; } + public ViewDataDictionary? ViewData { get; set; } /// /// Gets or sets the instance. /// - public ITempDataDictionary TempData { get; set; } + public ITempDataDictionary TempData { get; set; } = default!; /// /// Gets or sets the . /// - public IViewEngine ViewEngine { get; set; } + public IViewEngine? ViewEngine { get; set; } /// /// Locates and renders a view specified by . If is null, @@ -80,12 +82,12 @@ public async Task ExecuteAsync(ViewComponentContext context) var viewContext = context.ViewContext; var isNullOrEmptyViewName = string.IsNullOrEmpty(ViewName); - ViewEngineResult result = null; - IEnumerable originalLocations = null; + ViewEngineResult? result = null; + IEnumerable? originalLocations = null; if (!isNullOrEmptyViewName) { // If view name was passed in is already a path, the view engine will handle this. - result = viewEngine.GetView(viewContext.ExecutingFilePath, ViewName, isMainPage: false); + result = viewEngine.GetView(viewContext.ExecutingFilePath, ViewName!, isMainPage: false); originalLocations = result.SearchedLocations; } @@ -112,7 +114,7 @@ public async Task ExecuteAsync(ViewComponentContext context) result = viewEngine.FindView(viewContext, qualifiedViewName, isMainPage: false); } - var view = result.EnsureSuccessful(originalLocations).View; + var view = result.EnsureSuccessful(originalLocations).View!; using (view as IDisposable) { if (_diagnosticListener == null) diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewDataAttribute.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewDataAttribute.cs index e9b4c84aa29e..079c245ab25d 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewDataAttribute.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewDataAttribute.cs @@ -1,6 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using Microsoft.AspNetCore.Mvc.ViewFeatures; @@ -18,6 +20,6 @@ public sealed class ViewDataAttribute : Attribute /// Gets or sets the key used to get or add the property from value from . /// When unspecified, the key is the property name. /// - public string Key { get; set; } + public string? Key { get; set; } } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionary.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionary.cs index d67e24ac48f5..c1c72af98384 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionary.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionary.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections; using System.Collections.Generic; @@ -14,9 +16,9 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures /// /// A for view data. /// - public class ViewDataDictionary : IDictionary + public class ViewDataDictionary : IDictionary { - private readonly IDictionary _data; + private readonly IDictionary _data; private readonly Type _declaredModelType; private readonly IModelMetadataProvider _metadataProvider; @@ -112,7 +114,7 @@ protected ViewDataDictionary( : this(metadataProvider, modelState, declaredModelType, - data: new Dictionary(StringComparer.OrdinalIgnoreCase), + data: new Dictionary(StringComparer.OrdinalIgnoreCase), templateInfo: new TemplateInfo()) { if (metadataProvider == null) @@ -181,11 +183,11 @@ protected ViewDataDictionary(ViewDataDictionary source, Type declaredModelType) /// /// // This is the core constructor called when Model is known. - protected ViewDataDictionary(ViewDataDictionary source, object model, Type declaredModelType) + protected ViewDataDictionary(ViewDataDictionary source, object? model, Type declaredModelType) : this(source._metadataProvider, source.ModelState, declaredModelType, - data: new CopyOnWriteDictionary(source, StringComparer.OrdinalIgnoreCase), + data: new CopyOnWriteDictionary(source, StringComparer.OrdinalIgnoreCase), templateInfo: new TemplateInfo(source.TemplateInfo)) { if (source == null) @@ -253,7 +255,7 @@ private ViewDataDictionary( IModelMetadataProvider metadataProvider, ModelStateDictionary modelState, Type declaredModelType, - IDictionary data, + IDictionary data, TemplateInfo templateInfo) { _metadataProvider = metadataProvider; @@ -266,7 +268,7 @@ private ViewDataDictionary( /// /// Gets or sets the current model. /// - public object Model + public object? Model { get { @@ -303,7 +305,7 @@ public ModelMetadata ModelMetadata /// /// Gets or sets the for the . /// - public ModelExplorer ModelExplorer { get; set; } + public ModelExplorer ModelExplorer { get; set; } = default!; /// /// Gets the . @@ -313,12 +315,11 @@ public ModelMetadata ModelMetadata #region IDictionary properties /// // Do not just pass through to _data: Indexer should not throw a KeyNotFoundException. - public object this[string index] + public object? this[string index] { get { - object result; - _data.TryGetValue(index, out result); + _data.TryGetValue(index, out var result); return result; } set @@ -346,14 +347,14 @@ public ICollection Keys } /// - public ICollection Values + public ICollection Values { get { return _data.Values; } } #endregion // for unit testing - internal IDictionary Data + internal IDictionary Data { get { return _data; } } @@ -367,7 +368,7 @@ internal IDictionary Data /// Looks up in the dictionary first. Falls back to evaluating it against /// . /// - public object Eval(string expression) + public object? Eval(string? expression) { var info = GetViewDataInfo(expression); return info?.Value; @@ -389,7 +390,7 @@ public object Eval(string expression) /// Looks up in the dictionary first. Falls back to evaluating it against /// . /// - public string Eval(string expression, string format) + public string? Eval(string? expression, string? format) { var value = Eval(expression); return FormatValue(value, format); @@ -403,7 +404,7 @@ public string Eval(string expression, string format) /// The format string (see https://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// /// The formatted . - public static string FormatValue(object value, string format) + public static string? FormatValue(object? value, string? format) { if (value == null) { @@ -433,7 +434,7 @@ public static string FormatValue(object value, string format) /// Looks up in the dictionary first. Falls back to evaluating it against /// . /// - public ViewDataInfo GetViewDataInfo(string expression) + public ViewDataInfo? GetViewDataInfo(string? expression) { return ViewDataEvaluator.Eval(this, expression); } @@ -443,7 +444,7 @@ public ViewDataInfo GetViewDataInfo(string expression) /// reflect the new . /// /// New value. - protected virtual void SetModel(object value) + protected virtual void SetModel(object? value) { // Update ModelExplorer to reflect the new value. When possible, preserve ModelMetadata to avoid losing // property information. @@ -489,7 +490,7 @@ protected virtual void SetModel(object value) } // Throw if given value is incompatible with the declared Model Type. - private void EnsureCompatible(object value) + private void EnsureCompatible(object? value) { // IsCompatibleObject verifies if the value is either an instance of _declaredModelType or (if value is // null) that _declaredModelType is a nullable type. @@ -512,7 +513,7 @@ private void EnsureCompatible(object value) // Call after updating the ModelExplorer because this uses both _declaredModelType and ModelMetadata. May // otherwise get incorrect compatibility errors. - private bool IsCompatibleWithDeclaredType(object value) + private bool IsCompatibleWithDeclaredType(object? value) { if (value == null) { @@ -527,7 +528,7 @@ private bool IsCompatibleWithDeclaredType(object value) #region IDictionary methods /// - public void Add(string key, object value) + public void Add(string key, object? value) { if (key == null) { @@ -560,7 +561,7 @@ public bool Remove(string key) } /// - public bool TryGetValue(string key, out object value) + public bool TryGetValue(string key, out object? value) { if (key == null) { @@ -571,7 +572,7 @@ public bool TryGetValue(string key, out object value) } /// - public void Add(KeyValuePair item) + public void Add(KeyValuePair item) { _data.Add(item); } @@ -583,13 +584,13 @@ public void Clear() } /// - public bool Contains(KeyValuePair item) + public bool Contains(KeyValuePair item) { return _data.Contains(item); } /// - public void CopyTo(KeyValuePair[] array, int arrayIndex) + public void CopyTo(KeyValuePair[] array, int arrayIndex) { if (array == null) { @@ -600,13 +601,13 @@ public void CopyTo(KeyValuePair[] array, int arrayIndex) } /// - public bool Remove(KeyValuePair item) + public bool Remove(KeyValuePair item) { return _data.Remove(item); } /// - IEnumerator> IEnumerable>.GetEnumerator() + IEnumerator> IEnumerable>.GetEnumerator() { return _data.GetEnumerator(); } diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionaryOfT.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionaryOfT.cs index 54a51f04cbb3..d44169876d8e 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionaryOfT.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewDataDictionaryOfT.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Microsoft.AspNetCore.Mvc.ViewFeatures @@ -68,7 +70,7 @@ public ViewDataDictionary(ViewDataDictionary source) // Model parameter type is object to allow "model: null" calls even when TModel is a value type. A TModel // parameter would likely require IEquatable type restrictions to pass expected null value to the base // constructor. - public ViewDataDictionary(ViewDataDictionary source, object model) + public ViewDataDictionary(ViewDataDictionary source, object? model) : base(source, model, declaredModelType: typeof(TModel)) { } @@ -84,7 +86,7 @@ internal ViewDataDictionary(IModelMetadataProvider metadataProvider) } /// - public new TModel Model + public new TModel? Model { get { diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/CompositeViewEngine.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/CompositeViewEngine.cs index 5771f6a37d5c..6e9f39f378c5 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/CompositeViewEngine.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/CompositeViewEngine.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Linq; @@ -46,8 +48,8 @@ public ViewEngineResult FindView(ActionContext context, string viewName, bool is } // Do not allocate in the common cases: ViewEngines contains one entry or initial attempt is successful. - IEnumerable searchedLocations = null; - List searchedList = null; + IEnumerable? searchedLocations = null; + List? searchedList = null; for (var i = 0; i < ViewEngines.Count; i++) { var result = ViewEngines[i].FindView(context, viewName, isMainPage); @@ -82,7 +84,7 @@ public ViewEngineResult FindView(ActionContext context, string viewName, bool is } /// - public ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage) + public ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage) { if (string.IsNullOrEmpty(viewPath)) { @@ -98,8 +100,8 @@ public ViewEngineResult GetView(string executingFilePath, string viewPath, bool } // Do not allocate in the common cases: ViewEngines contains one entry or initial attempt is successful. - IEnumerable searchedLocations = null; - List searchedList = null; + IEnumerable? searchedLocations = null; + List? searchedList = null; for (var i = 0; i < ViewEngines.Count; i++) { var result = ViewEngines[i].GetView(executingFilePath, viewPath, isMainPage); @@ -122,7 +124,10 @@ public ViewEngineResult GetView(string executingFilePath, string viewPath, bool searchedLocations = searchedList; } - searchedList.AddRange(result.SearchedLocations); + if (result.SearchedLocations is not null) + { + searchedList.AddRange(result.SearchedLocations); + } } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ICompositeViewEngine.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ICompositeViewEngine.cs index 053edca3dd6b..95a872afc0b0 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ICompositeViewEngine.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ICompositeViewEngine.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System.Collections.Generic; namespace Microsoft.AspNetCore.Mvc.ViewEngines @@ -16,4 +18,4 @@ public interface ICompositeViewEngine : IViewEngine /// IReadOnlyList ViewEngines { get; } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IView.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IView.cs index 165b577170ec..ab2e11a3a4e8 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IView.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IView.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Rendering; diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IViewEngine.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IViewEngine.cs index f6f5c93cc72c..3967b6a4ff6f 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IViewEngine.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/IViewEngine.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + namespace Microsoft.AspNetCore.Mvc.ViewEngines { /// @@ -28,6 +30,6 @@ public interface IViewEngine /// The path to the view. /// Determines if the page being found is the main page for an action. /// The of locating the view. - ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage); + ViewEngineResult GetView(string? executingFilePath, string viewPath, bool isMainPage); } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ViewEngineResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ViewEngineResult.cs index 472f5220cc75..290ba637ec01 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ViewEngineResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewEngines/ViewEngineResult.cs @@ -1,8 +1,11 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.AspNetCore.Mvc.ViewFeatures; @@ -13,19 +16,20 @@ namespace Microsoft.AspNetCore.Mvc.ViewEngines /// public class ViewEngineResult { - private ViewEngineResult() + private ViewEngineResult(string viewName) { + ViewName = viewName; } /// /// The list of locations searched. /// - public IEnumerable SearchedLocations { get; private set; } + public IEnumerable SearchedLocations { get; private init; } = Enumerable.Empty(); /// /// The . /// - public IView View { get; private set; } + public IView? View { get; private init; } /// /// Gets or sets the name of the view. @@ -35,6 +39,7 @@ private ViewEngineResult() /// /// Whether the result was successful /// + [MemberNotNullWhen(true, nameof(View))] public bool Success => View != null; /// @@ -57,10 +62,9 @@ public static ViewEngineResult NotFound( throw new ArgumentNullException(nameof(searchedLocations)); } - return new ViewEngineResult + return new ViewEngineResult(viewName) { SearchedLocations = searchedLocations, - ViewName = viewName, }; } @@ -82,10 +86,9 @@ public static ViewEngineResult Found(string viewName, IView view) throw new ArgumentNullException(nameof(view)); } - return new ViewEngineResult + return new ViewEngineResult(viewName) { View = view, - ViewName = viewName, }; } @@ -100,7 +103,8 @@ public static ViewEngineResult Found(string viewName, IView view) /// Thrown if is false. /// /// This if is true. - public ViewEngineResult EnsureSuccessful(IEnumerable originalLocations) + [MemberNotNull(nameof(View))] + public ViewEngineResult EnsureSuccessful(IEnumerable? originalLocations) { if (!Success) { diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewExecutor.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewExecutor.cs index 3fb9a54b92da..2c9e7fd860ee 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewExecutor.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewExecutor.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Diagnostics; using System.IO; @@ -102,7 +104,7 @@ protected ViewExecutor( /// /// Gets the . /// - protected ITempDataDictionaryFactory TempDataFactory { get; } + protected ITempDataDictionaryFactory? TempDataFactory { get; } /// /// Gets the default . @@ -112,12 +114,12 @@ protected ViewExecutor( /// /// Gets the . /// - protected MvcViewOptions ViewOptions { get; } + protected MvcViewOptions? ViewOptions { get; } /// /// Gets the . /// - protected IModelMetadataProvider ModelMetadataProvider { get; } + protected IModelMetadataProvider? ModelMetadataProvider { get; } /// /// Gets the . @@ -144,7 +146,7 @@ public virtual async Task ExecuteAsync( IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, - string contentType, + string? contentType, int? statusCode) { if (actionContext == null) @@ -207,7 +209,7 @@ public virtual async Task ExecuteAsync( /// A which will complete when view execution is completed. protected async Task ExecuteAsync( ViewContext viewContext, - string contentType, + string? contentType, int? statusCode) { if (viewContext == null) diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewResult.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewResult.cs index d99aaefa0d1e..466f8bd99c57 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewResult.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewResult.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Controllers; @@ -27,34 +29,34 @@ public class ViewResult : ActionResult, IStatusCodeActionResult /// /// When null, defaults to . /// - public string ViewName { get; set; } + public string? ViewName { get; set; } /// /// Gets the view data model. /// - public object Model => ViewData?.Model; + public object? Model => ViewData?.Model; /// /// Gets or sets the for this result. /// - public ViewDataDictionary ViewData { get; set; } + public ViewDataDictionary ViewData { get; set; } = default!; /// /// Gets or sets the for this result. /// - public ITempDataDictionary TempData { get; set; } + public ITempDataDictionary TempData { get; set; } = default!; /// /// Gets or sets the used to locate views. /// /// When null, an instance of from /// ActionContext.HttpContext.RequestServices is used. - public IViewEngine ViewEngine { get; set; } + public IViewEngine? ViewEngine { get; set; } /// /// Gets or sets the Content-Type header for the response. /// - public string ContentType { get; set; } + public string? ContentType { get; set; } /// public override async Task ExecuteResultAsync(ActionContext context) diff --git a/src/Mvc/Mvc.ViewFeatures/src/ViewResultExecutor.cs b/src/Mvc/Mvc.ViewFeatures/src/ViewResultExecutor.cs index 69b8750e2fd6..8674afb04161 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/ViewResultExecutor.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/ViewResultExecutor.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -76,7 +78,7 @@ public virtual ViewEngineResult FindView(ActionContext actionContext, ViewResult var viewEngine = viewResult.ViewEngine ?? ViewEngine; - var viewName = viewResult.ViewName ?? GetActionName(actionContext); + var viewName = viewResult.ViewName ?? GetActionName(actionContext) ?? string.Empty; var stopwatch = ValueStopwatch.StartNew(); @@ -109,7 +111,7 @@ public virtual ViewEngineResult FindView(ActionContext actionContext, ViewResult if (DiagnosticListener.IsEnabled()) { - OutputDiagnostics(actionContext, viewResult, viewName, stopwatch, result); + OutputDiagnostics(actionContext, viewResult, viewName, result); } if (result.Success) @@ -124,7 +126,7 @@ public virtual ViewEngineResult FindView(ActionContext actionContext, ViewResult return result; } - private void OutputDiagnostics(ActionContext actionContext, ViewResult viewResult, string viewName, ValueStopwatch stopwatch, ViewEngineResult result) + private void OutputDiagnostics(ActionContext actionContext, ViewResult viewResult, string viewName, ViewEngineResult result) { if (result.Success) { @@ -179,7 +181,7 @@ await ExecuteAsync( Logger.ViewResultExecuted(viewEngineResult.ViewName, stopwatch.GetElapsedTime()); } - private static string GetActionName(ActionContext context) + private static string? GetActionName(ActionContext context) { if (context == null) { @@ -192,7 +194,7 @@ private static string GetActionName(ActionContext context) } var actionDescriptor = context.ActionDescriptor; - string normalizedValue = null; + string? normalizedValue = null; if (actionDescriptor.RouteValues.TryGetValue(ActionNameKey, out var value) && !string.IsNullOrEmpty(value)) { diff --git a/src/Shared/PropertyHelper/PropertyHelper.cs b/src/Shared/PropertyHelper/PropertyHelper.cs index 94bac275cc98..d6672216987b 100644 --- a/src/Shared/PropertyHelper/PropertyHelper.cs +++ b/src/Shared/PropertyHelper/PropertyHelper.cs @@ -334,7 +334,7 @@ public static PropertyHelper[] GetVisibleProperties(Type type) /// The implementation of PropertyHelper will cache the property accessors per-type. This is /// faster when the same type is used multiple times with ObjectToDictionary. /// - public static IDictionary ObjectToDictionary(object value) + public static IDictionary ObjectToDictionary(object? value) { if (value is IDictionary dictionary) { @@ -343,7 +343,7 @@ public static PropertyHelper[] GetVisibleProperties(Type type) dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase); - if (value != null) + if (value is not null) { foreach (var helper in GetProperties(value.GetType())) {