5 overrides of ParameterType
Microsoft.Extensions.Validation.Tests (1)
System.Private.CoreLib (1)
System.Reflection.Context (1)
System.Reflection.Emit (1)
System.Reflection.MetadataLoadContext (1)
906 references to ParameterType
dotnet-svcutil-lib (32)
GenerateDocumentationAndConfigFiles (2)
GetDocument.Insider (1)
InProcessWebSite (2)
Metrics (2)
Metrics.Legacy (2)
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore.App.Analyzers.Test (2)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Components.Endpoints (6)
Microsoft.AspNetCore.Connections.Abstractions (8)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.Http.Abstractions (10)
Microsoft.AspNetCore.Http.Extensions (108)
RequestDelegateFactory.cs (80)
675factoryContext.ArgumentTypes[i] = parameters[i].ParameterType;
707throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
710if (parameter.ParameterType.IsByRef)
723throw new NotSupportedException($"The by reference parameter '{attribute} {TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)} {parameter.Name}' is not supported.");
753if (parameter.ParameterType == typeof(Stream))
757else if (parameter.ParameterType == typeof(PipeReader))
766if (parameter.ParameterType == typeof(IFormFileCollection))
776else if (parameter.ParameterType == typeof(IFormFile))
780else if (parameter.ParameterType == typeof(IFormCollection))
795var useSimpleBinding = StringTypes.Contains(parameter.ParameterType) ||
796ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType) ||
797(parameter.ParameterType.IsArray &&
798(StringTypes.Contains(parameter.ParameterType.GetElementType()) ||
799ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!)));
835else if (parameter.ParameterType == typeof(HttpContext))
839else if (parameter.ParameterType == typeof(HttpRequest))
843else if (parameter.ParameterType == typeof(HttpResponse))
847else if (parameter.ParameterType == typeof(ClaimsPrincipal))
851else if (parameter.ParameterType == typeof(CancellationToken))
855else if (parameter.ParameterType == typeof(IFormCollection))
859else if (parameter.ParameterType == typeof(IFormFileCollection))
863else if (parameter.ParameterType == typeof(IFormFile))
867else if (parameter.ParameterType == typeof(Stream))
871else if (parameter.ParameterType == typeof(PipeReader))
880else if (parameter.ParameterType == typeof(string) || ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType))
907parameter.ParameterType == typeof(string[]) ||
908parameter.ParameterType == typeof(StringValues) ||
909parameter.ParameterType == typeof(StringValues?) ||
910(parameter.ParameterType.IsArray && ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!))))
921if (serviceProviderIsService.IsService(parameter.ParameterType))
924return Expression.Call(GetRequiredServiceMethod.MakeGenericMethod(parameter.ParameterType), RequestServicesExpr);
1308var bodyType = factoryContext.JsonRequestBodyParameter.ParameterType;
1310var parameterTypeName = TypeNameHelper.GetTypeDisplayName(factoryContext.JsonRequestBodyParameter.ParameterType, fullName: false);
1445var parameterTypeName = TypeNameHelper.GetTypeDisplayName(factoryContext.FirstFormRequestBodyParameter.ParameterType, fullName: false);
1573var parameterType = parameter.ParameterType;
1579throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable.");
1582var argumentExpression = Expression.Variable(parameter.ParameterType, $"{parameter.Name}_local");
1651return Expression.Call(GetServiceMethod.MakeGenericMethod(parameter.ParameterType), RequestServicesExpr);
1653return Expression.Call(GetRequiredServiceMethod.MakeGenericMethod(parameter.ParameterType), RequestServicesExpr);
1662return Expression.Call(GetKeyedServiceMethod.MakeGenericMethod(parameter.ParameterType), RequestServicesExpr, Expression.Convert(
1666return Expression.Call(GetRequiredKeyedServiceMethod.MakeGenericMethod(parameter.ParameterType), RequestServicesExpr, Expression.Convert(
1673if (parameter.ParameterType == typeof(string) || parameter.ParameterType == typeof(string[])
1674|| parameter.ParameterType == typeof(StringValues) || parameter.ParameterType == typeof(StringValues?))
1680var argument = Expression.Variable(parameter.ParameterType, $"{parameter.Name}_local");
1682var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1688var targetParseType = parameter.ParameterType.IsArray ? parameter.ParameterType.GetElementType()! : parameter.ParameterType;
1798Expression.Assign(parameter.ParameterType.IsArray ? Expression.ArrayAccess(argument, index) : argument, Expression.Convert(parsedValue, targetParseType)),
1805CreateDefaultValueExpression(parameter.DefaultValue, parameter.ParameterType)));
1810var stringArrayExpr = parameter.ParameterType.IsArray ? Expression.Variable(typeof(string[]), "tempStringArray") : null;
1811var elementTypeNullabilityInfo = parameter.ParameterType.IsArray ? factoryContext.NullabilityContext.Create(parameter)?.ElementType : null;
1817var arrayLoop = parameter.ParameterType.IsArray ? Expression.Block(
1819Expression.Assign(argument, Expression.NewArrayBounds(parameter.ParameterType.GetElementType()!, Expression.ArrayLength(stringArrayExpr!))),
1842var fullParamCheckBlock = (parameter.ParameterType.IsArray, isOptional) switch
1907var argument = Expression.Variable(parameter.ParameterType, $"{parameter.Name}_local");
1909var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1945if (parameter.ParameterType == typeof(StringValues?))
1949Expression.Condition(Expression.Equal(valueExpression, Expression.Convert(Expression.Constant(StringValues.Empty), parameter.ParameterType)),
1950Expression.Convert(Expression.Constant(null), parameter.ParameterType),
1967Expression.Convert(CreateDefaultValueExpression(parameter.DefaultValue, parameter.ParameterType), parameter.ParameterType)));
1972var valueExpression = (source == "header" && parameter.ParameterType.IsArray)
1974: GetValueFromProperty(property, itemProperty, key, GetExpressionType(parameter.ParameterType));
2039var typeName = TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false);
2060return Expression.Convert(boundValueExpr, parameter.ParameterType);
2077AddInferredAcceptsMetadata(factoryContext, factoryContext.FirstFormRequestBodyParameter!.ParameterType, FormFileContentType);
2081AddInferredAcceptsMetadata(factoryContext, factoryContext.FirstFormRequestBodyParameter!.ParameterType, FormContentType);
2115var valueExpression = GetValueFromProperty(FormExpr, FormIndexerProperty, key, GetExpressionType(parameter.ParameterType));
2158var formArgument = Expression.Variable(parameter.ParameterType, $"{parameter.Name}_local");
2200FormDataMapperMapMethod.MakeGenericMethod(parameter.ParameterType),
2216var parameterTypeNameConstant = Expression.Constant(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
2334AddInferredAcceptsMetadata(factoryContext, parameter.ParameterType, DefaultAcceptsAndProducesContentType);
2376Expression.Constant(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)),
2391parameter.ParameterType);
2395return Expression.Convert(BodyValueExpr, parameter.ParameterType);
Microsoft.AspNetCore.Http.Extensions.Tests (41)
ParameterBindingMethodCacheTests.cs (17)
38Assert.Equal(typeof(string), parameters[0].ParameterType);
39Assert.Equal(typeof(NumberStyles), parameters[1].ParameterType);
40Assert.Equal(typeof(IFormatProvider), parameters[2].ParameterType);
56Assert.Equal(typeof(string), parameters[0].ParameterType);
57Assert.Equal(typeof(UriKind), parameters[1].ParameterType);
80Assert.Equal(typeof(string), parameters[0].ParameterType);
81Assert.Equal(typeof(IFormatProvider), parameters[1].ParameterType);
87Assert.Equal(typeof(string), parameters[0].ParameterType);
88Assert.Equal(typeof(IFormatProvider), parameters[1].ParameterType);
89Assert.Equal(typeof(DateTimeStyles), parameters[2].ParameterType);
110Assert.Equal(typeof(string), parameters[0].ParameterType);
111Assert.Equal(typeof(IFormatProvider), parameters[1].ParameterType);
134Assert.Equal(typeof(string), parameters[0].ParameterType);
164Assert.True(new ParameterBindingMethodCache().HasTryParseMethod(parameterInfo.ParameterType));
191Assert.Equal(typeof(string), parameters[0].ParameterType);
1079Assert.Equal(typeof(BindAsyncRecord), parameter.ParameterType);
1095Assert.Equal(typeof(BindAsyncStruct), parameter.ParameterType);
Microsoft.AspNetCore.Http.Microbenchmarks (11)
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Microsoft.AspNetCore.Mvc.Abstractions (4)
Microsoft.AspNetCore.Mvc.ApiExplorer (9)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (33)
Microsoft.AspNetCore.Mvc.IntegrationTests (12)
Microsoft.AspNetCore.Mvc.RazorPages (4)
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.OpenApi (31)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Routing.Abstractions (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Shared.Tests (15)
Microsoft.AspNetCore.SignalR.Core (17)
Microsoft.AspNetCore.TestHost (1)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.EditorFeatures (5)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.Scripting (3)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.CSharp (9)
Microsoft.DotNet.Internal.DependencyInjection.Testing (3)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.RemoteExecutor (2)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Microsoft.DotNet.XUnitExtensions (1)
Microsoft.Extensions.AI.Abstractions (10)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Tests (2)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Configuration.Binder (7)
Microsoft.Extensions.DependencyInjection (9)
Microsoft.Extensions.DependencyInjection.Abstractions (14)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.Validation (4)
Microsoft.Extensions.Validation.GeneratorTests (1)
Microsoft.JSInterop (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (5)
Microsoft.Maui.Controls.Xaml (8)
ApplyPropertiesVisitor.cs (5)
174 addMethod.Invoke(source, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, new XamlServiceProvider(node, Context), out xpe) });
494 if (!parameters[i].ParameterType.IsAssignableFrom(eventInfo.EventHandlerType.GetMethod("Invoke").GetParameters()[i].ParameterType))
753 addMethod.Invoke(collection, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, serviceProvider, out exception) });
821 addMethod.Invoke(collection, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, serviceProvider, out exception) });
Microsoft.ML.Core (17)
Microsoft.ML.Data (3)
Microsoft.ML.Transforms (4)
Microsoft.VisualBasic.Core (73)
Microsoft.VisualStudio.LanguageServices (1)
Mvc.RoutingWebSite (1)
PresentationBuildTasks (8)
PresentationFramework (21)
Roslyn.Diagnostics.Analyzers (2)
System.ComponentModel.Annotations (3)
System.ComponentModel.Composition (5)
System.ComponentModel.Composition.Registration (1)
System.Composition.Convention (2)
System.Composition.Hosting (1)
System.Composition.TypedParts (3)
System.Configuration.ConfigurationManager (2)
System.Linq.Expressions (59)
System\Linq\Expressions\BinaryExpression.cs (13)
294!TypeUtils.AreEquivalent(method.GetParametersCached()[0].ParameterType.GetNonRefType(), Left.Type);
640ValidateParamsWithOperandsOrThrow(pms[0].ParameterType, left.Type, binaryType, method.Name);
641ValidateParamsWithOperandsOrThrow(pms[1].ParameterType, right.Type, binaryType, method.Name);
688ValidateParamsWithOperandsOrThrow(pis[0].ParameterType, left.Type, binaryType, name);
689ValidateParamsWithOperandsOrThrow(pis[1].ParameterType, right.Type, binaryType, name);
747Type pType = pi.ParameterType;
815if (pms[0].ParameterType != pms[1].ParameterType)
819if (method.ReturnType != pms[0].ParameterType)
860TypeUtils.AreEquivalent(pms[1].ParameterType, right.GetNonNullableType());
1563if (!TypeUtils.AreEquivalent(pms[0].ParameterType, method.ReturnType))
2769ValidateParamsWithOperandsOrThrow(pis[0].ParameterType, left.Type, ExpressionType.Power, name);
2770ValidateParamsWithOperandsOrThrow(pis[1].ParameterType, right.Type, ExpressionType.Power, name);
System.Linq.Queryable (4)
System.Private.CoreLib (49)
System.Private.DataContractSerialization (7)
System.Private.Windows.Core (2)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (9)
System.Reflection.Context (5)
System.Reflection.DispatchProxy (6)
System.Reflection.Emit (4)
System.Reflection.MetadataLoadContext (15)
System.Resources.Extensions (2)
System.Runtime.InteropServices (1)
System.Runtime.Serialization.Formatters (2)
System.ServiceModel.Primitives (24)
System.Text.Json (6)
System.Windows.Forms (1)
System.Windows.Forms.Design (13)
System.Xaml (25)
System.Xaml.Tests (4)
Test.Utilities (3)
Text.Analyzers (2)