2 instantiations of ParameterBindingMethodCache
Microsoft.AspNetCore.OpenApi (2)
src\Shared\ParameterBindingMethodCache.cs (2)
30private static readonly Lazy<ParameterBindingMethodCache> _instance = new(() => new ParameterBindingMethodCache()); 32private static readonly Lazy<ParameterBindingMethodCache> _nonThrowingInstance = new(() => new ParameterBindingMethodCache(throwOnInvalidMethod: false));
14 references to ParameterBindingMethodCache
Microsoft.AspNetCore.OpenApi (14)
Services\OpenApiGenerator.cs (5)
260var parameters = PropertyAsParameterInfo.Flatten(methodInfo.GetParameters(), ParameterBindingMethodCache.Instance); 362var parameters = PropertyAsParameterInfo.Flatten(methodInfo.GetParameters(), ParameterBindingMethodCache.Instance); 429ParameterBindingMethodCache.Instance.HasBindAsyncMethod(parameter) || 434else if (parameter.ParameterType == typeof(string) || ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType)) 453(parameter.ParameterType.IsArray && ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!))))
src\Shared\ParameterBindingMethodCache.cs (8)
15using static Microsoft.AspNetCore.Http.ParameterBindingMethodCache.SharedExpressions; 24private static readonly MethodInfo ConvertValueTaskMethod = typeof(ParameterBindingMethodCache).GetMethod(nameof(ConvertValueTask), BindingFlags.NonPublic | BindingFlags.Static)!; 25private static readonly MethodInfo ConvertValueTaskOfNullableResultMethod = typeof(ParameterBindingMethodCache).GetMethod(nameof(ConvertValueTaskOfNullableResult), BindingFlags.NonPublic | BindingFlags.Static)!; 26private static readonly MethodInfo BindAsyncMethod = typeof(ParameterBindingMethodCache).GetMethod(nameof(BindAsync), BindingFlags.NonPublic | BindingFlags.Static)!; 30private static readonly Lazy<ParameterBindingMethodCache> _instance = new(() => new ParameterBindingMethodCache()); 31public static ParameterBindingMethodCache Instance = _instance.Value; 32private static readonly Lazy<ParameterBindingMethodCache> _nonThrowingInstance = new(() => new ParameterBindingMethodCache(throwOnInvalidMethod: false)); 33public static ParameterBindingMethodCache NonThrowingInstance = _nonThrowingInstance.Value;
src\Shared\PropertyAsParameterInfo.cs (1)
64public static ReadOnlySpan<ParameterInfo> Flatten(ParameterInfo[] parameters, ParameterBindingMethodCache cache)