2 instantiations of ParameterBindingMethodCache
Microsoft.AspNetCore.Mvc.Abstractions (2)
src\Shared\ParameterBindingMethodCache.cs (2)
30
private static readonly Lazy<ParameterBindingMethodCache> _instance = new(() => new
ParameterBindingMethodCache
());
32
private static readonly Lazy<ParameterBindingMethodCache> _nonThrowingInstance = new(() => new
ParameterBindingMethodCache
(throwOnInvalidMethod: false));
9 references to ParameterBindingMethodCache
Microsoft.AspNetCore.Mvc.Abstractions (9)
ModelBinding\ModelMetadata.cs (1)
653
return
ParameterBindingMethodCache
.NonThrowingInstance.FindTryParseMethod(modelType);
src\Shared\ParameterBindingMethodCache.cs (8)
15
using static Microsoft.AspNetCore.Http.
ParameterBindingMethodCache
.SharedExpressions;
24
private static readonly MethodInfo ConvertValueTaskMethod = typeof(
ParameterBindingMethodCache
).GetMethod(nameof(ConvertValueTask), BindingFlags.NonPublic | BindingFlags.Static)!;
25
private static readonly MethodInfo ConvertValueTaskOfNullableResultMethod = typeof(
ParameterBindingMethodCache
).GetMethod(nameof(ConvertValueTaskOfNullableResult), BindingFlags.NonPublic | BindingFlags.Static)!;
26
private static readonly MethodInfo BindAsyncMethod = typeof(
ParameterBindingMethodCache
).GetMethod(nameof(BindAsync), BindingFlags.NonPublic | BindingFlags.Static)!;
30
private static readonly Lazy<
ParameterBindingMethodCache
> _instance = new(() => new ParameterBindingMethodCache());
31
public static
ParameterBindingMethodCache
Instance = _instance.Value;
32
private static readonly Lazy<
ParameterBindingMethodCache
> _nonThrowingInstance = new(() => new ParameterBindingMethodCache(throwOnInvalidMethod: false));
33
public static
ParameterBindingMethodCache
NonThrowingInstance = _nonThrowingInstance.Value;