10 types derived from MethodInfo
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
8public abstract class MethodBuilder : MethodInfo
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
9internal sealed class MethodBuilderInstantiation : MethodInfo
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
9internal sealed partial class MethodOnTypeBuilderInstantiation : MethodInfo
System\Reflection\Emit\DynamicMethod.cs (1)
9public sealed class DynamicMethod : MethodInfo
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (1)
24internal abstract partial class RuntimeMethodInfo : MethodInfo
System.Reflection.Context (2)
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (1)
12internal class DelegatingMethodInfo : MethodInfo
System\Reflection\Context\Virtual\VirtualMethodBase.cs (1)
10internal abstract class VirtualMethodBase : MethodInfo
System.Reflection.Emit (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
9internal sealed class MethodBuilderInstantiation : MethodInfo
System\Reflection\Emit\ArrayMethod.cs (1)
8internal sealed class ArrayMethod : MethodInfo
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\TypeExtensions.net.cs (1)
24internal abstract class LeveledMethodInfo : MethodInfo
4763 references to MethodInfo
aspire-managed (3)
NuGet\TrustedRootsHelper.cs (3)
117var setter = typeof(X509TrustStore).GetMethod( 168protected override object? Invoke(MethodInfo? targetMethod, object?[]? args) 205protected override object? Invoke(MethodInfo? targetMethod, object?[]? args)
Aspire.Cli.EndToEnd.Tests (2)
Helpers\CaptureWorkspaceOnFailureAttribute.cs (2)
27public override void Before(MethodInfo methodUnderTest, IXunitTest test) 35public override void After(MethodInfo methodUnderTest, IXunitTest test)
Aspire.Cli.Tests (10)
Certificates\DeveloperCertificateCacheWriteTests.cs (1)
58var writeAspireCacheMethod = typeof(MacOSCertificateManager).GetMethod(
Commands\SdkDumpCommandTests.cs (1)
351var method = typeof(SdkDumpCommand).GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic);
DotNetSdkInstallerTests.cs (4)
242var method = typeof(DotNetSdkInstaller).GetMethod("MeetsMinimumRequirement", 258var method = typeof(DotNetSdkInstaller).GetMethod("MeetsMinimumRequirement", 274var method = typeof(DotNetSdkInstaller).GetMethod("MeetsMinimumRequirement", 290var method = typeof(DotNetSdkInstaller).GetMethod("MeetsMinimumRequirement",
ProgramTests.cs (1)
55var buildAnsiConsole = typeof(Program).GetMethod("BuildAnsiConsole", BindingFlags.NonPublic | BindingFlags.Static);
Projects\GuestAppHostProjectTests.cs (1)
1734var method = typeof(GuestAppHostProject).GetMethod(
Projects\PrebuiltAppHostServerTests.cs (2)
1343var method = typeof(PrebuiltAppHostServer).GetMethod( 1357var method = typeof(PrebuiltAppHostServer).GetMethod(
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (1)
293var showContextMenuAsync = typeof(Components.Pages.Resources)
UseCultureAttribute.cs (2)
66public override void Before(MethodInfo methodUnderTest, IXunitTest test) 84public override void After(MethodInfo methodUnderTest, IXunitTest test)
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
35private static readonly MethodInfo s_dispatchCustomWithReferenceMethod = typeof(ResourceBuilderExtensions).GetMethod(nameof(DispatchCustomWithReference), BindingFlags.NonPublic | BindingFlags.Static)!; 1069var dispatchMethod = s_dispatchCustomWithReferenceMethod.MakeGenericMethod(typeof(TDestination), customType);
Aspire.Hosting.Azure.Kubernetes (2)
AksPreviewIngressProfileInjector.cs (2)
89private static readonly Lazy<MethodInfo> s_defineProperty = new(() => 117var defineProperty = s_defineProperty.Value;
Aspire.Hosting.Azure.Tests (4)
AzureFunctionsTests.cs (1)
20private static readonly MethodInfo s_polyglotWithReferenceMethod = typeof(ResourceBuilderExtensions)
AzureServiceBusExtensionsTests.cs (2)
872var method = typeof(AzureServiceBusExtensions) 899var method = typeof(AzureServiceBusExtensions)
AzureStorageExtensionsTests.cs (1)
1080var method = typeof(AzureStorageExtensions)
Aspire.Hosting.CodeGeneration.TypeScript (1)
TypeScriptApiProjector.cs (1)
1541if (context.Methods.TryGetValue(capability.CapabilityId, out var method))
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
2501var method = typeof(IApiReferenceExporter).GetMethod(nameof(IApiReferenceExporter.ExportApi));
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectPublicApiTests.cs (1)
36foreach (var method in overloads)
Aspire.Hosting.Integration.Analyzers (2)
AspireExportAnalyzer.cs (2)
1951private static readonly MethodInfo? s_isExtensionGetter = typeof(INamedTypeSymbol).GetProperty("IsExtension")?.GetGetMethod(); 1952private static readonly MethodInfo? s_extensionParameterGetter = typeof(INamedTypeSymbol).GetProperty("ExtensionParameter")?.GetGetMethod();
Aspire.Hosting.JavaScript.Tests (1)
AddNodeAppTests.cs (1)
17private static readonly MethodInfo s_polyglotWithReferenceMethod = typeof(ResourceBuilderExtensions)
Aspire.Hosting.PostgreSQL.Tests (1)
AddPostgresTests.cs (1)
734private static readonly MethodInfo s_polyglotWithReferenceMethod = typeof(ResourceBuilderExtensions)
Aspire.Hosting.Qdrant.Tests (1)
AddQdrantTests.cs (1)
17private static readonly MethodInfo s_polyglotWithReferenceMethod = typeof(ResourceBuilderExtensions)
Aspire.Hosting.Radius.Tests (3)
Publishing\SealedSecretPublishTests.cs (2)
152var copyMethod = typeof(RadiusBicepPublishingContext).GetMethod( 177var copyMethod = typeof(RadiusBicepPublishingContext).GetMethod(
Secrets\AddRadiusSecretStoreTests.cs (1)
321var method = typeof(RadiusSecretStoreExtensions)
Aspire.Hosting.RemoteHost (41)
Ats\AtsCallbackProxyFactory.cs (9)
69var invokeMethod = delegateType.GetMethod("Invoke")!; 134var addMethod = jsonObjectType.GetMethod("Add", [typeof(string), typeof(JsonNode)]); 153var marshalMethod = typeof(AtsCallbackProxyFactory).GetMethod( 180var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod( 195var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod( 210var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod( 225var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod( 319var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod( 338var invokeMethod = typeof(AtsCallbackProxyFactory).GetMethod(
Ats\CapabilityDispatcher.cs (9)
150&& result.Methods.TryGetValue(capability.CapabilityId, out var instanceMethod)) 155else if (result.Methods.TryGetValue(capability.CapabilityId, out var method)) 300private void RegisterContextTypeMethod(AtsCapabilityInfo capability, MethodInfo method) 360var methodToInvoke = method; 413private void RegisterFromCapability(AtsCapabilityInfo capability, MethodInfo method) 457var methodToInvoke = method; 628private static async Task<object?> InvokeMethodAsync(MethodInfo method, object? target, object?[] methodArgs, bool runInvocationOnBackgroundThread) 659var asTask = returnType.GetMethod(nameof(ValueTask<int>.AsTask), BindingFlags.Instance | BindingFlags.Public) 688private static object? InvokeMethodCore(MethodInfo method, object? target, object?[] methodArgs)
Ats\GenericMethodResolver.cs (2)
19public static MethodInfo MakeGenericMethodFromArgs(MethodInfo method, object?[] arguments)
Ats\ReferenceExpressionRef.cs (4)
328var appendLiteralMethod = builder.GetType().GetMethod( 341var appendValueProviderMethod = builder.GetType().GetMethod( 354var buildMethod = builder.GetType().GetMethod("Build", BindingFlags.Instance | BindingFlags.Public) 370var createConditionalMethod = referenceExpressionType.GetMethod(
AtsCapabilityScanner.cs (13)
51public Dictionary<string, MethodInfo> Methods { get; init; } = new(); 147var allMethods = new Dictionary<string, MethodInfo>(); 306var methods = new Dictionary<string, MethodInfo>(); 413foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)) 1527public Dictionary<string, MethodInfo> Methods { get; init; } = new(); 1543var methods = new Dictionary<string, MethodInfo>(); 1776foreach (var method in contextType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) 1974MethodInfo method, 2175var invokeMethod = delegateType.GetMethod("Invoke"); 3070MethodInfo method, 3176var invokeMethod = type.GetMethod("Invoke"); 3193private static AspireExportData? GetAspireExportAttribute(MethodInfo method) 3228private static bool HasExportIgnoreAttribute(MethodInfo method)
AtsContextFilter.cs (4)
150if (context.Methods.TryGetValue(capability.CapabilityId, out var method)) 293if (context.Methods.TryGetValue(capability.CapabilityId, out var method)) 505if (context.Methods.TryGetValue(capability.CapabilityId, out var method)) 651if (context.Methods.TryGetValue(capability.CapabilityId, out var method))
Aspire.Hosting.RemoteHost.Tests (29)
AtsCapabilityScannerTests.cs (1)
575var withConfigurationMethod = Assert.Single(result.Methods,
AtsContextFilterTests.cs (2)
96var method = typeof(AtsContextFilterTests).GetMethod(nameof(TryResolveCanonicalAssemblyName_ReportsAnUnmatchedName))!; 626var testMethod = typeof(AtsContextFilterTests).GetMethod(nameof(TestCapability), BindingFlags.Static | BindingFlags.NonPublic)!;
AttributeDataReaderTests.cs (8)
29var method = typeof(OfficialAttributeExports).GetMethod(nameof(OfficialAttributeExports.OfficialExportMethod))!; 40var method = typeof(ThirdPartyExports).GetMethod(nameof(ThirdPartyExports.ThirdPartyMethod))!; 99var method = typeof(OfficialAttributeExports).GetMethod(nameof(OfficialAttributeExports.OfficialUnionMethod))!; 112var method = typeof(ThirdPartyExports).GetMethod(nameof(ThirdPartyExports.ThirdPartyMethod))!; 122var method = typeof(OfficialAttributeExports).GetMethod(nameof(OfficialAttributeExports.ObsoleteExportMethod))!; 133var method = typeof(OfficialAttributeExports).GetMethod(nameof(OfficialAttributeExports.OverriddenNameMethod))!; 154var method = CreateCompatibleExportMethod(); 313private static MethodInfo CreateCompatibleExportMethod()
GenericMethodResolverTests.cs (18)
14var method = typeof(TestMethods).GetMethod(nameof(TestMethods.NonGenericMethod))!; 16var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, ["test"]); 24var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericIdentity))!; 26var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, ["hello"]); 35var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericIdentity))!; 37var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, [42]); 46var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericFromWrapper))!; 49var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, [wrapper]); 58var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericFromInterface))!; 61var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, [impl]); 70var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericIdentity))!; 72var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, [null]); 81var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericPair))!; 83var result = GenericMethodResolver.MakeGenericMethodFromArgs(method, ["key", 42]); 94var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericIdentity))!; 95var resolved = GenericMethodResolver.MakeGenericMethodFromArgs(method, ["hello"]); 105var method = typeof(TestMethods).GetMethod(nameof(TestMethods.GenericFromWrapper))!; 107var resolved = GenericMethodResolver.MakeGenericMethodFromArgs(method, [wrapper]);
Aspire.Hosting.Rust.Tests (1)
CargoMetadataTests.cs (1)
268var readMethod = typeof(CargoMetadataReader).GetMethod(nameof(CargoMetadataReader.ReadAsync));
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (2)
47private readonly MethodInfo _entryPoint; 57MethodInfo entryPoint,
Aspire.Hosting.Tests (11)
AddParameterTests.cs (1)
708var method = typeof(ParameterResourceBuilderExtensions).GetMethod(
AtsEventingExportsTests.cs (1)
17var method = typeof(DistributedApplication).Assembly
Backchannel\BackchannelContractTests.cs (1)
121var setMethod = prop.GetSetMethod();
Backchannel\JsonElementConversionTests.cs (1)
16private static readonly MethodInfo s_convertMethod = typeof(AuxiliaryBackchannelRpcTarget)
DebugSupportExtensionsTests.cs (3)
45var modeOverload = Assert.Single(methods, method => 56var contextOverload = Assert.Single(methods, method => 69var inspectionOverload = typeof(DebugSupportExtensions).GetMethod(
ProjectResourceBuilderExtensionTests.cs (1)
33var method = typeof(ProjectResourceBuilderExtensions).GetMethod(
ResourceNotificationTests.cs (1)
1714var addMethod = type.GetMethod(nameof(ImmutableArray<int>.Add), [elementType])
WithEndpointTests.cs (2)
67var withEndpointProxySupport = GetPublicStaticMethod( 177private static MethodInfo? GetPublicStaticMethod(Type declaringType, string methodName, params Type[] parameterTypes)
Aspire.TestUtilities (2)
UseCultureAttribute.cs (2)
62public override void Before(MethodInfo methodUnderTest, IXunitTest test) 84public override void After(MethodInfo methodUnderTest, IXunitTest test)
Aspire.TypeSystem (4)
AtsContext.cs (1)
94public Dictionary<string, MethodInfo> Methods { get; } = new();
AttributeDataReader.cs (3)
33public static AspireExportData? GetAspireExportData(MethodInfo method) 65public static bool HasAspireExportIgnoreData(MethodInfo method) 109public static ObsoleteData? GetObsoleteData(MethodInfo method)
Binding.UDS.IntegrationTests (2)
ServiceHelper.cs (2)
20var configureServicesMethod = startupType.GetMethod("ConfigureServices", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(IServiceCollection) }); 21var configureMethod = startupType.GetMethod("Configure", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(IHost) });
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
370private static readonly MethodInfo s_getDocumentationCommentMethodInfo = 374private static readonly MethodInfo s_getFullXmlFragmentMethodInfo =
dotnet-format (2)
Analyzers\Extensions.cs (1)
16private static MethodInfo TryGetMappedOptionsMethod { get; }
Reflection\RemoveUnnecessaryImportsHelper.cs (1)
12private static readonly MethodInfo? s_removeUnnecessaryImportsAsyncMethod = s_abstractRemoveUnnecessaryImportsCodeFixProviderType?.GetMethod("RemoveUnnecessaryImportsAsync", BindingFlags.Static | BindingFlags.NonPublic);
dotnet-Microsoft.XmlSerializer.Generator (1)
Sgen.cs (1)
362MethodInfo method;
dotnet-svcutil-lib (423)
FrameworkFork\Microsoft.Xml\External\Extensions.cs (2)
19public static MethodInfo GetMethod(this Type type, String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) 24public static MethodInfo GetMethod(this Type type, String name, BindingFlags bindingAttr, System.Reflection.Binder binder, Type[] types, ParameterModifier[] modifiers)
FrameworkFork\Microsoft.Xml\Xml\Core\SecureStringHasher.cs (1)
93MethodInfo getHashCodeMethodInfo = typeof(String).GetMethod("InternalMarvin32HashString", BindingFlags.NonPublic | BindingFlags.Static);
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (8)
334MethodInfo ICollection_get_Count = typeof(ICollection).GetMethod( 634internal void Call(MethodInfo methodInfo) 734private static MethodInfo GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 741MethodInfo result = null; 795MethodInfo getMethod = property.GetGetMethod(true); 832MethodInfo getMethod = property.GetGetMethod(true); 870MethodInfo setMethod = property.GetSetMethod(true); 1696internal void Ldftn(MethodInfo methodInfo)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (4)
36internal MethodInfo writeMethod; 37internal MethodInfo readMethod; 105private static MethodInfo GetMethodFromType(Type type, string methodName, Assembly assembly) 107MethodInfo method = type.GetMethod(methodName);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (4)
952private MethodInfo _checkShouldPersistMethodInfo; 1000internal MethodInfo CheckShouldPersistMethodInfo 1113private MethodInfo _getSchemaMethod; 1126internal SerializableMapping(MethodInfo getSchemaMethod, bool any, string ns)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (3)
234MethodInfo getMethod = propertyInfo.GetGetMethod(); 254private MethodInfo _checkShouldPersistMethodInfo; 355internal MethodInfo CheckShouldPersistMethodInfo
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (4)
22private static readonly Lazy<MethodInfo> s_iListGetItemMethod = new Lazy<MethodInfo>( 102MethodInfo get_Item = varType.GetMethod( 221MethodInfo Nullable_get_Value = nullableType.GetMethod(
FrameworkFork\Microsoft.Xml\Xml\Serialization\TypeExtensions.cs (2)
38MethodInfo[] methods = targetType.GetMethods(BindingFlags.Static | BindingFlags.Public); 40foreach (MethodInfo method in methods)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (5)
1281MethodInfo enumerator = type.GetMethod("GetEnumerator", new Type[0]); 1289enumerator = member as MethodInfo; 1321MethodInfo addMethod = type.GetMethod("Add", new Type[] { currentType }); 1367MethodInfo getMethod = defaultProp.GetGetMethod(); 1383MethodInfo addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType });
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (1)
402MethodInfo format = formatter.GetMethod("To" + pm.TypeDesc.FormatterName, new Type[] { typeof(string) });
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (3)
477internal static MethodInfo GetMethodFromSchemaProvider(XmlSchemaProviderAttribute provider, Type type) 491MethodInfo getMethod = getMethod = type.GetMethod(provider.MethodName, /* BindingFlags.DeclaredOnly | */ BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(XmlSchemaSet) }, null); 523MethodInfo method = GetMethodFromSchemaProvider(provider, type);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (1)
967System.Reflection.MethodInfo format = formatter.GetMethod("ToString", new Type[] { pm.TypeDesc.Type });
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (5)
204MethodInfo Hashtable_set_Item = typeof(Hashtable).GetMethod( 334MethodInfo XmlReader_IsStartElement = typeof(XmlReader).GetMethod( 361MethodInfo writerType_writeMethod = CreatedTypes[writerClass].GetMethod( 387MethodInfo readerType_readMethod = CreatedTypes[readerClass].GetMethod( 410MethodInfo Hashtable_Add = typeof(Hashtable).GetMethod(
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
4024_writer.Write("static " + typeof(MethodInfo).FullName + " " + methodVariable + " = " + typeVariable + ".GetMethod(");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (68)
111MethodInfo XmlSerializationWriter_WriteXXX = typeof(XmlSerializationWriter).GetMethod( 160MethodInfo XmlConvert_ToString = typeof(XmlConvert).GetMethod( 180MethodInfo FromXXX = typeof(XmlSerializationWriter).GetMethod( 265MethodInfo XmlSerializationWriter_method = typeof(XmlSerializationWriter).GetMethod( 282MethodInfo XmlSerializationWriter_Method = typeof(XmlSerializationWriter).GetMethod( 297MethodInfo XmlSerializationWriter_Method = typeof(XmlSerializationWriter).GetMethod( 319MethodInfo XmlSerializationWriter_WriteEndElement = typeof(XmlSerializationWriter).GetMethod( 331MethodInfo XmlSerializationWriter_WriteEndElement = typeof(XmlSerializationWriter).GetMethod( 371MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod( 381MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod( 568MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod( 590MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod( 696MethodInfo XmlSerializationWriter_FromEnum = typeof(XmlSerializationWriter).GetMethod( 718MethodInfo CultureInfo_get_InvariantCulture = typeof(CultureInfo).GetMethod( 725MethodInfo Int64_ToString = typeof(Int64).GetMethod( 732MethodInfo XmlSerializationWriter_CreateInvalidEnumValueException = typeof(XmlSerializationWriter).GetMethod( 793MethodInfo methodBuilder = EnsureMethodBuilder(typeBuilder, 825MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 832MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod( 844MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 861MethodInfo XmlWriter_WriteString = typeof(XmlWriter).GetMethod( 876MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod( 901MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 908MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod( 920MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 934MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod( 982MethodInfo XmlSerializationWriter_WriteNullTagLiteral = typeof(XmlSerializationWriter).GetMethod( 1002MethodInfo Object_GetType = typeof(object).GetMethod( 1023MethodInfo XmlSerializationWriter_WriteTypedPrimitive = typeof(XmlSerializationWriter).GetMethod( 1040MethodInfo XmlSerializationWriter_CreateUnknownTypeException = typeof(XmlSerializationWriter).GetMethod( 1060MethodInfo XmlSerializationWriter_set_EscapeName = typeof(XmlSerializationWriter).GetMethod( 1097MethodInfo XmlSerializationWriter_WriteStartElement = typeof(XmlSerializationWriter).GetMethod( 1109MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 1229MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1236MethodInfo XmlWriter_WriteStartAttribute = typeof(XmlWriter).GetMethod( 1290MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1297MethodInfo XmlWriter_WriteString = typeof(XmlWriter).GetMethod( 1315MethodInfo StringBuilder_Append = typeof(StringBuilder).GetMethod( 1338MethodInfo method = methodType.GetMethod( 1362MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1369MethodInfo XmlWriter_WriteEndAttribute = typeof(XmlWriter).GetMethod( 1382MethodInfo StringBuilder_get_Length = typeof(StringBuilder).GetMethod( 1404MethodInfo Object_ToString = typeof(Object).GetMethod( 1414MethodInfo XmlSerializationWriter_WriteAttribute = typeof(XmlSerializationWriter).GetMethod( 1445MethodInfo XmlSerializationWriter_WriteXmlAttribute = typeof(XmlSerializationWriter).GetMethod( 1534MethodInfo XmlSerializationWriter_CreateInvalidChoiceIdentifierValueException = typeof(XmlSerializationWriter).GetMethod( 1567MethodInfo getEnumeratorMethod = arrayTypeDesc.Type.GetMethod( 1608MethodInfo IEnumerator_MoveNext = typeof(IEnumerator).GetMethod( 1797MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1804MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1814MethodInfo String_op_Equality = typeof(string).GetMethod( 1839MethodInfo XmlSerializationWriter_CreateChoiceIdentifierValueException = typeof(XmlSerializationWriter).GetMethod( 1868MethodInfo XmlSerializationWriter_CreateUnknownAnyElementException = typeof(XmlSerializationWriter).GetMethod( 1877MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1884MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1933MethodInfo XmlSerializationWriter_CreateUnknownTypeException = typeof(XmlSerializationWriter).GetMethod( 1968MethodInfo XmlSerializationWriter_WriteValue = typeof(XmlSerializationWriter).GetMethod( 1983MethodInfo WriteTo = source.Type.GetMethod( 1990MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 2016MethodInfo Nullable_get_HasValue = element.Mapping.TypeDesc.Type.GetMethod( 2167MethodInfo XmlSerializationWriter_CreateInvalidAnyTypeException = typeof(XmlSerializationWriter).GetMethod( 2190MethodInfo XmlSerializationWriter_func = typeof(XmlSerializationWriter).GetMethod( 2221MethodInfo String_get_Length = typeof(string).GetMethod( 2265MethodInfo op_Inequality = valueType.GetMethod( 2297MethodInfo XmlSerializationWriter_CreateMismatchChoiceException = typeof(XmlSerializationWriter).GetMethod( 2327MethodInfo XmlSerializationWriter_WriteNamespaceDeclarations = typeof(XmlSerializationWriter).GetMethod( 2544MethodInfo XName_op_Implicit = xName.GetMethod( 2569MethodInfo Activator_CreateInstance = typeof(Activator).GetMethod(
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (22)
171internal MethodInfo OnSerializing 182internal MethodInfo OnSerialized 193internal MethodInfo OnDeserializing 204internal MethodInfo OnDeserialized 278internal MethodInfo GetKeyValuePairMethodInfo 749private MethodInfo _onSerializing, _onSerialized; 750private MethodInfo _onDeserializing, _onDeserialized; 962MethodInfo getMethod = property.GetMethod; 965MethodInfo setMethod = property.SetMethod; 1026MethodInfo getMethod = property.GetMethod; 1030MethodInfo setMethod = property.SetMethod; 1187private static bool IsMethodOverriding(MethodInfo method) 1201MethodInfo[] methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 1204MethodInfo method = methods[i]; 1225private static bool IsValidCallback(MethodInfo method, ParameterInfo[] parameters, Type attributeType, MethodInfo currentCallback, ref Type prevAttributeType) 1266internal MethodInfo OnSerializing 1275internal MethodInfo OnSerialized 1284internal MethodInfo OnDeserializing 1293internal MethodInfo OnDeserialized 1362private MethodInfo _getKeyValuePairMethodInfo; 1384internal MethodInfo GetKeyValuePairMethodInfo
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (32)
26private static MethodInfo s_getTypeFromHandle; 27private static MethodInfo GetTypeFromHandle 50private static MethodInfo s_objectEquals; 51private static MethodInfo ObjectEquals 73private static MethodInfo s_arraySetValue; 74private static MethodInfo ArraySetValue 94private static MethodInfo s_objectToString; 95private static MethodInfo ObjectToString 109private static MethodInfo s_stringFormat; 110private static MethodInfo StringFormat 192MethodInfo signature = delegateType.GetMethod("Invoke"); 255internal MethodInfo CurrentMethod 383LocalBuilder enumerator, MethodInfo getCurrentMethod) 397internal void EndForEach(MethodInfo moveNextMethod) 516internal void VerifyParameterCount(MethodInfo methodInfo, int expectedCount) 522internal void Call(object thisObj, MethodInfo methodInfo) 529internal void Call(object thisObj, MethodInfo methodInfo, object param1) 537internal void Call(object thisObj, MethodInfo methodInfo, object param1, object param2) 546internal void Call(object thisObj, MethodInfo methodInfo, object param1, object param2, object param3) 556internal void Call(object thisObj, MethodInfo methodInfo, object param1, object param2, object param3, object param4) 567internal void Call(object thisObj, MethodInfo methodInfo, object param1, object param2, object param3, object param4, object param5) 579internal void Call(object thisObj, MethodInfo methodInfo, object param1, object param2, object param3, object param4, object param5, object param6) 592internal void Call(MethodInfo methodInfo) 712MethodInfo getMethod = property.GetMethod; 718else if (memberInfo is MethodInfo) 720MethodInfo method = (MethodInfo)memberInfo; 754MethodInfo setMethod = property.SetMethod; 760else if (memberInfo is MethodInfo) 761Call((MethodInfo)memberInfo); 1443private void LoadThis(object thisObj, MethodInfo methodInfo) 1644private static MethodInfo s_stringLength = typeof(string).GetProperty("Length").GetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (19)
172private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor) 183private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired) 411internal MethodInfo GetEnumeratorMethod 422internal MethodInfo AddMethod 576private readonly MethodInfo _getEnumeratorMethod, _addMethod; 688internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor) : base(type) 707internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired) 817internal MethodInfo GetEnumeratorMethod 822internal MethodInfo AddMethod 980internal static MethodInfo GetTargetMethodWithName(string name, Type type, Type interfaceType) 1003MethodInfo addMethod, getEnumeratorMethod; 1218private static void FindCollectionMethodsOnInterface(Type type, Type interfaceType, ref MethodInfo addMethod, ref MethodInfo getEnumeratorMethod) 1228private static void GetCollectionMethods(Type type, Type interfaceType, Type[] addMethodTypeArray, bool addMethodOnInterface, out MethodInfo getEnumeratorMethod, out MethodInfo addMethod)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (9)
104internal MethodInfo ParseMethod 551private MethodInfo _parseMethod; 1232internal MethodInfo ParseMethod 1238MethodInfo method = UnderlyingType.GetMethod(Globals.ParseMethodName, BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string) }); 2110MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 2247static internal bool MethodRequiresMemberAccess(MethodInfo method) 2283if (member is MethodInfo) 2285MethodInfo method = (MethodInfo)member;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (2)
322MethodInfo getMethod = property.GetMethod; 347MethodInfo setMethod = property.SetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
472MethodInfo messageGetter = messageProperty.GetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (2)
1036internal static MethodInfo GetMethod(this Type type, string methodName, BindingFlags bindingFlags, Type[] parameterTypes) 1040return methodInfo != null ? (MethodInfo)methodInfo : null;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\PrimitiveDataContract.cs (9)
88internal MethodInfo XmlFormatWriterMethod 108internal MethodInfo XmlFormatContentWriterMethod 128internal MethodInfo XmlFormatReaderMethod 176private MethodInfo _xmlFormatWriterMethod; 177private MethodInfo _xmlFormatContentWriterMethod; 178private MethodInfo _xmlFormatReaderMethod; 185internal MethodInfo XmlFormatWriterMethod 191internal MethodInfo XmlFormatContentWriterMethod 197internal MethodInfo XmlFormatReaderMethod
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaExporter.cs (1)
58MethodInfo getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) });
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (1)
425MethodInfo XName_op_Implicit = xName.GetMethod(
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (110)
25private static MethodInfo s_writeStartElementMethod2; 26internal static MethodInfo WriteStartElementMethod2 41private static MethodInfo s_writeStartElementMethod3; 42internal static MethodInfo WriteStartElementMethod3 57private static MethodInfo s_writeEndElementMethod; 58internal static MethodInfo WriteEndElementMethod 73private static MethodInfo s_writeNamespaceDeclMethod; 74internal static MethodInfo WriteNamespaceDeclMethod 103private static MethodInfo s_ienumeratorMoveNextMethod; 104internal static MethodInfo MoveNextMethod 119private static MethodInfo s_ienumeratorGetCurrentMethod; 120internal static MethodInfo GetCurrentMethod 135private static MethodInfo s_getItemContractMethod; 136internal static MethodInfo GetItemContractMethod 151private static MethodInfo s_isStartElementMethod2; 152internal static MethodInfo IsStartElementMethod2 167private static MethodInfo s_isStartElementMethod0; 168internal static MethodInfo IsStartElementMethod0 183private static MethodInfo s_getUninitializedObjectMethod; 184internal static MethodInfo GetUninitializedObjectMethod 228private static MethodInfo s_getStreamingContextMethod; 229internal static MethodInfo GetStreamingContextMethod 244private static MethodInfo s_getCollectionMemberMethod; 245internal static MethodInfo GetCollectionMemberMethod 260private static MethodInfo s_storeCollectionMemberInfoMethod; 261internal static MethodInfo StoreCollectionMemberInfoMethod 276private static MethodInfo s_storeIsGetOnlyCollectionMethod; 277internal static MethodInfo StoreIsGetOnlyCollectionMethod 292private static MethodInfo s_throwNullValueReturnedForGetOnlyCollectionExceptionMethod; 293internal static MethodInfo ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod 307private static MethodInfo s_throwArrayExceededSizeExceptionMethod; 308internal static MethodInfo ThrowArrayExceededSizeExceptionMethod 323private static MethodInfo s_incrementItemCountMethod; 324internal static MethodInfo IncrementItemCountMethod 340private static MethodInfo s_internalDeserializeMethod; 341internal static MethodInfo InternalDeserializeMethod 356private static MethodInfo s_moveToNextElementMethod; 357internal static MethodInfo MoveToNextElementMethod 372private static MethodInfo s_getMemberIndexMethod; 373internal static MethodInfo GetMemberIndexMethod 388private static MethodInfo s_getMemberIndexWithRequiredMembersMethod; 389internal static MethodInfo GetMemberIndexWithRequiredMembersMethod 404private static MethodInfo s_throwRequiredMemberMissingExceptionMethod; 405internal static MethodInfo ThrowRequiredMemberMissingExceptionMethod 420private static MethodInfo s_skipUnknownElementMethod; 421internal static MethodInfo SkipUnknownElementMethod 436private static MethodInfo s_readIfNullOrRefMethod; 437internal static MethodInfo ReadIfNullOrRefMethod 452private static MethodInfo s_readAttributesMethod; 453internal static MethodInfo ReadAttributesMethod 468private static MethodInfo s_resetAttributesMethod; 469internal static MethodInfo ResetAttributesMethod 484private static MethodInfo s_getObjectIdMethod; 485internal static MethodInfo GetObjectIdMethod 500private static MethodInfo s_getArraySizeMethod; 501internal static MethodInfo GetArraySizeMethod 516private static MethodInfo s_addNewObjectMethod; 517internal static MethodInfo AddNewObjectMethod 532private static MethodInfo s_addNewObjectWithIdMethod; 533internal static MethodInfo AddNewObjectWithIdMethod 548private static MethodInfo s_getExistingObjectMethod; 549internal static MethodInfo GetExistingObjectMethod 564private static MethodInfo s_ensureArraySizeMethod; 565internal static MethodInfo EnsureArraySizeMethod 580private static MethodInfo s_trimArraySizeMethod; 581internal static MethodInfo TrimArraySizeMethod 596private static MethodInfo s_checkEndOfArrayMethod; 597internal static MethodInfo CheckEndOfArrayMethod 613private static MethodInfo s_getArrayLengthMethod; 614internal static MethodInfo GetArrayLengthMethod 629private static MethodInfo s_createSerializationExceptionMethod; 630internal static MethodInfo CreateSerializationExceptionMethod 645private static MethodInfo s_createUnexpectedStateExceptionMethod; 646internal static MethodInfo CreateUnexpectedStateExceptionMethod 661private static MethodInfo s_internalSerializeReferenceMethod; 662internal static MethodInfo InternalSerializeReferenceMethod 677private static MethodInfo s_internalSerializeMethod; 678internal static MethodInfo InternalSerializeMethod 693private static MethodInfo s_writeNullMethod; 694internal static MethodInfo WriteNullMethod 709private static MethodInfo s_incrementArrayCountMethod; 710internal static MethodInfo IncrementArrayCountMethod 725private static MethodInfo s_incrementCollectionCountMethod; 726internal static MethodInfo IncrementCollectionCountMethod 741private static MethodInfo s_incrementCollectionCountGenericMethod; 742internal static MethodInfo IncrementCollectionCountGenericMethod 757private static MethodInfo s_getDefaultValueMethod; 758internal static MethodInfo GetDefaultValueMethod 773private static MethodInfo s_getNullableValueMethod; 774internal static MethodInfo GetNullableValueMethod 789private static MethodInfo s_throwRequiredMemberMustBeEmittedMethod; 790internal static MethodInfo ThrowRequiredMemberMustBeEmittedMethod 805private static MethodInfo s_getHasValueMethod; 806internal static MethodInfo GetHasValueMethod 823private static MethodInfo s_isMemberTypeSameAsMemberValue; 824internal static MethodInfo IsMemberTypeSameAsMemberValue 839private static MethodInfo s_writeXmlValueMethod; 840internal static MethodInfo WriteXmlValueMethod 855private static MethodInfo s_readXmlValueMethod; 856internal static MethodInfo ReadXmlValueMethod 967private static MethodInfo s_getDateTimeOffsetMethod; 968internal static MethodInfo GetDateTimeOffsetMethod 983private static MethodInfo s_getDateTimeOffsetAdapterMethod; 984internal static MethodInfo GetDateTimeOffsetAdapterMethod 999private static MethodInfo s_getTypeHandleMethod; 1000internal static MethodInfo GetTypeHandleMethod 1013private static MethodInfo s_getTypeMethod; 1014internal static MethodInfo GetTypeMethod 1028private static MethodInfo s_throwInvalidDataContractExceptionMethod; 1029internal static MethodInfo ThrowInvalidDataContractExceptionMethod
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (3)
580MethodInfo ensureArraySizeMethod = XmlFormatGeneratorStatics.EnsureArraySizeMethod.MakeGenericMethod(itemType); 599MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType); 880var methodInfo = formatterServiceType.GetMethod("GetUninitializedObject", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
338MethodInfo incrementCollectionCountMethod = null; 378MethodInfo moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 379MethodInfo getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 617private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (4)
102public static MethodInfo GetMethod(this Type type, string name) 107public static MethodInfo GetMethod(this Type type, string name, Type[] types) 187public static RuntimeMethodHandle MethodHandle(this MethodInfo mi) 191public static Type ReflectedType(this MethodInfo mi)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (4)
122protected override object Invoke(MethodInfo targetMethod, object[] args) 299public MethodInfo TrySetResultMethod { get; private set; } 300public MethodInfo TrySetExceptionMethod { get; set; } 301public MethodInfo TrySetCanceledMethod { get; set; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\CustomAttributeProvider.cs (4)
33else if (attrProvider is MethodInfo) 35this.MethodInfo = (MethodInfo)attrProvider; 57internal MethodInfo MethodInfo { get; private set; } 118public static implicit operator CustomAttributeProvider(MethodInfo attrProvider)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationDescription.cs (9)
28private MethodInfo _beginMethod; 29private MethodInfo _endMethod; 30private MethodInfo _syncMethod; 31private MethodInfo _taskMethod; 99public MethodInfo TaskMethod 107public MethodInfo SyncMethod 115public MethodInfo BeginMethod 121internal MethodInfo OperationMethod 145public MethodInfo EndMethod
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (30)
359static internal Type GetOperationContractProviderType(MethodInfo method) 390foreach (MethodInfo method in GetMethodsInternal(service)) 482MethodInfo method = attrProvider.MethodInfo; 498method = param.Member as MethodInfo; 627private static List<MethodInfo> GetMethodsInternal(Type interfaceType) 629List<MethodInfo> methods = new List<MethodInfo>(); 630foreach (MethodInfo mi in interfaceType.GetRuntimeMethods().Where(m => !m.IsStatic)) 656static internal void ValidateParameterMetadata(MethodInfo methodInfo) 692static internal ParameterInfo[] GetInputParameters(MethodInfo method, bool asyncPattern) 728static internal ParameterInfo[] GetOutputParameters(MethodInfo method, bool asyncPattern) 763static internal bool HasOutputParameters(MethodInfo method, bool asyncPattern) 786private static MethodInfo GetEndMethodInternal(MethodInfo beginMethod) 790MethodInfo[] endMethods = beginMethod.DeclaringType.GetTypeInfo().GetDeclaredMethods(endMethodName).ToArray(); 799return (MethodInfo)endMethods[0]; 802static internal MethodInfo GetEndMethod(MethodInfo beginMethod) 804MethodInfo endMethod = GetEndMethodInternal(beginMethod); 814static internal XmlName GetOperationName(MethodInfo method) 821static internal bool HasBeginMethodShape(MethodInfo method) 835static internal bool IsBegin(OperationContractAttribute opSettings, MethodInfo method) 849static internal bool IsTask(MethodInfo method) 862static internal bool IsTask(MethodInfo method, out Type taskTResult) 881static internal bool HasEndMethodShape(MethodInfo method) 893internal static OperationContractAttribute GetOperationContractAttribute(MethodInfo method) 908static internal bool IsBegin(MethodInfo method) 916static internal string GetLogicalName(MethodInfo method) 923static internal string GetLogicalName(MethodInfo method, bool isAsync, bool isTask) 939static internal bool HasNoDisposableParameters(MethodInfo methodInfo)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (20)
135foreach (MethodInfo methodInfo in aParentType.GetRuntimeMethods().Where(m => !m.IsStatic)) 282MethodInfo opMethod = operationDescription.OperationMethod; 370MethodInfo method = type.GetRuntimeMethod(knownTypeAttribute.MethodName, s_knownTypesMethodParamType); 408MethodInfo opMethod = opDesc.OperationMethod; 425private void ProcessOpMethod(MethodInfo opMethod, bool canHaveBehaviors, 429MethodInfo method = null; 432MethodInfo ifaceMethod = GetCorrespondingMethodFromType(ifaceType, opMethod); 437MethodInfo implMethod = GetCorrespondingMethodFromType(implType, opMethod); 502private static MethodInfo GetCorrespondingMethodFromType(Type type, MethodInfo methodInfo) 512MethodInfo matchingMethod = type.GetTypeInfo().DeclaredMethods.SingleOrDefault(m => MethodsMatch(m, methodInfo)); 517private static bool MethodsMatch(MethodInfo method1, MethodInfo method2) 687foreach (MethodInfo methodInfo in contractToGetMethodsFrom.GetRuntimeMethods().Where(m => !m.IsStatic)) 847private OperationDescription CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, 1020MethodInfo outputMethod = methodInfo; 1115private MessageDescription CreateMessageDescription(MethodInfo methodInfo, 1319MethodInfo getMethod = property.GetGetMethod(true); 1324MethodInfo setMethod = property.GetSetMethod(true); 1405private static bool IsMethodOverriding(MethodInfo method)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
259MethodInfo methodInfo = operation.OperationMethod;
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (1)
268internal static void TraceUserCodeException(Exception e, MethodInfo method)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientOperation.cs (8)
44private MethodInfo _beginMethod; 45private MethodInfo _endMethod; 46private MethodInfo _syncMethod; 47private MethodInfo _taskMethod; 83public MethodInfo BeginMethod 96public MethodInfo EndMethod 109public MethodInfo SyncMethod 248public MethodInfo TaskMethod
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\InvokerUtil.cs (2)
22internal InvokeDelegate GenerateInvokeDelegate(MethodInfo method, out int inputParameterCount, 30internal InvokeDelegate GenerateInvokeDelegate(MethodInfo method, out int inputParameterCount, out int outputParameterCount)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (3)
29private MethodInfo _beginMethod; 30private MethodInfo _syncMethod; 31private MethodInfo _taskMethod;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (3)
15private readonly MethodInfo _method; 21public SyncMethodInvoker(MethodInfo method) 31public MethodInfo Method
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (4)
17private readonly MethodInfo _taskMethod; 22private MethodInfo _taskTResultGetMethod; 25public TaskMethodInvoker(MethodInfo taskMethod, Type taskType) 41public MethodInfo Method
FrameworkFork\System.ServiceModel\System\ServiceModel\OperationContractAttribute.cs (1)
120internal void EnsureInvariants(MethodInfo methodInfo, string operationName)
Metadata\ServiceDescriptor.cs (1)
114MethodInfo methodInfo = type.GetMethod("GetMetadatadataAsync", BindingFlags.Public | BindingFlags.Instance);
Shared\ProjectPropertyResolver.cs (1)
54var getPropertyValue = projType.GetMethod("GetPropertyValue");
dotnet-svcutil.xmlserializer (4)
Microsoft\Tools\ServiceModel\SvcUtil\ExportModule.cs (1)
67MethodInfo GetContract = contractDescription.GetMethod("GetContract", BindingFlags.Public| BindingFlags.Static, null, new Type[] { typeof(Type) }, null);
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (3)
77MethodInfo method = typeof(System.Xml.Serialization.XmlSerializer).GetMethod("GenerateSerializer", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 183MethodInfo findMethod = keyedByTypeCollectionType.GetMethod("Find"); 197MethodInfo getXmlMappingsMethod = xmlSerializerOperationBehaviorType.GetMethod("GetXmlMappings");
dotnet-svcutil.xmlserializer.IntegrationTests (1)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (1)
60MethodInfo method = typeof(XmlSerializer).GetMethod(s_serializationModeSetterName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
GenerateDocumentationAndConfigFiles (5)
CodeFixerExtensions.cs (2)
76MethodInfo? method = fixer?.GetType().GetTypeInfo().GetMethod("RegisterCodeFixesAsync"); 78MethodInfo? moveNextMethod = stateMachineAttr?.StateMachineType.GetTypeInfo().GetDeclaredMethod("MoveNext");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
GetDocument.Insider (14)
Commands\GetDocumentCommandWorker.cs (9)
223var getDocumentsMethod = GetMethod( 233var generateWithVersionMethod = serviceType.GetMethod( 254var generateMethod = GetMethod( 339MethodInfo generateMethod, 341MethodInfo? generateWithVersionMethod, 349var targetMethod = generateWithVersionMethod ?? generateMethod; 443private MethodInfo GetMethod(string methodName, Type type, Type[] parameterTypes, Type returnType) 445var method = type.GetMethod(methodName, parameterTypes); 469private object InvokeMethod(MethodInfo method, object instance, object[] arguments)
src\ab038811704af8d7\HostFactoryResolver.cs (5)
104var factory = programType.GetMethod(name, DeclaredOnlyLookup); 114private static bool IsFactory<TReturn>(MethodInfo? factory) 182var buildMethod = builder.GetType().GetMethod("Build"); 200private readonly MethodInfo _entryPoint; 213MethodInfo entryPoint,
ILCompiler.Compiler (2)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
206/// <item><see cref="System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression?, System.Reflection.MethodInfo)"/></item> 360/// <see cref="System.Reflection.MethodInfo.MakeGenericMethod(System.Type[])"/>
illink (2)
ILLink.RoslynAnalyzer (2)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
206/// <item><see cref="System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression?, System.Reflection.MethodInfo)"/></item> 360/// <see cref="System.Reflection.MethodInfo.MakeGenericMethod(System.Type[])"/>
Infrastructure.Common (7)
xunit\ConditionAttribute.cs (4)
42MethodInfo testMethodInfo = testMethod.Method.ToRuntimeMethod(); 70MethodInfo conditionMethodInfo; 105internal static MethodInfo LookupConditionalMethod(Type t, string name) 112MethodInfo mi = ti.GetDeclaredMethod(name);
xunit\WcfCurrentCultureAttribute.cs (2)
23public override void Before(MethodInfo methodUnderTest) 29public override void After(MethodInfo methodUnderTest)
xunit\WcfTestDiscoverer.cs (1)
27MethodInfo testMethodInfo = testMethod.Method.ToRuntimeMethod();
Microsoft.Arcade.Common (1)
MSBuildTaskBase.cs (1)
88private MethodInfo GetExecuteMethod()
Microsoft.AspNetCore.Components (18)
BindConverter.cs (8)
1729private static MethodInfo? _makeArrayFormatter; 1847var method = _makeArrayFormatter ??= typeof(FormatterDelegateCache).GetMethod(nameof(MakeArrayFormatter), BindingFlags.NonPublic | BindingFlags.Static)!; 1926private static MethodInfo? _convertToEnum; 1927private static MethodInfo? _convertToNullableEnum; 1928private static MethodInfo? _makeArrayTypeConverter; 2053var method = _convertToEnum ??= typeof(BindConverter).GetMethod(nameof(ConvertToEnum), BindingFlags.NonPublic | BindingFlags.Static)!; 2066var method = _convertToNullableEnum ??= typeof(BindConverter).GetMethod(nameof(ConvertToNullableEnum), BindingFlags.NonPublic | BindingFlags.Static)!; 2076var method = _makeArrayTypeConverter ??= typeof(ParserDelegateCache).GetMethod(nameof(MakeArrayTypeConverter), BindingFlags.NonPublic | BindingFlags.Static)!;
RenderTree\EventArgsTypeCache.cs (3)
12private static readonly ConcurrentDictionary<MethodInfo, Type> Cache = new ConcurrentDictionary<MethodInfo, Type>(); 22public static Type GetEventArgsType(MethodInfo methodInfo)
RenderTree\Renderer.cs (1)
612var methodInfo = GetRequiredEventBindingEntry(eventHandlerId).Callback.Delegate?.Method;
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (3)
12private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 36var getMethod = property.GetMethod; 41var callPropertyGetterClosedGenericMethod =
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (3)
12private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 32var setMethod = property.SetMethod; 36var callPropertySetterClosedGenericMethod =
Microsoft.AspNetCore.Components.Endpoints (19)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (3)
12private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 36var getMethod = property.GetMethod; 41var callPropertyGetterClosedGenericMethod =
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (3)
12private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 32var setMethod = property.SetMethod; 36var callPropertySetterClosedGenericMethod =
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (13)
25private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 28private static readonly MethodInfo CallPropertyGetterByReferenceOpenGenericMethod = 31private static readonly MethodInfo CallNullSafePropertyGetterOpenGenericMethod = 34private static readonly MethodInfo CallNullSafePropertyGetterByReferenceOpenGenericMethod = 37private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 192MethodInfo propertyGetterWrapperMethod, 193MethodInfo propertyGetterByRefWrapperMethod) 207var getMethod = propertyInfo.GetMethod; 245MethodInfo propertyGetMethod, 246MethodInfo openGenericWrapperMethod) 254var wrapperDelegateMethod = openGenericWrapperMethod.MakeGenericMethod(typeInput, typeOutput); 277var setMethod = propertyInfo.SetMethod; 296var callPropertySetterClosedGenericMethod =
Microsoft.AspNetCore.Components.Forms (3)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new(); 158private static MethodInfoData GetOrCreateMethodInfoData(MethodInfo methodInfo) 169static MethodInfoData GetMethodInfoData(MethodInfo methodInfo)
Microsoft.AspNetCore.Components.Testing (1)
Infrastructure\TestReadinessHostingStartup.cs (1)
63var method = type.GetMethod(overrideMethodName,
Microsoft.AspNetCore.Components.Web (3)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new(); 158private static MethodInfoData GetOrCreateMethodInfoData(MethodInfo methodInfo) 169static MethodInfoData GetMethodInfoData(MethodInfo methodInfo)
Microsoft.AspNetCore.Diagnostics (1)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.Grpc.JsonTranscoding (10)
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
46var bindMethodInfo = BindMethodFinder.GetBindMethod(typeof(TService));
Internal\Binding\ReflectionServiceInvokerResolver.cs (4)
28var handlerMethod = GetMethod(methodName, methodParameters); 51private MethodInfo? GetMethod(string methodName, Type[] methodParameters) 56var matchingMethod = currentType.GetMethod( 73var baseDefinitionMethod = matchingMethod.GetBaseDefinition();
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (4)
29internal static MethodInfo? GetBindMethod(Type serviceType) 32var bindMethodInfo = GetBindMethodUsingAttribute(serviceType); 43internal static MethodInfo? GetBindMethodUsingAttribute(Type serviceType) 70internal static MethodInfo? GetBindMethodFallback(Type serviceType)
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
441var methodInfo = serviceType.GetMethod(methodDescriptor.Name);
Microsoft.AspNetCore.Hosting (13)
Internal\ConfigureBuilder.cs (2)
13public ConfigureBuilder(MethodInfo configure) 18public MethodInfo MethodInfo { get; }
Internal\ConfigureContainerBuilder.cs (2)
11public ConfigureContainerBuilder(MethodInfo? configureContainerMethod) 16public MethodInfo? MethodInfo { get; }
Internal\ConfigureServicesBuilder.cs (2)
12public ConfigureServicesBuilder(MethodInfo? configureServices) 17public MethodInfo? MethodInfo { get; }
Internal\MethodInfoExtensions.cs (1)
11public static object? InvokeWithoutWrappingExceptions(this MethodInfo methodInfo, object? obj, object?[] parameters)
Internal\StartupLoader.cs (5)
296var configureMethod = FindMethod(startupType, "Configure{0}", environmentName, typeof(void), required: true)!; 302var configureMethod = FindMethod(startupType, "Configure{0}Container", environmentName, typeof(void), required: false); 313var servicesMethod = FindMethod(startupType, "Configure{0}Services", environmentName, typeof(IServiceProvider), required: false) 318private static MethodInfo? FindMethod([DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string methodName, string environmentName, Type? returnType = null, bool required = true) 338var methodInfo = selectedMethods.FirstOrDefault();
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.Http.Abstractions (25)
EndpointFilterFactoryContext.cs (1)
20public required MethodInfo MethodInfo { get; init; }
Extensions\UseMiddlewareExtensions.cs (8)
23private static readonly MethodInfo GetServiceInfo = typeof(UseMiddlewareExtensions).GetMethod(nameof(GetService), BindingFlags.NonPublic | BindingFlags.Static)!; 24private static readonly MethodInfo GetKeyedServiceInfo = typeof(UseMiddlewareExtensions).GetMethod(nameof(GetKeyedService), BindingFlags.NonPublic | BindingFlags.Static)!; 68MethodInfo? invokeMethod = null; 69foreach (var method in methods) 108private readonly MethodInfo _invokeMethod; 115MethodInfo invokeMethod, 200private static Func<T, HttpContext, IServiceProvider, Task> ReflectionFallback<T>(MethodInfo methodInfo, ParameterInfo[] parameters) 265private static Func<T, HttpContext, IServiceProvider, Task> CompileExpression<T>(MethodInfo methodInfo, ParameterInfo[] parameters)
Metadata\IEndpointMetadataProvider.cs (3)
16/// Populates metadata for the related <see cref="Endpoint"/> and <see cref="MethodInfo"/>. 23/// <param name="method">The <see cref="MethodInfo"/> of the route handler delegate or MVC Action of the endpoint being created.</param> 25static abstract void PopulateMetadata(MethodInfo method, EndpointBuilder builder);
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (13)
25private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 28private static readonly MethodInfo CallPropertyGetterByReferenceOpenGenericMethod = 31private static readonly MethodInfo CallNullSafePropertyGetterOpenGenericMethod = 34private static readonly MethodInfo CallNullSafePropertyGetterByReferenceOpenGenericMethod = 37private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 192MethodInfo propertyGetterWrapperMethod, 193MethodInfo propertyGetterByRefWrapperMethod) 207var getMethod = propertyInfo.GetMethod; 245MethodInfo propertyGetMethod, 246MethodInfo openGenericWrapperMethod) 254var wrapperDelegateMethod = openGenericWrapperMethod.MakeGenericMethod(typeInput, typeOutput); 277var setMethod = propertyInfo.SetMethod; 296var callPropertySetterClosedGenericMethod =
Microsoft.AspNetCore.Http.Extensions (139)
HeaderDictionaryTypeExtensions.cs (3)
265MethodInfo? method = null; 266foreach (var methodInfo in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) 302var method = type.GetMethods(BindingFlags.Public | BindingFlags.Static)
RequestDelegateFactory.cs (50)
41private static readonly MethodInfo ExecuteTaskWithEmptyResultMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskWithEmptyResult), BindingFlags.NonPublic | BindingFlags.Static)!; 42private static readonly MethodInfo ExecuteValueTaskWithEmptyResultMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskWithEmptyResult), BindingFlags.NonPublic | BindingFlags.Static)!; 43private static readonly MethodInfo ExecuteTaskOfTMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskOfT), BindingFlags.NonPublic | BindingFlags.Static)!; 44private static readonly MethodInfo ExecuteTaskOfTFastMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskOfTFast), BindingFlags.NonPublic | BindingFlags.Static)!; 45private static readonly MethodInfo ExecuteTaskOfObjectMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskOfObject), BindingFlags.NonPublic | BindingFlags.Static)!; 46private static readonly MethodInfo ExecuteValueTaskOfObjectMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskOfObject), BindingFlags.NonPublic | BindingFlags.Static)!; 47private static readonly MethodInfo ExecuteTaskOfStringMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskOfString), BindingFlags.NonPublic | BindingFlags.Static)!; 48private static readonly MethodInfo ExecuteValueTaskOfTMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskOfT), BindingFlags.NonPublic | BindingFlags.Static)!; 49private static readonly MethodInfo ExecuteValueTaskOfTFastMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskOfTFast), BindingFlags.NonPublic | BindingFlags.Static)!; 50private static readonly MethodInfo ExecuteValueTaskMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTask), BindingFlags.NonPublic | BindingFlags.Static)!; 51private static readonly MethodInfo ExecuteValueTaskOfStringMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskOfString), BindingFlags.NonPublic | BindingFlags.Static)!; 52private static readonly MethodInfo ExecuteTaskResultOfTMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteTaskResult), BindingFlags.NonPublic | BindingFlags.Static)!; 53private static readonly MethodInfo ExecuteValueResultTaskOfTMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteValueTaskResult), BindingFlags.NonPublic | BindingFlags.Static)!; 54private static readonly MethodInfo ExecuteAwaitedReturnMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteAwaitedReturn), BindingFlags.NonPublic | BindingFlags.Static)!; 55private static readonly MethodInfo GetHeaderSplitMethod = typeof(ParsingHelpers).GetMethod(nameof(ParsingHelpers.GetHeaderSplit), BindingFlags.Public | BindingFlags.Static, [typeof(IHeaderDictionary), typeof(string)])!; 56private static readonly MethodInfo GetRequiredServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetRequiredService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!; 57private static readonly MethodInfo GetServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!; 58private static readonly MethodInfo GetRequiredKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!; 59private static readonly MethodInfo GetKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!; 60private static readonly MethodInfo ResultWriteResponseAsyncMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteResultWriteResponse), BindingFlags.NonPublic | BindingFlags.Static)!; 61private static readonly MethodInfo StringResultWriteResponseAsyncMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ExecuteWriteStringResponseAsync), BindingFlags.NonPublic | BindingFlags.Static)!; 62private static readonly MethodInfo StringIsNullOrEmptyMethod = typeof(string).GetMethod(nameof(string.IsNullOrEmpty), BindingFlags.Static | BindingFlags.Public)!; 63private static readonly MethodInfo WrapObjectAsValueTaskMethod = typeof(RequestDelegateFactory).GetMethod(nameof(WrapObjectAsValueTask), BindingFlags.NonPublic | BindingFlags.Static)!; 64private static readonly MethodInfo TaskOfTToValueTaskOfObjectMethod = typeof(RequestDelegateFactory).GetMethod(nameof(TaskOfTToValueTaskOfObject), BindingFlags.NonPublic | BindingFlags.Static)!; 65private static readonly MethodInfo ValueTaskOfTToValueTaskOfObjectMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ValueTaskOfTToValueTaskOfObject), BindingFlags.NonPublic | BindingFlags.Static)!; 66private static readonly MethodInfo ArrayEmptyOfObjectMethod = typeof(Array).GetMethod(nameof(Array.Empty), BindingFlags.Public | BindingFlags.Static)!.MakeGenericMethod(new Type[] { typeof(object) }); 74private static readonly MethodInfo JsonResultWriteResponseOfTFastAsyncMethod = typeof(RequestDelegateFactory).GetMethod(nameof(WriteJsonResponseFast), BindingFlags.NonPublic | BindingFlags.Static)!; 75private static readonly MethodInfo JsonResultWriteResponseOfTAsyncMethod = typeof(RequestDelegateFactory).GetMethod(nameof(WriteJsonResponse), BindingFlags.NonPublic | BindingFlags.Static)!; 77private static readonly MethodInfo LogParameterBindingFailedMethod = GetMethodInfo<Action<HttpContext, string, string, string, bool>>((httpContext, parameterType, parameterName, sourceValue, shouldThrow) => 79private static readonly MethodInfo LogRequiredParameterNotProvidedMethod = GetMethodInfo<Action<HttpContext, string, string, string, bool>>((httpContext, parameterType, parameterName, source, shouldThrow) => 81private static readonly MethodInfo LogImplicitBodyNotProvidedMethod = GetMethodInfo<Action<HttpContext, string, bool>>((httpContext, parameterName, shouldThrow) => 83private static readonly MethodInfo LogFormMappingFailedMethod = GetMethodInfo<Action<HttpContext, string, string, FormDataMappingException, bool>>((httpContext, parameterName, parameterType, exception, shouldThrow) => 113private static readonly MethodInfo EndpointFilterInvocationContextGetArgument = typeof(EndpointFilterInvocationContext).GetMethod(nameof(EndpointFilterInvocationContext.GetArgument))!; 123private static readonly MethodInfo ProcessFormMethod = typeof(RequestDelegateFactory).GetMethod(nameof(ProcessForm), BindingFlags.Static | BindingFlags.NonPublic)!; 124private static readonly MethodInfo FormDataMapperMapMethod = typeof(FormDataMapper).GetMethod(nameof(FormDataMapper.Map))!; 125private static readonly MethodInfo AsMemoryMethod = new Func<char[]?, int, int, Memory<char>>(MemoryExtensions.AsMemory).Method; 126private static readonly MethodInfo ArrayPoolSharedReturnMethod = typeof(ArrayPool<char>).GetMethod(nameof(ArrayPool<char>.Shared.Return))!; 138/// <param name="methodInfo">The <see cref="MethodInfo"/> for the route handler to be passed to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>.</param> 141public static RequestDelegateMetadataResult InferMetadata(MethodInfo methodInfo, RequestDelegateFactoryOptions? options = null) 170/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 172/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 210public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory, RequestDelegateFactoryOptions? options) 222/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 224/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 229public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory = null, RequestDelegateFactoryOptions? options = null, RequestDelegateMetadataResult? metadataResult = null) 315MethodInfo methodInfo, 390private static Expression[] CreateArgumentsAndInferMetadata(MethodInfo methodInfo, RequestDelegateFactoryContext factoryContext) 421private static EndpointFilterDelegate? CreateFilterPipeline(MethodInfo methodInfo, Expression? targetExpression, RequestDelegateFactoryContext factoryContext, Expression<Func<HttpContext, object?>>? targetFactory) 934private static Expression CreateMethodCall(MethodInfo methodInfo, Expression? target, Expression[] arguments) => 2453private static MethodInfo GetMethodInfo<T>(Expression<T> expr)
RequestDelegateMetadataResult.cs (1)
7/// The metadata inferred by <see cref="RequestDelegateFactory.InferMetadata(System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?)"/>.
src\aspnetcore\src\Shared\EndpointMetadataPopulator.cs (4)
18private static readonly MethodInfo PopulateMetadataForParameterMethod = typeof(EndpointMetadataPopulator).GetMethod(nameof(PopulateMetadataForParameter), BindingFlags.NonPublic | BindingFlags.Static)!; 19internal static readonly MethodInfo PopulateMetadataForEndpointMethod = typeof(EndpointMetadataPopulator).GetMethod(nameof(PopulateMetadataForEndpoint), BindingFlags.NonPublic | BindingFlags.Static)!; 21public static void PopulateMetadata(MethodInfo methodInfo, EndpointBuilder builder, IEnumerable<ParameterInfo>? parameters = null) 71private static void PopulateMetadataForEndpoint<T>(MethodInfo method, EndpointBuilder builder)
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (14)
17private static readonly MethodInfo INotifyCompletion_OnCompleted = typeof(INotifyCompletion).GetMethod(nameof(INotifyCompletion.OnCompleted), Everything, new[] { typeof(Action) })!; 18private static readonly MethodInfo ICriticalNotifyCompletion_UnsafeOnCompleted = typeof(ICriticalNotifyCompletion).GetMethod(nameof(ICriticalNotifyCompletion.UnsafeOnCompleted), Everything, new[] { typeof(Action) })!; 22public MethodInfo AwaiterGetResultMethod { get; } 23public MethodInfo AwaiterOnCompletedMethod { get; } 24public MethodInfo? AwaiterUnsafeOnCompletedMethod { get; } 26public MethodInfo GetAwaiterMethod { get; } 31MethodInfo awaiterGetResultMethod, 32MethodInfo awaiterOnCompletedMethod, 33MethodInfo? awaiterUnsafeOnCompletedMethod, 35MethodInfo getAwaiterMethod) 54var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 81var onCompletedMethod = INotifyCompletion_OnCompleted; 85MethodInfo? unsafeOnCompletedMethod = null; 93var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (35)
30private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 42private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) 63private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, bool isTrimAotCompatible) 90public MethodInfo MethodInfo { get; } 105public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo) 112public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[] parameterDefaultValues) 123/// The difference between this method and <see cref="Create(MethodInfo, TypeInfo)"/> is that 127public static ObjectMethodExecutor CreateTrimAotCompatible(MethodInfo methodInfo, TypeInfo targetTypeInfo) 197private static MethodExecutor GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 247MethodInfo methodInfo, 386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 387private static readonly MethodInfo _taskAwaiterGetIsCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("get_IsCompleted")!; 388private static readonly MethodInfo _taskAwaiterGetResultMethodInfo = typeof(TaskAwaiter<>).GetMethod("GetResult")!; 389private static readonly MethodInfo _taskAwaiterOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("OnCompleted")!; 390private static readonly MethodInfo _taskAwaiterUnsafeOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 392private static readonly MethodInfo _valueTaskGetAwaiterMethodInfo = typeof(ValueTask<>).GetMethod("GetAwaiter")!; 393private static readonly MethodInfo _valueTaskAwaiterGetIsCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("get_IsCompleted")!; 394private static readonly MethodInfo _valueTaskAwaiterGetResultMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("GetResult")!; 395private static readonly MethodInfo _valueTaskAwaiterOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("OnCompleted")!; 396private static readonly MethodInfo _valueTaskAwaiterUnsafeOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 423var taskGetAwaiterMethodInfo = (MethodInfo)methodReturnType.GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo); 424var taskAwaiterGetResultMethodInfo = (MethodInfo)taskGetAwaiterMethodInfo.ReturnType.GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo); 437private static MethodExecutorAsync? GetExecutorAsyncTrimAotCompatible(MethodInfo methodInfo, Type asyncResultType) 495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (28)
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)!; 27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 42private readonly MethodInfo _enumTryParseMethod; 87MethodInfo? methodInfo; 89if (TryGetExplicitIParsableTryParseMethod(type, out var explicitIParsableTryParseMethod)) 190if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(type, "TryParse") is MethodInfo invalidMethod) 205static bool ValidateReturnType(MethodInfo methodInfo) 221var methodInfo = GetIBindableFromHttpContextMethod(nonNullableParameterType); 284if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(nonNullableParameterType, "BindAsync") is MethodInfo invalidBindMethod) 306static bool ValidateReturnType(MethodInfo methodInfo) 410private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 431private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 444bool IsMatch(MethodInfo? method) => method is not null && !method.IsAbstract && validateReturnType(method); 446var methodInfo = type.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy, parameterTypes); 453var candidateInterfaceMethodInfo = default(MethodInfo); 458var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static, parameterTypes); 480private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 483var methodInfo = type.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy) 493var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance); 504private static MethodInfo GetEnumTryParseMethod(bool preferNonGenericEnumParseOverload) 506MethodInfo? methodInfo = null; 532private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 568private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles)
Microsoft.AspNetCore.Http.Results (35)
Accepted.cs (1)
79static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
AcceptedAtRoute.cs (1)
106static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
AcceptedAtRouteOfT.cs (1)
120static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
AcceptedOfT.cs (1)
98static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
BadRequest.cs (1)
49static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
BadRequestOfT.cs (1)
63static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Conflict.cs (1)
49static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ConflictOfT.cs (1)
63static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Created.cs (1)
79static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
CreatedAtRoute.cs (1)
106static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
CreatedAtRouteOfT.cs (1)
123static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
CreatedOfT.cs (1)
97static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
InternalServerError.cs (1)
49static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
InternalServerErrorOfT.cs (1)
63static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
JsonHttpResultOfT.cs (1)
138static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
NoContent.cs (1)
49static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
NotFound.cs (1)
48static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
NotFoundOfT.cs (1)
62static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Ok.cs (1)
48static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
OkOfT.cs (1)
62static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ProblemHttpResult.cs (1)
77static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ResultsOfT.Generated.cs (5)
65static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 135static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 214static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 302static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 399static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ResultsOfTHelper.cs (4)
16private static readonly MethodInfo PopulateMetadataMethod = typeof(ResultsOfTHelper).GetMethod(nameof(PopulateMetadata), BindingFlags.Static | BindingFlags.NonPublic)!; 20public static void PopulateMetadataIfTargetIsIEndpointMetadataProvider<[DynamicallyAccessedMembers(RequireMethods)] TTarget>(MethodInfo method, EndpointBuilder builder) 33var populateMetadataMethod = typeof(TTarget).GetMethod("Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider.PopulateMetadata", BindingFlags.Static | BindingFlags.NonPublic); 59private static void PopulateMetadata<TTarget>(MethodInfo method, EndpointBuilder builder) where TTarget : IEndpointMetadataProvider
ServerSentEventsResult.cs (1)
102static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
UnauthorizedHttpResult.cs (1)
48static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
UnprocessableEntity.cs (1)
49static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
UnprocessableEntityOfT.cs (1)
63static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ValidationProblem.cs (1)
74static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Microsoft.AspNetCore.Identity (4)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (4)
52using MetadataPopulator = System.Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult>; 1332MethodInfo methodInfo) 1342private static EndpointFilterDelegate BuildFilterDelegate(EndpointFilterDelegate filteredInvocation, EndpointBuilder builder, MethodInfo mi) 1477private static void PopulateMetadataForEndpoint<T>(MethodInfo method, EndpointBuilder builder)
Microsoft.AspNetCore.InternalTesting (19)
LoggedTest\LoggedTest.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
LoggedTest\LoggedTestBase.cs (2)
58protected virtual void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) 95public virtual Task InitializeAsync(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ReplaceCulture.cs (2)
54public override void Before(MethodInfo methodUnderTest) 63public override void After(MethodInfo methodUnderTest)
TestContext.cs (2)
24MethodInfo testMethod, 38public MethodInfo TestMethod { get; }
TestFileOutputContext.cs (1)
117public static string GetTestMethodName(MethodInfo method, object[] arguments)
Tracing\EventSourceValidator.cs (1)
58foreach (var method in methods)
UseCultureAttribute.cs (2)
29public override void Before(MethodInfo methodUnderTest) 37public override void After(MethodInfo methodUnderTest)
xunit\AspNetTestAssemblyRunner.cs (1)
50var staticCreator = fixtureAttribute.FixtureType.GetMethod(
xunit\AspNetTestCaseRunner.cs (1)
28protected override XunitTestRunner CreateTestRunner(ITest test, IMessageBus messageBus, Type testClass, object[] constructorArguments, MethodInfo testMethod, object[] testMethodArguments, string skipReason, IReadOnlyList<BeforeAfterTestAttribute> beforeAfterAttributes, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
xunit\AspNetTestInvoker.cs (2)
24MethodInfo testMethod, 62private static IEnumerable<ITestMethodLifecycle> GetLifecycleHooks(object testClassInstance, Type testClass, MethodInfo testMethod)
xunit\AspNetTestRunner.cs (3)
24MethodInfo testMethod, 135private static RepeatAttribute GetRepeatAttribute(MethodInfo methodInfo) 152private static RetryAttribute GetRetryAttribute(MethodInfo methodInfo)
xunit\AspNetTheoryTestCaseRunner.cs (1)
28protected override XunitTestRunner CreateTestRunner(ITest test, IMessageBus messageBus, Type testClass, object[] constructorArguments, MethodInfo testMethod, object[] testMethodArguments, string skipReason, IReadOnlyList<BeforeAfterTestAttribute> beforeAfterAttributes, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Microsoft.AspNetCore.Mvc.Abstractions (28)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (28)
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)!; 27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 42private readonly MethodInfo _enumTryParseMethod; 87MethodInfo? methodInfo; 89if (TryGetExplicitIParsableTryParseMethod(type, out var explicitIParsableTryParseMethod)) 190if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(type, "TryParse") is MethodInfo invalidMethod) 205static bool ValidateReturnType(MethodInfo methodInfo) 221var methodInfo = GetIBindableFromHttpContextMethod(nonNullableParameterType); 284if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(nonNullableParameterType, "BindAsync") is MethodInfo invalidBindMethod) 306static bool ValidateReturnType(MethodInfo methodInfo) 410private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 431private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 444bool IsMatch(MethodInfo? method) => method is not null && !method.IsAbstract && validateReturnType(method); 446var methodInfo = type.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy, parameterTypes); 453var candidateInterfaceMethodInfo = default(MethodInfo); 458var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static, parameterTypes); 480private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 483var methodInfo = type.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy) 493var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance); 504private static MethodInfo GetEnumTryParseMethod(bool preferNonGenericEnumParseOverload) 506MethodInfo? methodInfo = null; 532private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 568private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (2)
61routeEndpoint.Metadata.GetMetadata<MethodInfo>() is { } methodInfo && 83private ApiDescription CreateApiDescription(RouteEndpoint routeEndpoint, string httpMethod, MethodInfo methodInfo, bool disableInferredBody)
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (2)
36private static bool IsCompilerGeneratedMethod(MethodInfo method) 63internal static bool TryGetNonCompilerGeneratedMethodName(MethodInfo method, [NotNullWhen(true)] out string? originalName)
Microsoft.AspNetCore.Mvc.Core (121)
_generated\0\LoggerMessage.g.cs (3)
1234private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string, global::System.Reflection.MethodInfo, string, string?, global::System.Exception?> __ControllerActionExecutingCallback = 1235global::Microsoft.Extensions.Logging.LoggerMessage.Define<string, global::System.Reflection.MethodInfo, string, string?>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(102, "ControllerActionExecuting"), "Route matched with {RouteData}. Executing controller action with signature {MethodInfo} on controller {Controller} ({AssemblyName}).", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 1242private static partial void ControllerActionExecuting(global::Microsoft.Extensions.Logging.ILogger logger, string routeData, global::System.Reflection.MethodInfo methodInfo, string controller, string? assemblyName)
ApiConventionMethodAttribute.cs (2)
47private static MethodInfo GetConventionMethod(Type conventionType, string methodName) 70internal MethodInfo Method { get; }
ApiConventionTypeAttribute.cs (1)
61foreach (var method in conventionType.GetMethods(BindingFlags.Public | BindingFlags.Static))
ApiExplorer\ApiConventionMatcher.cs (2)
10internal static bool IsMatch(MethodInfo methodInfo, MethodInfo conventionMethod)
ApiExplorer\ApiConventionResult.cs (5)
31MethodInfo method, 36var conventionMethod = apiConventionMethodAttribute?.Method; 56private static MethodInfo? GetConventionMethod(MethodInfo method, ApiConventionTypeAttribute[] apiConventionAttributes) 61foreach (var conventionMethod in conventionMethods)
ApplicationModels\ActionModel.cs (4)
23/// <param name="actionMethod">The action <see cref="MethodInfo"/>.</param> 26MethodInfo actionMethod, 71/// Gets the action <see cref="MethodInfo"/>. 73public MethodInfo ActionMethod { get; }
ApplicationModels\ApplicationModelFactory.cs (6)
60var actionsByMethod = new Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>>(); 86var attributeRoutingConfigurationErrors = new Dictionary<MethodInfo, string>(); 174Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>> actionsByMethod, 256MethodInfo method, 258IDictionary<MethodInfo, string> routingConfigurationErrors) 291MethodInfo method,
ApplicationModels\DefaultApplicationModelProvider.cs (12)
74foreach (var methodInfo in controllerType.AsType().GetMethods()) 248/// Creates the <see cref="ActionModel"/> instance for the given action <see cref="MethodInfo"/>. 251/// <param name="methodInfo">The action <see cref="MethodInfo"/>.</param> 253/// An <see cref="ActionModel"/> instance for the given action <see cref="MethodInfo"/> or 258MethodInfo methodInfo) 308var currentMethodInfo = methodInfo; 326var nextMethodInfo = currentMethodInfo.GetBaseDefinition(); 358internal static void AddReturnTypeMetadata(IList<SelectorModel> selectors, MethodInfo methodInfo) 405/// <param name="methodInfo">The <see cref="MethodInfo"/>.</param> 410internal static bool IsAction(TypeInfo typeInfo, MethodInfo methodInfo) 680private static bool IsIDisposableMethod(MethodInfo methodInfo) 688var baseMethodInfo = methodInfo.GetBaseDefinition();
Controllers\ControllerActionDescriptor.cs (1)
33public MethodInfo MethodInfo { get; set; } = default!;
Filters\MiddlewareFilterConfigurationProvider.cs (5)
35var configureMethod = FindMethod(startupType, typeof(void)); 39private static MethodInfo FindMethod(Type startupType, Type returnType) 51var methodInfo = selectedMethods.FirstOrDefault(); 78public ConfigureBuilder(MethodInfo configure) 83public MethodInfo MethodInfo { get; }
Infrastructure\AsyncEnumerableReader.cs (1)
30private readonly MethodInfo Converter = typeof(AsyncEnumerableReader).GetMethod(
Infrastructure\MvcCoreMvcOptionsSetup.cs (1)
125modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(MethodInfo)));
Infrastructure\ResourceInvoker.Log.cs (1)
71private static partial void ControllerActionExecuting(ILogger logger, string routeData, MethodInfo methodInfo, string controller, string? assemblyName);
ModelBinding\Binders\TryParseModelBinder.cs (2)
17private static readonly MethodInfo AddModelErrorMethod = typeof(TryParseModelBinder).GetMethod(nameof(AddModelError), BindingFlags.NonPublic | BindingFlags.Static)!; 18private static readonly MethodInfo SuccessBindingResultMethod = typeof(ModelBindingResult).GetMethod(nameof(ModelBindingResult.Success), BindingFlags.Public | BindingFlags.Static)!;
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (1)
143var cloneMethod = type.GetMethod("<Clone>$", BindingFlags.Public | BindingFlags.Instance);
ModelBinding\PropertyValueSetter.cs (2)
12private static readonly MethodInfo CallPropertyAddRangeOpenGenericMethod = 52var propertyAddRange = CallPropertyAddRangeOpenGenericMethod.MakeGenericMethod(
ModelBinding\Validation\DefaultCollectionValidationStrategy.cs (2)
42private static readonly MethodInfo _getEnumerator = typeof(DefaultCollectionValidationStrategy) 71var getEnumeratorMethod = _getEnumerator.MakeGenericMethod(type);
src\aspnetcore\src\Shared\EndpointMetadataPopulator.cs (4)
18private static readonly MethodInfo PopulateMetadataForParameterMethod = typeof(EndpointMetadataPopulator).GetMethod(nameof(PopulateMetadataForParameter), BindingFlags.NonPublic | BindingFlags.Static)!; 19internal static readonly MethodInfo PopulateMetadataForEndpointMethod = typeof(EndpointMetadataPopulator).GetMethod(nameof(PopulateMetadataForEndpoint), BindingFlags.NonPublic | BindingFlags.Static)!; 21public static void PopulateMetadata(MethodInfo methodInfo, EndpointBuilder builder, IEnumerable<ParameterInfo>? parameters = null) 71private static void PopulateMetadataForEndpoint<T>(MethodInfo method, EndpointBuilder builder)
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (14)
17private static readonly MethodInfo INotifyCompletion_OnCompleted = typeof(INotifyCompletion).GetMethod(nameof(INotifyCompletion.OnCompleted), Everything, new[] { typeof(Action) })!; 18private static readonly MethodInfo ICriticalNotifyCompletion_UnsafeOnCompleted = typeof(ICriticalNotifyCompletion).GetMethod(nameof(ICriticalNotifyCompletion.UnsafeOnCompleted), Everything, new[] { typeof(Action) })!; 22public MethodInfo AwaiterGetResultMethod { get; } 23public MethodInfo AwaiterOnCompletedMethod { get; } 24public MethodInfo? AwaiterUnsafeOnCompletedMethod { get; } 26public MethodInfo GetAwaiterMethod { get; } 31MethodInfo awaiterGetResultMethod, 32MethodInfo awaiterOnCompletedMethod, 33MethodInfo? awaiterUnsafeOnCompletedMethod, 35MethodInfo getAwaiterMethod) 54var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 81var onCompletedMethod = INotifyCompletion_OnCompleted; 85MethodInfo? unsafeOnCompletedMethod = null; 93var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (35)
30private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 42private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) 63private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, bool isTrimAotCompatible) 90public MethodInfo MethodInfo { get; } 105public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo) 112public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[] parameterDefaultValues) 123/// The difference between this method and <see cref="Create(MethodInfo, TypeInfo)"/> is that 127public static ObjectMethodExecutor CreateTrimAotCompatible(MethodInfo methodInfo, TypeInfo targetTypeInfo) 197private static MethodExecutor GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 247MethodInfo methodInfo, 386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 387private static readonly MethodInfo _taskAwaiterGetIsCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("get_IsCompleted")!; 388private static readonly MethodInfo _taskAwaiterGetResultMethodInfo = typeof(TaskAwaiter<>).GetMethod("GetResult")!; 389private static readonly MethodInfo _taskAwaiterOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("OnCompleted")!; 390private static readonly MethodInfo _taskAwaiterUnsafeOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 392private static readonly MethodInfo _valueTaskGetAwaiterMethodInfo = typeof(ValueTask<>).GetMethod("GetAwaiter")!; 393private static readonly MethodInfo _valueTaskAwaiterGetIsCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("get_IsCompleted")!; 394private static readonly MethodInfo _valueTaskAwaiterGetResultMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("GetResult")!; 395private static readonly MethodInfo _valueTaskAwaiterOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("OnCompleted")!; 396private static readonly MethodInfo _valueTaskAwaiterUnsafeOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 423var taskGetAwaiterMethodInfo = (MethodInfo)methodReturnType.GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo); 424var taskAwaiterGetResultMethodInfo = (MethodInfo)taskGetAwaiterMethodInfo.ReturnType.GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo); 437private static MethodExecutorAsync? GetExecutorAsyncTrimAotCompatible(MethodInfo methodInfo, Type asyncResultType) 495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (13)
25private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 28private static readonly MethodInfo CallPropertyGetterByReferenceOpenGenericMethod = 31private static readonly MethodInfo CallNullSafePropertyGetterOpenGenericMethod = 34private static readonly MethodInfo CallNullSafePropertyGetterByReferenceOpenGenericMethod = 37private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 192MethodInfo propertyGetterWrapperMethod, 193MethodInfo propertyGetterByRefWrapperMethod) 207var getMethod = propertyInfo.GetMethod; 245MethodInfo propertyGetMethod, 246MethodInfo openGenericWrapperMethod) 254var wrapperDelegateMethod = openGenericWrapperMethod.MakeGenericMethod(typeInput, typeOutput); 277var setMethod = propertyInfo.SetMethod; 296var callPropertySetterClosedGenericMethod =
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
BsonTempDataSerializer.cs (2)
21private static readonly MethodInfo _convertArrayMethodInfo = typeof(BsonTempDataSerializer).GetMethod( 23private static readonly MethodInfo _convertDictionaryMethodInfo = typeof(BsonTempDataSerializer).GetMethod(
src\aspnetcore\src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
30private readonly MethodInfo Converter = typeof(AsyncEnumerableReader).GetMethod(
Microsoft.AspNetCore.Mvc.RazorPages (19)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (4)
31/// <param name="method">The <see cref="MethodInfo"/>.</param> 33public PageHandlerModel? CreateHandlerModel(MethodInfo method) 143/// <param name="methodInfo">The <see cref="MethodInfo"/>.</param> 148public bool IsHandler(MethodInfo methodInfo)
ApplicationModels\IPageApplicationModelPartsProvider.cs (4)
16/// <param name="method">The <see cref="MethodInfo"/>.</param> 18PageHandlerModel? CreateHandlerModel(MethodInfo method); 37/// <param name="methodInfo">The <see cref="MethodInfo"/>.</param> 42bool IsHandler(MethodInfo methodInfo);
ApplicationModels\PageHandlerModel.cs (4)
19/// <param name="handlerMethod">The <see cref="System.Reflection.MethodInfo"/> for the handler.</param> 22MethodInfo handlerMethod, 56/// Gets the <see cref="System.Reflection.MethodInfo"/> for the handler. 58public MethodInfo MethodInfo { get; }
Infrastructure\ExecutorFactory.cs (6)
24var method = handlerDescriptor.MethodInfo; 81public NonGenericTaskHandlerMethod(HandlerParameterDescriptor[] parameters, MethodInfo method) 105private static readonly MethodInfo ConvertMethod = typeof(GenericTaskHandlerMethod).GetMethod( 111public GenericTaskHandlerMethod(HandlerParameterDescriptor[] parameters, MethodInfo method) 147public VoidHandlerMethod(HandlerParameterDescriptor[] parameters, MethodInfo method) 173public ActionResultHandlerMethod(HandlerParameterDescriptor[] parameters, MethodInfo method)
Infrastructure\HandlerMethodDescriptor.cs (1)
16public MethodInfo MethodInfo { get; set; } = default!;
Microsoft.AspNetCore.Mvc.Testing (6)
src\ab038811704af8d7\HostFactoryResolver.cs (5)
104var factory = programType.GetMethod(name, DeclaredOnlyLookup); 114private static bool IsFactory<TReturn>(MethodInfo? factory) 182var buildMethod = builder.GetType().GetMethod("Build"); 200private readonly MethodInfo _entryPoint; 213MethodInfo entryPoint,
WebApplicationFactory.cs (1)
254var method = this.GetType().GetMethod(nameof(ConfigureWebApplicationBuilder), BindingFlags.NonPublic | BindingFlags.Instance, [typeof(IHostApplicationBuilder)]);
Microsoft.AspNetCore.Mvc.ViewFeatures (10)
DefaultHtmlGenerator.cs (2)
27private static readonly MethodInfo ConvertEnumFromStringMethod = 998var methodInfo = ConvertEnumFromStringMethod.MakeGenericMethod(innerType);
TryGetValueProvider.cs (2)
20private static readonly MethodInfo _strongTryGetValueImplInfo = 60var implementationMethod = _strongTryGetValueImplInfo.MakeGenericMethod(keyType, returnType);
ViewComponents\DefaultViewComponentDescriptorProvider.cs (3)
50var methodInfo = FindMethod(typeInfo.AsType()); 63private static MethodInfo FindMethod(Type componentType) 83var selectedMethod = methods[0];
ViewComponents\ViewComponentDescriptor.cs (2)
120/// Gets or sets the <see cref="System.Reflection.MethodInfo"/> to invoke. 122public MethodInfo MethodInfo { get; set; }
ViewComponents\ViewComponentInvokerCache.cs (1)
49var methodInfo = viewComponentContext.ViewComponentDescriptor?.MethodInfo;
Microsoft.AspNetCore.OpenApi (97)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (3)
52using MetadataPopulator = System.Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult>; 170MethodInfo methodInfo) 180private static EndpointFilterDelegate BuildFilterDelegate(EndpointFilterDelegate filteredInvocation, EndpointBuilder builder, MethodInfo mi)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (2)
100var methodInfo = metadata.OfType<MethodInfo>().SingleOrDefault();
Extensions\TypeExtensions.cs (2)
48var methodInfo = apiDescription.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor 50: apiDescription.ActionDescriptor.EndpointMetadata.OfType<MethodInfo>().SingleOrDefault();
Services\OpenApiGenerator.cs (7)
54/// <param name="methodInfo">The <see cref="MethodInfo"/> associated with the route handler of the endpoint.</param> 59MethodInfo methodInfo, 73private OpenApiOperation GetOperation(string httpMethod, MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern) 99private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointMetadataCollection metadata) 256private OpenApiRequestBody? GetOpenApiRequestBody(MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern, bool disableInferredBody) 326private HashSet<OpenApiTagReference> GetOperationTags(MethodInfo methodInfo, EndpointMetadataCollection metadata) 366private List<IOpenApiParameter> GetOpenApiParameters(MethodInfo methodInfo, RoutePattern pattern, bool disableInferredBody)
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (14)
17private static readonly MethodInfo INotifyCompletion_OnCompleted = typeof(INotifyCompletion).GetMethod(nameof(INotifyCompletion.OnCompleted), Everything, new[] { typeof(Action) })!; 18private static readonly MethodInfo ICriticalNotifyCompletion_UnsafeOnCompleted = typeof(ICriticalNotifyCompletion).GetMethod(nameof(ICriticalNotifyCompletion.UnsafeOnCompleted), Everything, new[] { typeof(Action) })!; 22public MethodInfo AwaiterGetResultMethod { get; } 23public MethodInfo AwaiterOnCompletedMethod { get; } 24public MethodInfo? AwaiterUnsafeOnCompletedMethod { get; } 26public MethodInfo GetAwaiterMethod { get; } 31MethodInfo awaiterGetResultMethod, 32MethodInfo awaiterOnCompletedMethod, 33MethodInfo? awaiterUnsafeOnCompletedMethod, 35MethodInfo getAwaiterMethod) 54var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 81var onCompletedMethod = INotifyCompletion_OnCompleted; 85MethodInfo? unsafeOnCompletedMethod = null; 93var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (35)
30private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 42private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) 63private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, bool isTrimAotCompatible) 90public MethodInfo MethodInfo { get; } 105public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo) 112public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[] parameterDefaultValues) 123/// The difference between this method and <see cref="Create(MethodInfo, TypeInfo)"/> is that 127public static ObjectMethodExecutor CreateTrimAotCompatible(MethodInfo methodInfo, TypeInfo targetTypeInfo) 197private static MethodExecutor GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 247MethodInfo methodInfo, 386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 387private static readonly MethodInfo _taskAwaiterGetIsCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("get_IsCompleted")!; 388private static readonly MethodInfo _taskAwaiterGetResultMethodInfo = typeof(TaskAwaiter<>).GetMethod("GetResult")!; 389private static readonly MethodInfo _taskAwaiterOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("OnCompleted")!; 390private static readonly MethodInfo _taskAwaiterUnsafeOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 392private static readonly MethodInfo _valueTaskGetAwaiterMethodInfo = typeof(ValueTask<>).GetMethod("GetAwaiter")!; 393private static readonly MethodInfo _valueTaskAwaiterGetIsCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("get_IsCompleted")!; 394private static readonly MethodInfo _valueTaskAwaiterGetResultMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("GetResult")!; 395private static readonly MethodInfo _valueTaskAwaiterOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("OnCompleted")!; 396private static readonly MethodInfo _valueTaskAwaiterUnsafeOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 423var taskGetAwaiterMethodInfo = (MethodInfo)methodReturnType.GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo); 424var taskAwaiterGetResultMethodInfo = (MethodInfo)taskGetAwaiterMethodInfo.ReturnType.GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo); 437private static MethodExecutorAsync? GetExecutorAsyncTrimAotCompatible(MethodInfo methodInfo, Type asyncResultType) 495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (28)
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)!; 27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 42private readonly MethodInfo _enumTryParseMethod; 87MethodInfo? methodInfo; 89if (TryGetExplicitIParsableTryParseMethod(type, out var explicitIParsableTryParseMethod)) 190if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(type, "TryParse") is MethodInfo invalidMethod) 205static bool ValidateReturnType(MethodInfo methodInfo) 221var methodInfo = GetIBindableFromHttpContextMethod(nonNullableParameterType); 284if (_throwOnInvalidMethod && GetAnyMethodFromHierarchy(nonNullableParameterType, "BindAsync") is MethodInfo invalidBindMethod) 306static bool ValidateReturnType(MethodInfo methodInfo) 410private static MethodInfo? GetIBindableFromHttpContextMethod(Type type) 431private static bool TryGetExplicitIParsableTryParseMethod(Type type, out MethodInfo methodInfo) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType) 444bool IsMatch(MethodInfo? method) => method is not null && !method.IsAbstract && validateReturnType(method); 446var methodInfo = type.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy, parameterTypes); 453var candidateInterfaceMethodInfo = default(MethodInfo); 458var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static, parameterTypes); 480private static MethodInfo? GetAnyMethodFromHierarchy(Type type, string name) 483var methodInfo = type.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy) 493var interfaceMethod = implementedInterface.GetMethod(name, BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance); 504private static MethodInfo GetEnumTryParseMethod(bool preferNonGenericEnumParseOverload) 506MethodInfo? methodInfo = null; 532private static bool TryGetDateTimeTryParseMethod(Type type, [NotNullWhen(true)] out MethodInfo? methodInfo) 568private static bool TryGetNumberStylesTryGetMethod(Type type, [NotNullWhen(true)] out MethodInfo? method, [NotNullWhen(true)] out NumberStyles? numberStyles)
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (2)
36private static bool IsCompilerGeneratedMethod(MethodInfo method) 63internal static bool TryGetNonCompilerGeneratedMethodName(MethodInfo method, [NotNullWhen(true)] out string? originalName)
Microsoft.AspNetCore.Routing (31)
Builder\RouteHandlerServices.cs (3)
39Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 69Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 71MethodInfo methodInfo)
EndpointRoutingMiddleware.cs (1)
79var method = middleware.Method;
Matching\ILEmitTrieFactory.cs (6)
742public MethodInfo Add { get; } 747public MethodInfo As { get; } 752public MethodInfo AsSpan { get; } 757public MethodInfo GetReference { get; } 762public MethodInfo ReadUnalignedUInt64 { get; } 767public MethodInfo ReadUnalignedUInt16 { get; }
RouteEndpointDataSource.cs (6)
38MethodInfo methodInfo) 64Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? inferMetadataFunc, 66MethodInfo methodInfo) 133var methodInfo = entry.Method; 347public required Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? InferMetadataFunc { get; init; } 349public required MethodInfo Method { get; init; }
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (13)
25private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 28private static readonly MethodInfo CallPropertyGetterByReferenceOpenGenericMethod = 31private static readonly MethodInfo CallNullSafePropertyGetterOpenGenericMethod = 34private static readonly MethodInfo CallNullSafePropertyGetterByReferenceOpenGenericMethod = 37private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 192MethodInfo propertyGetterWrapperMethod, 193MethodInfo propertyGetterByRefWrapperMethod) 207var getMethod = propertyInfo.GetMethod; 245MethodInfo propertyGetMethod, 246MethodInfo openGenericWrapperMethod) 254var wrapperDelegateMethod = openGenericWrapperMethod.MakeGenericMethod(typeInput, typeOutput); 277var setMethod = propertyInfo.SetMethod; 296var callPropertySetterClosedGenericMethod =
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (2)
36private static bool IsCompilerGeneratedMethod(MethodInfo method) 63internal static bool TryGetNonCompilerGeneratedMethodName(MethodInfo method, [NotNullWhen(true)] out string? originalName)
Microsoft.AspNetCore.Routing.Abstractions (13)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (13)
25private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 28private static readonly MethodInfo CallPropertyGetterByReferenceOpenGenericMethod = 31private static readonly MethodInfo CallNullSafePropertyGetterOpenGenericMethod = 34private static readonly MethodInfo CallNullSafePropertyGetterByReferenceOpenGenericMethod = 37private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 192MethodInfo propertyGetterWrapperMethod, 193MethodInfo propertyGetterByRefWrapperMethod) 207var getMethod = propertyInfo.GetMethod; 245MethodInfo propertyGetMethod, 246MethodInfo openGenericWrapperMethod) 254var wrapperDelegateMethod = openGenericWrapperMethod.MakeGenericMethod(typeInput, typeOutput); 277var setMethod = propertyInfo.SetMethod; 296var callPropertySetterClosedGenericMethod =
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.SignalR.Client.Core (18)
HubConnection.cs (4)
71private static readonly MethodInfo _sendStreamItemsMethod = typeof(HubConnection).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).Single(m => m.Name.Equals(nameof(SendStreamItems))); 72private static readonly MethodInfo _sendIAsyncStreamItemsMethod = typeof(HubConnection).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).Single(m => m.Name.Equals(nameof(SendIAsyncEnumerableStreamItems))); 1140private Task InvokeStreamMethod(MethodInfo methodInfo, Type[] genericTypes, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource) 1162private Task ReflectionSendStreamItems(MethodInfo methodInfo, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource)
src\aspnetcore\src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (14)
148private static readonly MethodInfo _asyncEnumerableGetAsyncEnumeratorMethodInfo = typeof(IAsyncEnumerable<>).GetMethod("GetAsyncEnumerator")!; 159var enumerator = ((MethodInfo)constructedIAsyncEnumerableInterface.GetMemberWithSameMetadataDefinitionAs(_asyncEnumerableGetAsyncEnumeratorMethodInfo)).Invoke(asyncEnumerable, [cancellationToken])!; 176private static readonly MethodInfo _asyncEnumeratorMoveNextAsyncMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("MoveNextAsync")!; 177private static readonly MethodInfo _asyncEnumeratorGetCurrentMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("get_Current")!; 180private readonly MethodInfo _moveNextAsyncMethodInfo; 181private readonly MethodInfo _getCurrentMethodInfo; 188_moveNextAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorMoveNextAsyncMethodInfo)!; 189_getCurrentMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorGetCurrentMethodInfo)!; 201private static readonly MethodInfo _channelReaderTryReadMethodInfo = typeof(ChannelReader<>).GetMethod("TryRead")!; 202private static readonly MethodInfo _channelReaderWaitToReadAsyncMethodInfo = typeof(ChannelReader<>).GetMethod("WaitToReadAsync")!; 207private readonly MethodInfo _tryReadMethodInfo; 208private readonly MethodInfo _waitToReadAsyncMethodInfo; 216_tryReadMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderTryReadMethodInfo)!; 217_waitToReadAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderWaitToReadAsyncMethodInfo)!;
Microsoft.AspNetCore.SignalR.Core (93)
HubInvocationContext.cs (4)
22/// <param name="hubMethod">The <see cref="MethodInfo"/> for the Hub method being invoked.</param> 24public HubInvocationContext(HubCallerContext context, IServiceProvider serviceProvider, Hub hub, MethodInfo hubMethod, IReadOnlyList<object?> hubMethodArguments) 65/// The <see cref="MethodInfo"/> for the Hub method being invoked. 67public MethodInfo HubMethod { get; }
Internal\DefaultHubDispatcher.cs (2)
896foreach (var methodInfo in HubReflectionHelper.GetHubMethods(hubType)) 926private static ObjectMethodExecutor CreateObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetType)
Internal\HubMethodDescriptor.cs (8)
20private static readonly MethodInfo MakeAsyncEnumeratorMethod = typeof(AsyncEnumerableAdapters) 24private static readonly MethodInfo MakeAsyncEnumeratorFromChannelMethod = typeof(AsyncEnumerableAdapters) 28private readonly MethodInfo? _makeCancelableEnumeratorMethodInfo; 229private static Func<object, CancellationToken, IAsyncEnumerator<object?>> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) 241var genericMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); 258private static Func<object, CancellationToken, IAsyncEnumerator<object?>> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType) 277var genericAdapterMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); 305var methodInfo = MethodExecutor.MethodInfo;
Internal\HubReflectionHelper.cs (2)
12public static IEnumerable<MethodInfo> GetHubMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type hubType) 20private static bool IsHubMethod(MethodInfo methodInfo)
Internal\TypedClientBuilder.cs (9)
45var factoryMethod = clientType.GetMethod(nameof(Build), BindingFlags.Public | BindingFlags.Static); 65foreach (var method in GetAllInterfaceMethods(typeof(T))) 75private static IEnumerable<MethodInfo> GetAllInterfaceMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) 81foreach (var parentMethod in GetAllInterfaceMethods(parent)) 88foreach (var method in interfaceType.GetMethods()) 113private static void BuildMethod(TypeBuilder type, MethodInfo interfaceMethodInfo, FieldInfo proxyField) 129MethodInfo invokeMethod; 269foreach (var method in interfaceType.GetMethods()) 283private static void VerifyMethod(MethodInfo interfaceMethod)
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (14)
17private static readonly MethodInfo INotifyCompletion_OnCompleted = typeof(INotifyCompletion).GetMethod(nameof(INotifyCompletion.OnCompleted), Everything, new[] { typeof(Action) })!; 18private static readonly MethodInfo ICriticalNotifyCompletion_UnsafeOnCompleted = typeof(ICriticalNotifyCompletion).GetMethod(nameof(ICriticalNotifyCompletion.UnsafeOnCompleted), Everything, new[] { typeof(Action) })!; 22public MethodInfo AwaiterGetResultMethod { get; } 23public MethodInfo AwaiterOnCompletedMethod { get; } 24public MethodInfo? AwaiterUnsafeOnCompletedMethod { get; } 26public MethodInfo GetAwaiterMethod { get; } 31MethodInfo awaiterGetResultMethod, 32MethodInfo awaiterOnCompletedMethod, 33MethodInfo? awaiterUnsafeOnCompletedMethod, 35MethodInfo getAwaiterMethod) 54var getAwaiterMethod = type.GetMethod("GetAwaiter", Everything, Type.EmptyTypes); 81var onCompletedMethod = INotifyCompletion_OnCompleted; 85MethodInfo? unsafeOnCompletedMethod = null; 93var getResultMethod = awaiterType.GetMethod("GetResult", Everything, Type.EmptyTypes);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (35)
30private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 42private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) 63private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, bool isTrimAotCompatible) 90public MethodInfo MethodInfo { get; } 105public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo) 112public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[] parameterDefaultValues) 123/// The difference between this method and <see cref="Create(MethodInfo, TypeInfo)"/> is that 127public static ObjectMethodExecutor CreateTrimAotCompatible(MethodInfo methodInfo, TypeInfo targetTypeInfo) 197private static MethodExecutor GetExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) 247MethodInfo methodInfo, 386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 387private static readonly MethodInfo _taskAwaiterGetIsCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("get_IsCompleted")!; 388private static readonly MethodInfo _taskAwaiterGetResultMethodInfo = typeof(TaskAwaiter<>).GetMethod("GetResult")!; 389private static readonly MethodInfo _taskAwaiterOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("OnCompleted")!; 390private static readonly MethodInfo _taskAwaiterUnsafeOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 392private static readonly MethodInfo _valueTaskGetAwaiterMethodInfo = typeof(ValueTask<>).GetMethod("GetAwaiter")!; 393private static readonly MethodInfo _valueTaskAwaiterGetIsCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("get_IsCompleted")!; 394private static readonly MethodInfo _valueTaskAwaiterGetResultMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("GetResult")!; 395private static readonly MethodInfo _valueTaskAwaiterOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("OnCompleted")!; 396private static readonly MethodInfo _valueTaskAwaiterUnsafeOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; 423var taskGetAwaiterMethodInfo = (MethodInfo)methodReturnType.GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo); 424var taskAwaiterGetResultMethodInfo = (MethodInfo)taskGetAwaiterMethodInfo.ReturnType.GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo); 437private static MethodExecutorAsync? GetExecutorAsyncTrimAotCompatible(MethodInfo methodInfo, Type asyncResultType) 495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
src\aspnetcore\src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (14)
148private static readonly MethodInfo _asyncEnumerableGetAsyncEnumeratorMethodInfo = typeof(IAsyncEnumerable<>).GetMethod("GetAsyncEnumerator")!; 159var enumerator = ((MethodInfo)constructedIAsyncEnumerableInterface.GetMemberWithSameMetadataDefinitionAs(_asyncEnumerableGetAsyncEnumeratorMethodInfo)).Invoke(asyncEnumerable, [cancellationToken])!; 176private static readonly MethodInfo _asyncEnumeratorMoveNextAsyncMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("MoveNextAsync")!; 177private static readonly MethodInfo _asyncEnumeratorGetCurrentMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("get_Current")!; 180private readonly MethodInfo _moveNextAsyncMethodInfo; 181private readonly MethodInfo _getCurrentMethodInfo; 188_moveNextAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorMoveNextAsyncMethodInfo)!; 189_getCurrentMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorGetCurrentMethodInfo)!; 201private static readonly MethodInfo _channelReaderTryReadMethodInfo = typeof(ChannelReader<>).GetMethod("TryRead")!; 202private static readonly MethodInfo _channelReaderWaitToReadAsyncMethodInfo = typeof(ChannelReader<>).GetMethod("WaitToReadAsync")!; 207private readonly MethodInfo _tryReadMethodInfo; 208private readonly MethodInfo _waitToReadAsyncMethodInfo; 216_tryReadMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderTryReadMethodInfo)!; 217_waitToReadAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderWaitToReadAsyncMethodInfo)!;
StreamTracker.cs (1)
17private static readonly MethodInfo _buildConverterMethod = typeof(StreamTracker).GetMethods(BindingFlags.NonPublic | BindingFlags.Static).Single(m => m.Name.Equals(nameof(BuildStream)));
Microsoft.AspNetCore.TestHost (5)
src\ab038811704af8d7\HostFactoryResolver.cs (5)
104var factory = programType.GetMethod(name, DeclaredOnlyLookup); 114private static bool IsFactory<TReturn>(MethodInfo? factory) 182var buildMethod = builder.GetType().GetMethod("Build"); 200private readonly MethodInfo _entryPoint; 213MethodInfo entryPoint,
Microsoft.Build (6)
Evaluation\Expander.Function.cs (6)
539IEnumerable<MethodInfo> methods = _receiverType.GetMethods(_bindingFlags).Where(m => m.Name.Equals(_methodMethodName) && m.GetParameters().Length == args.Length); 621private object GetMethodResult(object objectInstance, IEnumerable<MethodInfo> methods, object[] args, int index) 628foreach (MethodInfo method in methods) 1191private MethodInfo FindPublicMethodBySignature(string methodName, Type[] parameterTypes) 1193foreach (MethodInfo method in _receiverType.GetMethods(_bindingFlags)) 1330functionResult = ((MethodInfo)memberInfo).Invoke(objectInstance /* null if static method */, args);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis (9)
CodeGen\BasicBlock.cs (1)
648var method = visType.GetTypeInfo().GetDeclaredMethod("BasicBlockToString");
CodeGen\ILBuilder.cs (1)
1283var method = visType.GetTypeInfo().GetDeclaredMethod("ILBuilderToString");
DiaSymReader\SymUnmanagedFactory.cs (1)
83foreach (var method in typeof(Environment).GetTypeInfo().GetDeclaredMethods("GetEnvironmentVariable"))
InternalSpecialType.cs (2)
56/// Indicates that the type is <see cref="System.Reflection.MethodInfo"/> from the COR library. 59/// Check for this special type cannot be used to find the "canonical" definition of <see cref="System.Reflection.MethodInfo"/>
InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
PEWriter\PeWriter.cs (1)
321private static MethodInfo? s_calculateChecksumMethod;
Microsoft.CodeAnalysis.Analyzers (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
62var methodInfo = compilerAnalyzerType.GetMethod("GetSupportedErrorCodes", BindingFlags.Instance | BindingFlags.NonPublic)!;
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis.ExternalAccess.Extensions (4)
Internal\ExtensionDocumentMessageHandlerWrapper.cs (1)
16protected override Task ExecuteAsync(MethodInfo executeAsyncMethod, object handler, object? message, Document argument, CancellationToken cancellationToken)
Internal\ExtensionMessageHandlerWrapper.cs (2)
17private readonly MethodInfo _executeAsyncMethod; 60protected abstract Task ExecuteAsync(MethodInfo executeAsyncMethod, object handler, object? message, TArgument argument, CancellationToken cancellationToken);
Internal\ExtensionWorkspaceMessageHandlerWrapper.cs (1)
16protected override Task ExecuteAsync(MethodInfo executeAsyncMethod, object handler, object? message, Solution argument, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (1)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
62var methodInfo = compilerAnalyzerType.GetMethod("GetSupportedErrorCodes", BindingFlags.Instance | BindingFlags.NonPublic)!;
Microsoft.CodeAnalysis.NetAnalyzers (3)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
74var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 120if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 204private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis.Scripting (11)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
384var getter = property.GetMethod; 390var setter = property.SetMethod;
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (7)
152var getter = property.GetMethod; 160var method = currentType.GetDeclaredMethod(memberName, Type.EmptyTypes); 198MethodInfo method; 204else if ((method = member as MethodInfo) != null) 213var getter = ((PropertyInfo)member).GetMethod; 245MethodInfo method; 252if ((method = member as MethodInfo) != null)
ScriptBuilder.cs (2)
158var runtimeEntryPoint = GetEntryPointRuntimeMethod(entryPoint, assembly); 186internal static MethodInfo GetEntryPointRuntimeMethod(IMethodSymbol entryPoint, Assembly assembly)
Microsoft.CodeAnalysis.Workspaces (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Rpc\RpcMethodInvoker.cs (2)
23public object? InvokeMethod(object rpcTarget, MethodInfo method, object?[] arguments, bool lastParameterIsCancellationToken) 46public static async Task<object?> GetTaskResultAsync(Task task, MethodInfo calledMethod)
Rpc\RpcServer.cs (1)
149var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance);
Microsoft.CSharp (42)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (4)
20private static MethodInfo s_DoubleIsNaN; 21private static MethodInfo s_SingleIsNaN; 74MethodInfo isNaN = s_DoubleIsNaN ??= typeof(double).GetMethod("IsNaN"); 80MethodInfo isNaN = s_SingleIsNaN ??= typeof(float).GetMethod("IsNaN");
Microsoft\CSharp\RuntimeBinder\ComInterop\DynamicVariantExtensions.cs (2)
264internal static System.Reflection.MethodInfo GetByrefSetter(VarEnum varType) 409internal static System.Reflection.MethodInfo GetSetter(VarEnum varType)
Microsoft\CSharp\RuntimeBinder\ComInterop\TypeUtils.cs (7)
86internal static MethodInfo GetUserDefinedCoercionMethod(Type convertFrom, Type convertToType, bool implicitOnly) 92MethodInfo[] eMethods = nnExprType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 93MethodInfo method = FindConversionOperator(eMethods, convertFrom, convertToType, implicitOnly); 98MethodInfo[] cMethods = nnConvType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 119internal static MethodInfo FindConversionOperator(MethodInfo[] methods, Type typeFrom, Type typeTo, bool implicitOnly) 121foreach (MethodInfo mi in methods)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (4)
267MethodInfo m = methinfo.MethodInfo; 342MethodInfo m = ((ExprMethodInfo)list2.OptionalNextListNode).MethodInfo; 569MethodInfo methodInfo; 669MethodInfo methodInfo = ((ExprMethodInfo)list.OptionalNextListNode).MethodInfo;
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (3)
35if (mi1 is MethodInfo method1) 37if (!(mi2 is MethodInfo method2) || method1.IsGenericMethod != method2.IsGenericMethod) 257MethodInfo apiMethod = memberInfo.GetMethod(
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (4)
24public MethodInfo MethodInfo 38MethodInfo methodInfo = methSym.AssociatedMemberInfo as MethodInfo; 50foreach (MethodInfo m in type.GetMethods(EverythingBindingFlags))
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Property.cs (1)
51var types = (mwtSet.Meth()?.AssociatedMemberInfo as MethodInfo)?.ReturnParameter.GetRequiredCustomModifiers();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
172new PredefinedTypeInfo(PredefinedType.PT_METHODINFO, typeof(System.Reflection.MethodInfo), "System.Reflection.MethodInfo"),
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs (1)
63? ((MethodInfo)((MethodSymbol)OwningSymbol).AssociatedMemberInfo).GetGenericArguments()
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (15)
190if (member is MethodInfo method) 306private static TypeArray GetMethodTypeParameters(MethodInfo method, MethodSymbol parent) 638else if (o is MethodInfo m) 659private static TypeParameterType ProcessMethodTypeParameter(MethodInfo methinfo, Type t, AggregateSymbol parent) 764foreach (MethodInfo methinfo in t.DeclaringType.GetMethods(EverythingBindingFlags)) 1261MethodInfo accessor = property.GetMethod ?? property.SetMethod; // Must have at least one. 1269MethodInfo methGet = property.GetMethod; 1270MethodInfo methSet = property.SetMethod; 1345foreach (MethodInfo m in t.GetMethods(EverythingBindingFlags)) 1364MethodInfo method = member as MethodInfo; 1711private static SymWithType GetSlotForOverride(MethodInfo method) 1715MethodInfo baseMethodInfo = method.GetBaseDefinition(); 1826foreach (MethodInfo conversion in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) 1852private static bool IsOperator(MethodInfo method)
Microsoft.DotNet.HotReload.WebAssembly.Browser (16)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
74var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>)], modifiers: null); 83var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (14)
26internal readonly struct UpdateHandler<TAction>(TAction action, MethodInfo method) 30public MethodInfo Method { get; } = method; 194if (GetMetadataUpdateMethod(handlerType, ClearCacheHandlerName) is MethodInfo clearCache) 200if (GetMetadataUpdateMethod(handlerType, UpdateApplicationHandlerName) is MethodInfo updateApplication) 206if (GetContentUpdateMethod(handlerType, UpdateContentHandlerName) is MethodInfo updateContent) 222UpdateHandler<MetadataUpdateAction> CreateMetadataUpdateAction(MethodInfo method) 238UpdateHandler<ContentUpdateAction> CreateContentUpdateAction(MethodInfo method) 254void ReportException(Exception e, MethodInfo method) 257MethodInfo? GetMetadataUpdateMethod(Type handlerType, string name) 259if (handlerType.GetMethod(name, HandlerMethodBindingFlags, binder: null, s_metadataUpdateSignature, modifiers: null) is MethodInfo updateMethod && 269MethodInfo? GetContentUpdateMethod(Type handlerType, string name) 271if (handlerType.GetMethod(name, HandlerMethodBindingFlags, binder: null, s_contentUpdateSignature, modifiers: null) is MethodInfo updateMethod && 283foreach (MethodInfo method in handlerType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) 294private static string GetHandlerDisplayString(MethodInfo method)
Microsoft.Extensions.AI.Abstractions (37)
Functions\AIFunction.cs (2)
20/// Gets the underlying <see cref="MethodInfo"/> that this <see cref="AIFunction"/> might be wrapping. 25public virtual MethodInfo? UnderlyingMethod => null;
Functions\AIFunctionFactory.cs (24)
34/// (specified as <see cref="Delegate"/> or <see cref="MethodInfo"/>). As part of this process, JSON schemas are 219/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 299public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 307/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 384public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null) 401/// Creates an <see cref="AIFunction"/> instance for a method, specified via a <see cref="MethodInfo"/> for 493MethodInfo method, 533public static ReflectionAIFunction Build(MethodInfo method, object? target, AIFunctionFactoryOptions options) 559MethodInfo method, 603public override MethodInfo UnderlyingMethod => FunctionDescriptor.Method; 715public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method, AIFunctionFactoryOptions options) 848public MethodInfo Method { get; } 858private static string GetFunctionName(MethodInfo method) 883static bool IsAsyncMethod(MethodInfo method) 1093MethodInfo taskResultGetter = GetMethodFromGenericMethodDefinition(returnType, _taskGetResult); 1131MethodInfo valueTaskAsTask = GetMethodFromGenericMethodDefinition(returnType, _valueTaskAsTask); 1132MethodInfo asTaskResultGetter = GetMethodFromGenericMethodDefinition(valueTaskAsTask.ReturnType, _taskGetResult); 1208private static readonly MethodInfo _taskGetResult = typeof(Task<>).GetProperty(nameof(Task<int>.Result), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!; 1209private static readonly MethodInfo _valueTaskAsTask = typeof(ValueTask<>).GetMethod(nameof(ValueTask<int>.AsTask), BindingFlags.Instance | BindingFlags.Public)!; 1211private static MethodInfo GetMethodFromGenericMethodDefinition(Type specializedType, MethodInfo genericMethodDefinition) 1226private static string? GetReturnParameterDescription(MethodInfo method) 1273MethodInfo Method, 1352private static object? ReflectionInvoke(MethodInfo method, object? target, object?[]? arguments)
Functions\AIFunctionFactoryOptions.cs (2)
53/// The name to use for the function. The default value is a name derived from the passed <see cref="Delegate"/> or <see cref="MethodInfo"/> (for example, via an <see cref="AIFunctionNameAttribute"/> or <see cref="DisplayNameAttribute"/> on the method). 59/// The description for the function. The default value is a description derived from the passed <see cref="Delegate"/> or <see cref="MethodInfo"/>, if possible
Functions\DelegatingAIFunction.cs (1)
48public override MethodInfo? UnderlyingMethod => InnerFunction.UnderlyingMethod;
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (8)
103case MethodInfo method: 104MethodInfo metaMethod = GetMethodMetadataDefinition(method); 134private static MethodInfo GetMethodMetadataDefinition(MethodInfo method) 141return (MethodInfo)GetMemberMetadataDefinition(method); 198MethodInfo? getter = propertyInfo.GetGetMethod(true); 199MethodInfo? setter = propertyInfo.GetSetMethod(true); 440if (property.GetGetMethod(true) is MethodInfo method)
Microsoft.Extensions.AI.Abstractions.Tests (7)
Functions\DelegatingAIFunctionTests.cs (1)
50case MethodInfo methodInfo when methodInfo.IsVirtual && methodInfo.Name is not ("Finalize" or "Equals" or "GetHashCode"):
Utilities\AIJsonUtilitiesTests.cs (6)
433MethodInfo method = typeof(AIJsonUtilitiesTests).GetMethod(nameof(MethodWithRequiredAttributeCombinations), BindingFlags.NonPublic | BindingFlags.Static)!; 495MethodInfo method = typeof(AIJsonUtilitiesTests).GetMethod(nameof(MethodWithRequiredNestedType), BindingFlags.NonPublic | BindingFlags.Static)!; 556var method = ((Action<int, int>)TestMethod).Method; 569MethodInfo method = ((Action)MethodWithAIFunctionName).Method; 594var method = ((Action)TestMethod).Method; 610var method = ((Action<string, int>)TestMethod).Method;
Microsoft.Extensions.AI.Tests (4)
Functions\AIFunctionFactoryTest.cs (4)
404MethodInfo overrideMethod = typeof(MyDerivedType).GetMethod(nameof(MyDerivedType.Method))!; 468MethodInfo overrideMethod = typeof(DerivedDescribed).GetMethod(nameof(DerivedDescribed.Compute))!; 557MethodInfo[] methods = typeof(ExcludeFromSchemaConcurrencyTools) 564foreach (MethodInfo method in methods)
Microsoft.Extensions.Configuration.Binder (5)
ConfigurationBinder.cs (5)
698MethodInfo? addMethod = dictionaryType.GetMethod("Add", DeclaredOnlyLookup); 770MethodInfo tryGetValue = dictionaryType.GetMethod("TryGetValue", DeclaredOnlyLookup)!; 820MethodInfo? addMethod = collectionType.GetMethod("Add", DeclaredOnlyLookup); 925MethodInfo? addMethod = type.GetMethod("Add", DeclaredOnlyLookup); 1128MethodInfo? setMethod = property.GetSetMethod(true);
Microsoft.Extensions.Configuration.Binder.SourceGeneration (4)
ConfigurationBindingGenerator.cs (4)
103internal static MethodInfo? InterceptableLocationVersionGetDisplayLocation { get; private set; } 104internal static MethodInfo? InterceptableLocationDataGetter { get; private set; } 105internal static MethodInfo? InterceptableLocationVersionGetter { get; private set; } 109MethodInfo? getInterceptableLocationMethod = null;
Microsoft.Extensions.DependencyInjection (16)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
116static MethodInfo GetArrayEmptyMethodInfo(Type elementType)
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (6)
18private static readonly MethodInfo ResolvedServicesGetter = typeof(ServiceProviderEngineScope).GetProperty( 21private static readonly MethodInfo ScopeLockGetter = typeof(ServiceProviderEngineScope).GetProperty( 24private static readonly MethodInfo ScopeIsRootScope = typeof(ServiceProviderEngineScope).GetProperty( 27private static readonly MethodInfo CallSiteRuntimeResolverResolveMethod = typeof(CallSiteRuntimeResolver).GetMethod( 30private static readonly MethodInfo CallSiteRuntimeResolverInstanceField = typeof(CallSiteRuntimeResolver).GetProperty( 35private static readonly MethodInfo GetTypeFromHandleMethod = typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle))!;
ServiceLookup\ServiceLookupHelpers.cs (9)
15private static readonly MethodInfo ArrayEmptyMethodInfo = typeof(Array).GetMethod(nameof(Array.Empty))!; 17internal static readonly MethodInfo InvokeFactoryMethodInfo = typeof(Func<IServiceProvider, object>) 20internal static readonly MethodInfo CaptureDisposableMethodInfo = typeof(ServiceProviderEngineScope) 23internal static readonly MethodInfo TryGetValueMethodInfo = typeof(IDictionary<ServiceCacheKey, object>) 26internal static readonly MethodInfo ResolveCallSiteAndScopeMethodInfo = typeof(CallSiteRuntimeResolver) 29internal static readonly MethodInfo AddMethodInfo = typeof(IDictionary<ServiceCacheKey, object>) 32internal static readonly MethodInfo MonitorEnterMethodInfo = typeof(Monitor) 34internal static readonly MethodInfo MonitorExitMethodInfo = typeof(Monitor) 40internal static MethodInfo GetArrayEmptyMethodInfo(Type itemType) =>
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ActivatorUtilities.cs (1)
41internal static readonly MethodInfo s_getServiceInfo =
Microsoft.Extensions.Diagnostics.Testing (13)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (13)
260MethodInfo? temp21 = instance.AddMethod; 286MethodInfo? temp27 = instance.RaiseMethod; 299MethodInfo? temp30 = instance.RemoveMethod; 500public static void BindCore(IConfiguration configuration, ref IEnumerable<MethodInfo> instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) 502if (instance is not ICollection<MethodInfo> temp) 530MethodInfo? temp67 = instance.GetMethod; 556MethodInfo? temp73 = instance.SetMethod; 869MethodInfo? temp136 = instance.EntryPoint; 1168public static void BindCore(IConfiguration configuration, ref MethodInfo instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) 1170ValidateConfigurationKeys(typeof(MethodInfo), s_configKeys_MethodInfo, configuration, binderOptions); 1253MethodInfo? temp223 = instance.Method; 1333MethodInfo? temp238 = instance.Method; 1351MethodInfo? temp241 = instance.Method;
Microsoft.Extensions.DotNetDeltaApplier (16)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
74var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>)], modifiers: null); 83var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (14)
26internal readonly struct UpdateHandler<TAction>(TAction action, MethodInfo method) 30public MethodInfo Method { get; } = method; 194if (GetMetadataUpdateMethod(handlerType, ClearCacheHandlerName) is MethodInfo clearCache) 200if (GetMetadataUpdateMethod(handlerType, UpdateApplicationHandlerName) is MethodInfo updateApplication) 206if (GetContentUpdateMethod(handlerType, UpdateContentHandlerName) is MethodInfo updateContent) 222UpdateHandler<MetadataUpdateAction> CreateMetadataUpdateAction(MethodInfo method) 238UpdateHandler<ContentUpdateAction> CreateContentUpdateAction(MethodInfo method) 254void ReportException(Exception e, MethodInfo method) 257MethodInfo? GetMetadataUpdateMethod(Type handlerType, string name) 259if (handlerType.GetMethod(name, HandlerMethodBindingFlags, binder: null, s_metadataUpdateSignature, modifiers: null) is MethodInfo updateMethod && 269MethodInfo? GetContentUpdateMethod(Type handlerType, string name) 271if (handlerType.GetMethod(name, HandlerMethodBindingFlags, binder: null, s_contentUpdateSignature, modifiers: null) is MethodInfo updateMethod && 283foreach (MethodInfo method in handlerType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)) 294private static string GetHandlerDisplayString(MethodInfo method)
Microsoft.Extensions.Hosting.Testing.Tests (1)
HostTerminatorServiceTests.cs (1)
70var methodInfo = typeof(HostTerminatorService)
Microsoft.Extensions.VectorData.ConformanceTests (1)
TypeTests\DataTypeTests.cs (1)
238private static readonly MethodInfo _dynamicDictionaryIndexer = typeof(Dictionary<string, object?>).GetMethod("get_Item")!;
Microsoft.JSInterop (14)
Infrastructure\DotNetDispatcher.cs (14)
29private static readonly ConcurrentDictionary<AssemblyKey, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByAssembly = new(); 31private static readonly ConcurrentDictionary<Type, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByType = new(); 35private static readonly MethodInfo _taskConverterMethodInfo = typeof(DotNetDispatcher).GetMethod(nameof(CreateValueTaskConverter), BindingFlags.NonPublic | BindingFlags.Static)!; 162MethodInfo methodInfo; 351private static (MethodInfo, Type[]) GetCachedMethodInfo(AssemblyKey assemblyKey, string methodIdentifier) 373var converterDelegate = _cachedConvertToTaskByType.GetOrAdd(type, (Type t, MethodInfo taskConverterMethodInfo) => 381private static (MethodInfo methodInfo, Type[] parameterTypes) GetCachedMethodInfo(IDotNetObjectReference objectReference, string methodIdentifier) 399static Dictionary<string, (MethodInfo, Type[])> ScanTypeForCallableMethods([DynamicallyAccessedMembers(JSInvokable)] Type type) 401var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 403foreach (var method in type.GetMethods(BindingFlags.Instance | BindingFlags.Public)) 434private static Dictionary<string, (MethodInfo, Type[])> ScanAssemblyForCallableMethods(AssemblyKey assemblyKey) 438var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 442foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) 470private static Type[] GetParameterTypes(MethodInfo method)
Microsoft.Maui (17)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
240 var dotnetMethod = targetType.GetMethod(requestMethodName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod);
HotReload\HotReloadExtensions.cs (8)
39 public static List<MethodInfo> GetOnHotReloadMethods(this Type type) 43 static IEnumerable<MethodInfo> getOnHotReloadMethods(Type type, bool isSubclass = false) 49 foreach (var foo in foos) 53 foreach (var foo in getOnHotReloadMethods(type.BaseType, true)) 58 class ReflectionMethodComparer : IEqualityComparer<MethodInfo> 60 public bool Equals(MethodInfo? g1, MethodInfo? g2) => g1?.MethodHandle == g2?.MethodHandle; 62 public int GetHashCode(MethodInfo obj) => obj.MethodHandle.GetHashCode();
HotReload\HotReloadHelper.cs (1)
134 Action<MethodInfo> executeStaticMethod = (method) =>
VisualDiagnostics\BootstrapHelper.cs (2)
35 MethodInfo loadFrom = typeof(Assembly).GetMethod("LoadFrom", new Type[] { typeof(string) }); 45 MethodInfo method = type?.GetMethod(methodName);
WeakEventManager.cs (5)
42 var toRaise = new List<(object? subscriber, MethodInfo handler)>(); 76 (var subscriber, var handler) = toRaise[i]; 105 void AddEventHandler(string eventName, object? handlerTarget, MethodInfo methodInfo) 151 public Subscription(WeakReference? subscriber, MethodInfo handler) 158 public readonly MethodInfo Handler;
Microsoft.Maui.Controls (17)
BindingExpression.cs (3)
409 MethodInfo setValueMethod = typeof(IElementController).GetMethod(nameof(IElementController.SetValueFromRenderer), new[] { typeof(BindableProperty), typeof(object) }); 679 public MethodInfo LastGetter { get; set; } 681 public MethodInfo LastSetter { get; set; }
Interactivity\EventTrigger.cs (1)
15 static readonly MethodInfo s_handlerinfo = typeof(EventTrigger).GetRuntimeMethods().Single(mi => mi.Name == "OnEventTriggered" && mi.IsPublic == false);
LegacyLayouts\ConstraintExpression.cs (1)
36 MethodInfo minfo;
MessagingCenter.cs (4)
66 class Subscription : Tuple<WeakReference, MaybeWeakReference, MethodInfo, Filter> 68 public Subscription(object subscriber, object delegateSource, MethodInfo methodInfo, Filter filter) 75 MethodInfo MethodInfo => Item3; 226 void InnerSubscribe(object subscriber, string message, Type senderType, Type argType, object target, MethodInfo methodInfo, Filter filter)
PlatformBindingHelpers.cs (1)
84 var mi = target.GetType().GetProperty(targetProperty)?.SetMethod;
TypeConversionHelper.cs (7)
84 MethodInfo? opImplicit = GetImplicitConversionOperator(valueType, fromType: valueType, toType: targetType) 99 static MethodInfo? GetImplicitConversionOperator(Type onType, Type fromType, Type toType) 108 var method = onType.GetMethod("op_Implicit", bindingAttr, null, new[] { fromType }, null); 123 foreach (var method in onType.GetMethods(bindingAttr)) 136 static bool IsImplicitOperator(MethodInfo method) 148 static bool HasSuitableParameterType(MethodInfo method, Type fromType) 153 static bool HasSuitableReturnType(MethodInfo method, Type toType)
Microsoft.Maui.Controls.Build.Tasks (3)
NodeILExtensions.cs (1)
163 var converter = typeof(ICompiledTypeConverter).GetMethods().FirstOrDefault(md => md.Name == "ConvertFromString");
SetPropertiesVisitor.cs (2)
426 var cProvideValue = typeof(ICompiledValueProvider).GetMethods().FirstOrDefault(md => md.Name == "ProvideValue"); 466 var cProvideValue = typeof(ICompiledValueProvider).GetMethods().FirstOrDefault(md => md.Name == "ProvideValue");
Microsoft.Maui.Controls.Compatibility (2)
src\Core\src\VisualDiagnostics\BootstrapHelper.cs (2)
35 MethodInfo loadFrom = typeof(Assembly).GetMethod("LoadFrom", new Type[] { typeof(string) }); 45 MethodInfo method = type?.GetMethod(methodName);
Microsoft.Maui.Controls.Xaml (14)
ApplyPropertiesVisitor.cs (11)
170 var addMethod = 215 MethodInfo addMethod; 469 var addMethod = eventInfo.GetAddMethod(nonPublic: true); 476 MethodInfo mi = null; 489 foreach (var methodinfo in methodinfos) 661 MethodInfo setter; 707 MethodInfo getter; 719 static bool IsVisibleFrom(MethodInfo method, object rootElement) 744 var addMethod = collection.GetType().GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1); 813 var addMethod = GetAllRuntimeMethods(property.ReturnType).FirstOrDefault(mi => mi.Name == "Add" && mi.GetParameters().Length == 1); 825 static IEnumerable<MethodInfo> GetAllRuntimeMethods(Type type)
CreateValuesVisitor.cs (2)
254 bool isMatch(MethodInfo m) 278 var mi = nodeType.GetRuntimeMethods().FirstOrDefault(isMatch);
MarkupExtensionParser.cs (1)
66 MethodInfo setter;
Microsoft.ML.AutoML (2)
Sweepers\SmacSweeper.cs (2)
347private static readonly MethodInfo _getLeafMethod = typeof(TreeEnsembleModelParameters).GetMethod("GetLeaf", BindingFlags.NonPublic | BindingFlags.Instance); 348private static readonly MethodInfo _getLeafValueMethod = typeof(TreeEnsembleModelParameters).GetMethod("GetLeafValue", BindingFlags.NonPublic | BindingFlags.Instance);
Microsoft.ML.AutoML.SourceGenerator (5)
Template\EstimatorType.cs (1)
307System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Template\SearchSpace.cs (1)
324System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Template\SweepableEstimator_T_.cs (1)
331System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Template\SweepableEstimator.cs (1)
326System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Template\SweepableEstimatorFactory.cs (1)
302System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Microsoft.ML.CodeGenerator (12)
Templates\Azure\Console\AzureModelBuilder.cs (1)
401System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Azure\Model\AzureImageModelOutputClass.cs (1)
342System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (1)
342System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\ConsumeModel.cs (1)
353System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\ModelBuilder.cs (1)
718System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\ModelInputClass.cs (1)
316System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\ModelOutputClass.cs (1)
359System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\ModelProject.cs (1)
348System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\PredictProgram.cs (1)
375System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Templates\Console\PredictProject.cs (1)
353System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
Utils.cs (2)
68var getGetGetterMethod = typeof(Utils).GetMethod(nameof(Utils.GetValueFromColumn), BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 76var getGenericGetGetterMethod = getGetGetterMethod.MakeGenericMethod(featureColumns[i].Type.RawType);
Microsoft.ML.Core (148)
CommandLine\CmdParser.cs (6)
1337public readonly MethodInfo ParseCustom; 1338public readonly MethodInfo TryUnparseCustom; 1363private static MethodInfo GetParseMethod(Type type) 1366var meth = type.GetMethod("Parse", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, binder: null, new[] { typeof(string) }, null); 1372private static MethodInfo GetUnparseMethod(Type type) 1375var meth = type.GetMethod("TryUnparse", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, binder: null, new[] { typeof(StringBuilder) }, null);
ComponentModel\ComponentCatalog.cs (16)
19internal static AccessModifier Accessmodifier(this MethodInfo methodInfo) 167public MethodInfo InstanceGetter { get; } 181public MethodInfo CreateMethod { get; } 200internal LoadableClassInfo(LoadableClassAttributeBase attr, MethodInfo getter, ConstructorInfo ctor, MethodInfo create, bool requireEnvironment) 333public readonly MethodInfo Method; 340internal EntryPointInfo(MethodInfo method, 459out MethodInfo getter, out ConstructorInfo ctor, out MethodInfo create, out bool requireEnvironment) 567foreach (var methodInfo in type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) 642private static MethodInfo FindInstanceGetter(Type instType, Type loaderType) 650var meth = prop.GetGetMethod(false); 660private static MethodInfo FindCreateMethod(Type instType, Type loaderType, Type[] parmTypes) 662var meth = loaderType.GetMethod("Create", BindingFlags.Public | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy, null, parmTypes ?? Type.EmptyTypes, null); 693MethodInfo getter = null; 695MethodInfo create = null;
ComponentModel\LoadableClassAttribute.cs (1)
179var meth = sigType.GetMethod("Invoke");
Utilities\FuncInstanceMethodInfo1`2.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{TResult}"/>, 36private FuncInstanceMethodInfo1(MethodInfo methodInfo) 44/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, TResult}"/> representing the <see cref="MethodInfo"/> for 54/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, TResult}"/> representing the <see cref="MethodInfo"/> 64Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 65Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 80Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 82var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncInstanceMethodInfo1`3.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 37private FuncInstanceMethodInfo1(MethodInfo methodInfo) 45/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, T, TResult}"/> representing the <see cref="MethodInfo"/> 55/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, T, TResult}"/> representing the <see cref="MethodInfo"/> 65Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 66Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 81Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 83var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncInstanceMethodInfo1`4.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 38private FuncInstanceMethodInfo1(MethodInfo methodInfo) 46/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 56/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 67Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 82Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 84var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncInstanceMethodInfo2`4.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 38private FuncInstanceMethodInfo2(MethodInfo methodInfo) 46/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 56/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 67Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 82Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 84var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncInstanceMethodInfo3`3.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 37private FuncInstanceMethodInfo3(MethodInfo methodInfo) 45/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, T, TResult}"/> representing the <see cref="MethodInfo"/> 55/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, T, TResult}"/> representing the <see cref="MethodInfo"/> 65Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 66Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 81Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 83var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncInstanceMethodInfo3`4.cs (9)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 38private FuncInstanceMethodInfo3(MethodInfo methodInfo) 46/// Creates a <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 56/// <returns>A <see cref="FuncInstanceMethodInfo1{TTarget, T1, T2, TResult}"/> representing the <see cref="MethodInfo"/> 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 67Contracts.CheckParam(methodCallExpression.Method.Name == nameof(MethodInfo.CreateDelegate), nameof(expression), "Unexpected expression form"); 82Contracts.CheckParam(((ConstantExpression)methodCallExpression.Object).Type == typeof(MethodInfo), nameof(expression), "Unexpected expression form"); 84var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).Value;
Utilities\FuncMethodInfo`1.cs (2)
14private protected FuncMethodInfo(MethodInfo methodInfo) 23protected MethodInfo GenericMethodDefinition { get; }
Utilities\FuncMethodInfo`2.cs (2)
14private protected FuncMethodInfo(MethodInfo methodInfo) 24protected MethodInfo GenericMethodDefinition { get; }
Utilities\FuncMethodInfo`3.cs (2)
14private protected FuncMethodInfo(MethodInfo methodInfo) 24protected MethodInfo GenericMethodDefinition { get; }
Utilities\FuncMethodInfo1`1.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{TResult}"/>, 26private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 28private protected FuncMethodInfo1(MethodInfo methodInfo) 31_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty; 37public MethodInfo MakeGenericMethod(Type typeArg1)
Utilities\FuncMethodInfo1`2.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 27private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 29private protected FuncMethodInfo1(MethodInfo methodInfo) 32_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty; 38public MethodInfo MakeGenericMethod(Type typeArg1)
Utilities\FuncMethodInfo1`3.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 30private protected FuncMethodInfo1(MethodInfo methodInfo) 33_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty; 39public MethodInfo MakeGenericMethod(Type typeArg1)
Utilities\FuncMethodInfo2`3.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28private ImmutableDictionary<(Type, Type), MethodInfo> _instanceMethodInfo; 30private protected FuncMethodInfo2(MethodInfo methodInfo) 33_instanceMethodInfo = ImmutableDictionary<(Type, Type), MethodInfo>.Empty; 39public MethodInfo MakeGenericMethod(Type typeArg1, Type typeArg2)
Utilities\FuncMethodInfo3`2.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 27private ImmutableDictionary<(Type, Type, Type), MethodInfo> _instanceMethodInfo; 29private protected FuncMethodInfo3(MethodInfo methodInfo) 32_instanceMethodInfo = ImmutableDictionary<(Type, Type, Type), MethodInfo>.Empty; 38public MethodInfo MakeGenericMethod(Type typeArg1, Type typeArg2, Type typeArg3)
Utilities\FuncMethodInfo3`3.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28private ImmutableDictionary<(Type, Type, Type), MethodInfo> _instanceMethodInfo; 30private protected FuncMethodInfo3(MethodInfo methodInfo) 33_instanceMethodInfo = ImmutableDictionary<(Type, Type, Type), MethodInfo>.Empty; 39public MethodInfo MakeGenericMethod(Type typeArg1, Type typeArg2, Type typeArg3)
Utilities\FuncStaticMethodInfo1`1.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{TResult}"/>,
Utilities\FuncStaticMethodInfo1`2.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>,
Utilities\FuncStaticMethodInfo1`3.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\FuncStaticMethodInfo2`3.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\FuncStaticMethodInfo3`2.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>,
Utilities\FuncStaticMethodInfo3`3.cs (1)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\Utils.cs (29)
961private static MethodInfo MarshalInvokeCheckAndCreate<TRet>(Type genArg, Delegate func) 963var meth = MarshalActionInvokeCheckAndCreate(genArg, func); 994var meth = func.MakeGenericMethod(genArg); 1003var meth = func.MakeGenericMethod(genArg); 1013var meth = func.MakeGenericMethod(genArg); 1022var meth = func.MakeGenericMethod(genArg); 1032var meth = func.MakeGenericMethod(genArg1, genArg2, genArg3); 1041var meth = func.MakeGenericMethod(genArg1, genArg2, genArg3); 1051var meth = func.MakeGenericMethod(genArg); 1060var meth = func.MakeGenericMethod(genArg); 1070var meth = func.MakeGenericMethod(genArg1, genArg2); 1079var meth = func.MakeGenericMethod(genArg1, genArg2); 1089var meth = func.MakeGenericMethod(genArg1, genArg2, genArg3); 1098var meth = func.MakeGenericMethod(genArg1, genArg2, genArg3); 1108var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1118var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1128var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1138var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1148var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1158var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1169var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1180var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 1184private static MethodInfo MarshalActionInvokeCheckAndCreate(Type genArg, Delegate func) 1188var meth = func.GetMethodInfo(); 1206var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 1215var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 1224var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 1233var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 1242var meth = MarshalActionInvokeCheckAndCreate(genArg, act);
Microsoft.ML.Data (24)
Commands\ShowSchemaCommand.cs (2)
223var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.RawType); 262var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.ItemType.RawType);
Data\RowCursorUtils.cs (5)
65var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType, typeDst.RawType); 86var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType, typeof(TDst)); 164var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeDst.RawType); 184var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeof(TDst)); 201var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.ItemType.RawType, typeof(TDst));
DataLoadSave\Binary\BinaryLoader.cs (1)
197var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(Type.RawType);
DataLoadSave\Binary\BinarySaver.cs (2)
269MethodInfo methInfo = del.GetMethodInfo().GetGenericMethodDefinition(); 743MethodInfo methInfo = del.GetMethodInfo().GetGenericMethodDefinition();
DataLoadSave\Transpose\TransposeLoader.cs (1)
807var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(itemType.RawType);
DataView\LambdaColumnMapper.cs (1)
75var meth = del.GetMethodInfo().GetGenericMethodDefinition()
DataView\LambdaFilter.cs (1)
64var meth = del.GetMethodInfo().GetGenericMethodDefinition()
DataView\TypedCursor.cs (1)
417MethodInfo meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(genericType);
MLContext.cs (1)
192var method = type.GetMethod("IsDispatchingEnabled", BindingFlags.Public | BindingFlags.Static | BindingFlags.NonPublic);
Scorers\FeatureContributionCalculation.cs (1)
198var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.RawType);
Transforms\KeyToValue.cs (1)
242var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(
Transforms\RangeFilter.cs (1)
337var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(filter._type.RawType);
Transforms\ValueMapping.cs (1)
810var method = del.Method.GetGenericMethodDefinition().MakeGenericMethod(keyColumn.Type.RawType, valueColumn.Type.RawType);
Utilities\ColumnCursor.cs (3)
67var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(typeof(T), colType.RawType); 80var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(elementType); 88var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(elementType, colVectorType.ItemType.RawType);
Utils\ApiUtils.cs (2)
115var minfo = propertyInfo.GetGetMethod(); 179var minfo = propertyInfo.GetSetMethod();
Microsoft.ML.DataView (7)
Utils.cs (7)
15var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 21var meth = MarshalActionInvokeCheckAndCreate(genArg, act); 27var meth = MarshalInvokeCheckAndCreate<TRet>(genArg, func); 31private static MethodInfo MarshalInvokeCheckAndCreate<TRet>(Type genArg, Delegate func) 33var meth = MarshalActionInvokeCheckAndCreate(genArg, func); 38private static MethodInfo MarshalActionInvokeCheckAndCreate(Type genArg, Delegate func) 40var meth = func.GetMethodInfo();
Microsoft.ML.OnnxTransformer (8)
OnnxTypeParser.cs (8)
302var accessInfo = typeof(Tensor<>).GetMethod(nameof(Tensor<int>.GetValue)); 303var accessSpecialized = accessInfo.MakeGenericMethod(type); 321var methodInfo = typeof(NamedOnnxValue).GetMethod(nameof(NamedOnnxValue.AsTensor)); 322var methodSpecialized = methodInfo.MakeGenericMethod(type); 347var methodInfo = typeof(CastHelper).GetMethod(nameof(CastHelper.CastOnnxSequenceToIEnumerable)); 348var methodSpecialized = methodInfo.MakeGenericMethod(typeof(NamedOnnxValue), elementType); 370var asDictionaryMethodInfo = typeof(NamedOnnxValue).GetMethod(nameof(NamedOnnxValue.AsDictionary)); 371var asDictionaryMethod = asDictionaryMethodInfo.MakeGenericMethod(keyType, valueType);
Microsoft.ML.Parquet (2)
PartitionedFileLoader.cs (2)
684var meth = func.Method; 686var typedMeth = meth.GetGenericMethodDefinition().MakeGenericMethod(type);
Microsoft.ML.Predictor.Tests (1)
CmdLine\CmdLineReverseTest.cs (1)
190private static readonly MethodInfo _createComponentFactoryMethod = typeof(CmdParser)
Microsoft.ML.Samples (1)
Program.cs (1)
18var sample = type.GetMethod("Example", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
Microsoft.ML.Samples.GPU (1)
Program.cs (1)
17var sample = type.GetMethod("Example", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
Microsoft.ML.TestFrameworkCommon (1)
Attributes\IterationDataAttribute.cs (1)
29public override IEnumerable<object[]> GetData(MethodInfo testMethod)
Microsoft.ML.Tests (6)
ExpressionLanguageTests\ExpressionLanguageTests.cs (6)
445public MethodInfo[] Lookup(string name) 508public object ResolveToConstant(string name, MethodInfo meth, object[] values) 631private MethodInfo[] R(params Delegate[] funcs) 634var meths = new MethodInfo[funcs.Length]; 645public MethodInfo[] Lookup(string name) 663public object ResolveToConstant(string name, MethodInfo meth, object[] values)
Microsoft.ML.Transforms (33)
CountFeatureSelection.cs (2)
355var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(colType.RawType); 367var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(colType.ItemType.RawType);
Expression\BuiltinFunctions.cs (9)
63public static MethodInfo[] Ret(params MethodInfo[] funcs) 72public static MethodInfo Fn<T1>(Func<T1> fn) 82public static MethodInfo Fn<T1, T2>(Func<T1, T2> fn) 92public static MethodInfo Fn<T1, T2, T3>(Func<T1, T2, T3> fn) 102public static MethodInfo Fn<T1, T2, T3, T4>(Func<T1, T2, T3, T4> fn) 131private static MethodInfo Id<T>() 141public MethodInfo[] Lookup(string name) 368public object ResolveToConstant(string name, MethodInfo fn, object[] values)
Expression\CodeGen.cs (4)
102private static readonly MethodInfo _methGetFalseBL = ((Func<BL>)BuiltinFunctions.False).GetMethodInfo(); 103private static readonly MethodInfo _methGetTrueBL = ((Func<BL>)BuiltinFunctions.True).GetMethodInfo(); 669MethodInfo meth; 1248var meth = node.Method;
Expression\FunctionProvider.cs (2)
28MethodInfo[] Lookup(string name); 42object ResolveToConstant(string name, MethodInfo meth, object[] values);
Expression\IlGeneratorExtensions.cs (1)
132public static ILGenerator Call(this ILGenerator il, MethodInfo info)
Expression\LambdaBinder.cs (4)
1130public readonly MethodInfo Method; 1153public static bool TryGetCandidate(CallNode node, IFunctionProvider provider, MethodInfo meth, Action<string> printError, out Candidate cand) 1219private Candidate(IFunctionProvider provider, MethodInfo meth, ExprTypeKind[] kinds, ExprTypeKind kindRet, bool isVar) 1315foreach (var meth in meths)
Expression\Node.cs (2)
1004public MethodInfo Method { get; private set; } 1049public void SetMethod(MethodInfo meth)
ExpressionTransformer.cs (2)
455var meth = d.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(types); 597var meth = d.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(types);
MissingValueReplacing.cs (4)
243var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(savedVectorType.ItemType.RawType); 407var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(dstType.GetItemType().RawType); 512var method = function.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(repType.RawType); 520var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(repValue.GetType());
MutualInformationFeatureSelection.cs (2)
556var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(labelType.RawType); 635var cmiMethodInfo = cmiDel.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(itemType.RawType);
PermutationFeatureImportanceExtensions.cs (1)
701MethodInfo mi = pfiGenericType.GetMethod("GetImportanceMetricsMatrix", BindingFlags.Static | BindingFlags.Public);
Microsoft.NET.Sdk.Publish.Tasks (1)
MsDeploy\DynamicAssembly.cs (1)
157MethodInfo? invokeMethod = d?.GetType().GetMethod("Invoke");
Microsoft.TestPlatform.AdapterUtilities (5)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (5)
167method = ((MethodInfo)method).GetGenericMethodDefinition(); 280MethodInfo? method = null; 297private static MethodInfo? FindMethod(Type type, string methodName, int methodArity, string[]? parameterTypes) 301if (mbr is not MethodInfo method || method.Name != methodName || method.GetGenericArguments().Length != methodArity) 331return (MethodInfo?)(methods.Length switch
Microsoft.TestPlatform.CrossPlatEngine (3)
DataCollection\InProcDataCollector.cs (3)
116var methodInfo = GetMethodInfoFromType(_dataCollectorObject?.GetType(), methodName, [methodArg.GetType()]); 132var initializeMethodInfo = GetMethodInfoFromType(obj?.GetType(), "Initialize", [typeof(IDataCollectionSink)]); 136private static MethodInfo? GetMethodInfoFromType(Type? type, string funcName, Type[] argumentTypes)
Microsoft.TestPlatform.Utilities (1)
CodeCoverageDataAttachmentsHandler.cs (1)
37private static MethodInfo? s_mergeMethodInfo;
Microsoft.VisualBasic.Core (38)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (2)
650Dim resultType As System.Type = DirectCast(current, MethodInfo).ReturnType 789Dim resultType As System.Type = DirectCast(current, MethodInfo).ReturnType
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (1)
1216IsStatic = DirectCast(Member, MethodInfo).IsStatic
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (3)
590DirectCast(member, MethodInfo).GetParameters().Length = 0) OrElse 1243Friend Shared Function MatchesPropertyRequirements(ByVal targetProcedure As Method, ByVal flags As BindingFlags) As MethodInfo 1269Private Shared Function HasIsExternalInitModifier(method As MethodInfo) As Boolean
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (2)
113Dim operatorInfo As MethodInfo = TryCast(operatorMethod.AsMethod, MethodInfo)
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (4)
272If IsGeneric(leftProcedure) Then leftProcedure = DirectCast(leftProcedure, MethodInfo).GetGenericMethodDefinition 273If IsGeneric(rightProcedure) Then rightProcedure = DirectCast(rightProcedure, MethodInfo).GetGenericMethodDefinition 778Dim getMethod As MethodInfo = propertyBlock.GetGetMethod 789Dim setMethod As MethodInfo = propertyBlock.GetSetMethod
Microsoft\VisualBasic\CompilerServices\Symbols.vb (12)
643If (DirectCast(method, MethodInfo).GetRuntimeBaseDefinition().Attributes And MethodAttributes.NewSlot) = 0 Then 654Return DirectCast(member, MethodInfo).IsStatic 877Dim currentMethod As MethodInfo = DirectCast(members(memberIndex), MethodInfo) 885Dim getMethod As MethodInfo = propertyBlock.GetGetMethod 890Dim setMethod As MethodInfo = propertyBlock.GetSetMethod 1261DirectCast(targetProcedure.AsMethod, MethodInfo).GetGenericMethodDefinition IsNot Nothing, 1374Dim item As MethodInfo = DirectCast(_item, MethodInfo) 1382Dim rawMethod As MethodInfo = Nothing 1383For Each candidate As MethodInfo In declaringType.GetTypeInfo.GetDeclaredMethods(item.Name) 1482_item = DirectCast(_rawItem, MethodInfo).MakeGenericMethod(TypeArguments)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
547If method.MemberType = MemberTypes.Method Then returnType = DirectCast(method, MethodInfo).ReturnType 640Dim accessor As MethodInfo = prop.GetGetMethod
Microsoft\VisualBasic\CompilerServices\Utils.vb (6)
163If TypeOf mi1 Is MethodInfo AndAlso TypeOf mi2 Is MethodInfo Then 164Dim method1 As MethodInfo = DirectCast(mi1, MethodInfo) 165Dim method2 As MethodInfo = DirectCast(mi2, MethodInfo)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (5)
2012Dim Method As MethodInfo = DirectCast(invokeMethod, MethodInfo) 2063Dim ThisMethod As MethodInfo 2108ThisMethod = CType(ThisMember, MethodInfo) 2290Return DirectCast(Member, MethodInfo).IsPublic
Microsoft\VisualBasic\Interaction.vb (1)
139Dim method As MethodInfo = type?.GetMethod(methodName)
Microsoft.VisualStudio.TestPlatform.Common (1)
Utilities\FakesUtilities.cs (1)
182var method = type?.GetMethod(CrossPlatformConfiguratorMethodName, [typeof(IDictionary<string, FrameworkVersion>)]);
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Navigation\PortablePdbReader.cs (3)
21typeof(MethodInfo).GetProperty("MetadataToken")!; 83public DiaNavigationData? GetDiaNavigationData(MethodInfo? methodInfo) 115internal static MethodDebugInformationHandle GetMethodDebugInformationHandle(MethodInfo methodInfo)
Navigation\PortableSymbolReader.cs (1)
112foreach (var methodInfo in methodInfoList)
Mono.Cecil (4)
Mono.Cecil\Import.cs (4)
407 var method_info = method as SR.MethodInfo; 444 var method_info = method as SR.MethodInfo;
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
476[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodInfo))]
netstandard (1)
netstandard.cs (1)
1444[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodInfo))]
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
103MethodInfo projectShouldBuildMethod = typeof(SolutionFile).GetMethod("ProjectShouldBuild", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
PresentationBuildTasks (34)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1830if (desc.MemberInfo is MethodInfo mi) 1886MethodInfo mi = (MethodInfo)memberInfo; 2021MethodInfo methodInvoke = eventHandlerType.GetMethod("Invoke");
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (1)
4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (3)
3199else if (dynamicObject is MethodInfo methodInfo) 3512MethodInfo methodInfo = propertyMember as MethodInfo;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (22)
972MethodInfo mi = ei.GetAddMethod(true); 980MethodInfo mi = pi.GetSetMethod(true); 988MethodInfo mi = pi.GetGetMethod(true); 996MethodInfo mi = pi.GetGetMethod(true); 1043private bool IsAllowedMethod(MethodInfo mi, bool checkProtected) 1159MethodInfo mi = ei.GetAddMethod(true); 1282MethodInfo mi = memberInfo as MethodInfo; 1356if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 2) 1367if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 1) 1374if (tryInternal && memberInfo != null && !IsAllowedMethod(memberInfo as MethodInfo, false)) 1443MethodInfo mi = memberInfo as MethodInfo; 1516if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 2) 1527if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 1) 1534if (tryInternal && memberInfo != null && !IsAllowedMethod(memberInfo as MethodInfo, true)) 2054MethodInfo methodInfo = propertyMember as MethodInfo; 2097MethodInfo methodInfo = propertyMember as MethodInfo; 4070public PropertyAndType (MethodInfo dpSetter, 4086public MethodInfo Setter;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlAttributeProperties.cs (2)
328internal static MethodInfo XmlSpaceSetter 345private static MethodInfo _xmlSpaceSetter = null;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (2)
49MethodInfo methodInfo; 76if ((methodInfo = dpOrPiOrMi as MethodInfo) != null)
PresentationCore (6)
System\Windows\CultureInfoConverter.cs (1)
130MethodInfo method = typeof(CultureInfo).GetMethod(
System\Windows\FontStretchConverter.cs (1)
93MethodInfo mi = typeof(FontStretch).GetMethod("FromOpenTypeStretch", new Type[]{typeof(int)});
System\Windows\FontWeightConverter.cs (1)
93MethodInfo mi = typeof(FontWeight).GetMethod("FromOpenTypeWeight", new Type[]{typeof(int)});
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
1471private static MethodInfo GetEffectiveClientAreaMI;
System\Windows\Markup\XmlLanguageConverter.cs (1)
123MethodInfo method = typeof(XmlLanguage).GetMethod(
System\Windows\Media\ColorConverter.cs (1)
103MethodInfo mi = typeof(Color).GetMethod("FromArgb", new Type[]{typeof(byte), typeof(byte), typeof(byte), typeof(byte)});
PresentationFramework (85)
MS\Internal\AppModel\ReturnEventSaver.cs (1)
70MethodInfo m = returnDelegate.Method;
MS\Internal\Data\DefaultValueConverter.cs (1)
203MethodInfo mi;
MS\Internal\Data\IndexedEnumerable.cs (2)
478MethodInfo mi = srcType.GetMethod("IndexOf", new Type[] { typeof(object) }); 699private MethodInfo _reflectedIndexOf;
MS\Internal\Data\IndexerPropertyInfo.cs (3)
44public override MethodInfo[] GetAccessors(bool nonPublic) 49public override MethodInfo GetGetMethod(bool nonPublic) 59public override MethodInfo GetSetMethod(bool nonPublic)
MS\Internal\Data\PropertyPathWorker.cs (1)
1614MethodInfo setter = null;
MS\Internal\Data\StaticPropertyChangedEventManager.cs (2)
264private static MethodInfo OnStaticPropertyChangedMethodInfo 593private static MethodInfo OnStaticPropertyChangedMethodInfo
MS\Internal\Data\ViewManager.cs (1)
429private MethodInfo _callbackMethod;
MS\Internal\Helper.cs (3)
637Debug.Assert(targetMember is PropertyInfo || targetMember is MethodInfo, 648MethodInfo methodInfo = (MethodInfo)targetMember;
MS\Internal\Interop\InternalDispatchObject.cs (8)
53private Dictionary<int, MethodInfo> _dispId2MethodMap; 59MethodInfo[] methods = typeof(IDispInterface).GetMethods(); 60_dispId2MethodMap = new Dictionary<int, MethodInfo>(methods.Length); 61foreach (MethodInfo method in methods) 84MethodInfo IReflect.GetMethod(string name, BindingFlags bindingAttr) 88MethodInfo IReflect.GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) 92MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) 119MethodInfo method;
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
33var sigMethod = helperType.GetMethod("GetGuidSignature", BindingFlags.Static | BindingFlags.Public);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (4)
378var copyAbi = HelperType.GetMethod("CopyAbi", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); 407var copyManaged = HelperType.GetMethod("CopyManaged", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); 872var fromAbiMethod = HelperType.GetMethod("FromAbi", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); 934var fromAbiMethod = type.GetMethod("FromAbi", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
System\Windows\Markup\Baml2006\WpfKnownMemberInvoker.cs (1)
13private MethodInfo _shouldSerializeMethod = null;
System\Windows\Markup\Baml2006\WpfMemberInvoker.cs (1)
13private MethodInfo _shouldSerializeMethod = null;
System\Windows\Markup\Baml2006\WpfXamlMember.cs (7)
44MethodInfo getter, 45MethodInfo setter, 67MethodInfo setter, 192protected override MethodInfo LookupUnderlyingSetter() 195MethodInfo setter = base.LookupUnderlyingSetter(); 207protected override MethodInfo LookupUnderlyingGetter() 210MethodInfo getter = base.LookupUnderlyingGetter();
System\Windows\Markup\Baml2006\WpfXamlType.cs (2)
101foreach (MethodInfo method in map.TargetMethods) 386return new WpfXamlMember(re, (MethodInfo)memberFromBase.UnderlyingMember, SchemaContext, UseV3Rules);
System\Windows\Markup\BamlRecordReader.cs (6)
3639MethodInfo attachedPropertySetter = null; // postpone allocating a reflection data until necessary 3807Debug.Assert(memberInfo is MethodInfo); 3808MethodInfo methodInfo = (MethodInfo)memberInfo; 5750public MethodInfo AttachedPropertyGetter 5768public MethodInfo AttachedPropertySetter
System\Windows\Markup\BamlRecords.cs (6)
4659MethodInfo methodInfo = AttachedPropertySetter; 4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4832internal MethodInfo AttachedPropertySetter 4846internal MethodInfo AttachedPropertyGetter 4944private MethodInfo _smi = null; 4945private MethodInfo _gmi = null;
System\Windows\Markup\BamlWriter.cs (7)
633MethodInfo mi = GetMi(assemblyName, ownerTypeFullName, propName, out ownerType); 1199private MethodInfo GetMi(Type ownerType, string propName) 1201MethodInfo memberInfo = null; 1207if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 2) 1219if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 1) 1227private MethodInfo GetMi( 1233MethodInfo mi = null;
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
203MethodInfo shouldSerializeMethod; 324private static bool TryGetShouldSerializeMethod(ShouldSerializeKey key, out MethodInfo methodInfo) 335methodInfo = value as MethodInfo; 340private static void CacheShouldSerializeMethod(ShouldSerializeKey key, MethodInfo methodInfo)
System\Windows\Markup\XamlTypeMapper.cs (21)
854MethodInfo attachedPropertyInfo = null; 1103MethodInfo mi = pi.GetSetMethod(true); 1111MethodInfo mi = pi.GetGetMethod(true); 1119MethodInfo mi = pi.GetSetMethod(true); 1132MethodInfo mi = pi.GetGetMethod(true); 1145MethodInfo mi = ei.GetAddMethod(true); 1159MethodInfo mi = ei.GetAddMethod(true); 1282MethodInfo mi = memberInfo as MethodInfo; 1356if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 2) 1367if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 1) 1443MethodInfo mi = memberInfo as MethodInfo; 1516if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 2) 1527if (memberInfo != null && ((MethodInfo)memberInfo).GetParameters().Length != 1) 2054MethodInfo methodInfo = propertyMember as MethodInfo; 2097MethodInfo methodInfo = propertyMember as MethodInfo; 4070public PropertyAndType (MethodInfo dpSetter, 4086public MethodInfo Setter;
System\Windows\Markup\XmlAttributeProperties.cs (2)
328internal static MethodInfo XmlSpaceSetter 345private static MethodInfo _xmlSpaceSetter = null;
System\Windows\PropertyPath.cs (1)
169MethodInfo mi;
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
63MethodInfo createMethod;
Roslyn.Diagnostics.Analyzers (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
109internal static MethodInfo? GetDeclaredMethod( 127public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 163public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
System.ComponentModel.Annotations (5)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (3)
65private MethodInfo? _methodInfo; 142var methodInfo = _methodInfo; 244var methodInfo = ValidatorType.GetMethods(BindingFlags.Public | BindingFlags.Static)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
141var getter = property.GetMethod;
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
278var propertyGetter = property.GetMethod;
System.ComponentModel.Composition (52)
Microsoft\Internal\GenerationServices.cs (3)
17private static readonly MethodInfo s_typeGetTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle")!; 37private static readonly MethodInfo ExceptionGetData = typeof(Exception).GetProperty("Data")!.GetGetMethod()!; 38private static readonly MethodInfo DictionaryAdd = typeof(IDictionary).GetMethod("Add")!;
Microsoft\Internal\ReflectionInvoke.cs (1)
21public static object? SafeInvoke(this MethodInfo method, object? instance, params object?[]? arguments)
Microsoft\Internal\ReflectionServices.cs (5)
38public static bool IsVisible(this MethodInfo method) 129internal static IEnumerable<MethodInfo> GetAllMethods(this Type type) 131IEnumerable<MethodInfo> declaredMethods = type.GetDeclaredMethods(); 145private static IEnumerable<MethodInfo> GetDeclaredMethods(this Type type) 147foreach (MethodInfo method in type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly))
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (2)
135if (((MethodInfo)member).ContainsGenericParameters) 356foreach (MethodInfo member in type.GetMethods(flags))
System\ComponentModel\Composition\AttributedModelServices.cs (1)
82public static string GetTypeIdentity(MethodInfo method)
System\ComponentModel\Composition\ConstraintServices.cs (4)
18private static readonly MethodInfo _metadataContainsKeyMethod = typeof(IDictionary<string, object>).GetMethod("ContainsKey")!; 19private static readonly MethodInfo _metadataItemMethod = typeof(IDictionary<string, object>).GetMethod("get_Item")!; 20private static readonly MethodInfo _metadataEqualsMethod = typeof(object).GetMethod("Equals", new Type[] { typeof(object) })!; 21private static readonly MethodInfo _typeIsInstanceOfTypeMethod = typeof(Type).GetMethod("IsInstanceOfType")!;
System\ComponentModel\Composition\ContractNameServices.cs (3)
44MethodInfo method = type.GetMethod("Invoke")!; 71internal static string GetTypeIdentityFromMethod(MethodInfo method) 76internal static string GetTypeIdentityFromMethod(MethodInfo method, bool formatGenericName)
System\ComponentModel\Composition\ExportServices.cs (5)
19private static readonly MethodInfo _createStronglyTypedLazyOfTM = typeof(ExportServices).GetMethod("CreateStronglyTypedLazyOfTM", BindingFlags.NonPublic | BindingFlags.Static)!; 20private static readonly MethodInfo _createStronglyTypedLazyOfT = typeof(ExportServices).GetMethod("CreateStronglyTypedLazyOfT", BindingFlags.NonPublic | BindingFlags.Static)!; 21private static readonly MethodInfo _createSemiStronglyTypedLazy = typeof(ExportServices).GetMethod("CreateSemiStronglyTypedLazy", BindingFlags.NonPublic | BindingFlags.Static)!; 49MethodInfo genericMethod; 66MethodInfo genericMethod = _createSemiStronglyTypedLazy.MakeGenericMethod(
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
124MethodInfo? method = member as MethodInfo;
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
74private static readonly MethodInfo _mdvDictionaryTryGet = CtorArgumentTypes[0].GetMethod("TryGetValue")!; 75private static readonly MethodInfo ObjectGetType = typeof(object).GetMethod("GetType", Type.EmptyTypes)!;
System\ComponentModel\Composition\Primitives\ExportedDelegate.cs (2)
14private readonly MethodInfo _method = null!; 18public ExportedDelegate(object? instance, MethodInfo method)
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (3)
11private static readonly MethodInfo _createStronglyTypedExportFactoryOfT = typeof(ExportFactoryCreator).GetMethod("CreateStronglyTypedExportFactoryOfT", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)!; 12private static readonly MethodInfo _createStronglyTypedExportFactoryOfTM = typeof(ExportFactoryCreator).GetMethod("CreateStronglyTypedExportFactoryOfTM", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)!; 25MethodInfo genericMethod;
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (1)
181foreach (MethodInfo method in closedGenericPartType.GetAllMethods())
System\ComponentModel\Composition\ReflectionModel\ReflectionExtensions.cs (6)
29return ReflectionExtensions.CreateReflectionProperty((MethodInfo)accessors[0], (MethodInfo)accessors[1]); 40return ((MethodInfo)accessors[0]).ToReflectionMethod(); 88public static ReflectionProperty CreateReflectionProperty(MethodInfo getMethod, MethodInfo setMethod) 105public static ReflectionMethod ToReflectionMethod(this MethodInfo method)
System\ComponentModel\Composition\ReflectionModel\ReflectionMethod.cs (4)
11private readonly MethodInfo _method; 13public ReflectionMethod(MethodInfo method) 20public MethodInfo UnderlyingMethod 55private static ExportedDelegate SafeCreateExportedDelegate(object? instance, MethodInfo method)
System\ComponentModel\Composition\ReflectionModel\ReflectionProperty.cs (8)
19private readonly MethodInfo? _getMethod; 20private readonly MethodInfo? _setMethod; 22public ReflectionProperty(MethodInfo? getMethod, MethodInfo? setMethod) 48public MethodInfo? UnderlyingGetMethod 53public MethodInfo? UnderlyingSetMethod 62MethodInfo method = UnderlyingGetMethod ?? UnderlyingSetMethod!; 86MethodInfo method = UnderlyingGetMethod ?? UnderlyingSetMethod!;
System.ComponentModel.TypeConverter (29)
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (4)
64else if (member is MethodInfo mi) 81MethodInfo? getMethod = pi.GetGetMethod(); 132else if (MemberInfo is MethodInfo) 134return ((MethodInfo)MemberInfo).Invoke(null, translatedArguments);
System\ComponentModel\EnumConverter.cs (1)
154MethodInfo? method = typeof(Enum).GetMethod("ToObject", new Type[] { typeof(Type), underlyingType });
System\ComponentModel\MemberDescriptor.cs (3)
384protected static MethodInfo? FindMethod( 396protected static MethodInfo? FindMethod( 405MethodInfo? result;
System\ComponentModel\ReflectEventDescriptor.cs (3)
66private MethodInfo? _addMethod; // the method to use when adding an event 67private MethodInfo? _removeMethod; // the method to use when removing an event 378private void FillSingleMethodAttribute(MethodInfo realMethodInfo, IList attributes)
System\ComponentModel\ReflectPropertyDescriptor.cs (14)
70private MethodInfo? _getMethod; // the property get method 71private MethodInfo? _setMethod; // the property set method 72private MethodInfo? _shouldSerializeMethod; // the should serialize method 73private MethodInfo? _resetMethod; // the reset property method 121MethodInfo getMethod, 122MethodInfo? setMethod, 144MethodInfo getMethod, 145MethodInfo? setMethod, 324private MethodInfo GetMethodValue 380private MethodInfo? ResetMethodValue 414private MethodInfo? SetMethodValue 472private MethodInfo? ShouldSerializeMethodValue 533MethodInfo? reset = ResetMethodValue; 536MethodInfo? shouldSerialize = ShouldSerializeMethodValue;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (4)
1277MethodInfo? getMethod = providerType.GetMethod("Get" + provideAttr.PropertyName, new Type[] { receiverType }); 1281MethodInfo? setMethod = providerType.GetMethod("Set" + provideAttr.PropertyName, new Type[] { receiverType, getMethod.ReturnType }); 1371MethodInfo? getMethod = propertyInfo.GetGetMethod(nonPublic: false); 1372MethodInfo? setMethod = propertyInfo.GetSetMethod(nonPublic: false);
System.Composition.Convention (13)
System\Composition\Convention\ConventionBuilder.cs (2)
183if (mi != null && (mi is ConstructorInfo || mi is TypeInfo || mi is PropertyInfo || mi is MethodInfo)) 218else if (member is PropertyInfo || member is ConstructorInfo || member is MethodInfo)
System\Composition\Convention\PartConventionBuilder.cs (6)
36private readonly List<Predicate<MethodInfo>> _methodImportsSatisfiedNotifications; 47_methodImportsSatisfiedNotifications = new List<Predicate<MethodInfo>>(); 319public PartConventionBuilder NotifyImportsSatisfied(Predicate<MethodInfo> methodFilter) 613foreach (MethodInfo mi in type.GetRuntimeMethods()) 619MethodInfo underlyingMi = mi.DeclaringType.GetRuntimeMethod(mi.Name, _emptyTypeArray); 624foreach (Predicate<MethodInfo> notification in _methodImportsSatisfiedNotifications)
System\Composition\Convention\PartConventionBuilderOfT.cs (5)
18private readonly MethodInfo _methodInfo; 25public bool VerifyMethodInfo(MethodInfo mi) 30private static MethodInfo SelectMethods(Expression<Action<T>> methodSelector) 37var memberInfo = ((MethodCallExpression)expr).Method as MethodInfo;
System.Composition.Hosting (13)
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (2)
14private static readonly MethodInfo s_getExportFactoryDefinitionsMethod = typeof(ExportFactoryExportDescriptorProvider).GetTypeInfo().GetDeclaredMethod("GetExportFactoryDescriptors"); 21var gld = s_getExportFactoryDefinitionsMethod.MakeGenericMethod(exportKey.ContractType.GenericTypeArguments[0]);
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (2)
15private static readonly MethodInfo s_getLazyDefinitionsMethod = 24var gld = s_getLazyDefinitionsMethod.MakeGenericMethod(ga[0], ga[1]);
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (2)
14private static readonly MethodInfo s_getImportManyDefinitionMethod = typeof(ImportManyExportDescriptorProvider).GetTypeInfo().GetDeclaredMethod("GetImportManyDescriptor"); 34var gimd = s_getImportManyDefinitionMethod.MakeGenericMethod(elementType);
System\Composition\Hosting\Providers\Lazy\LazyExportDescriptorProvider.cs (2)
14private static readonly MethodInfo s_getLazyDefinitionsMethod = typeof(LazyExportDescriptorProvider) 22var gld = s_getLazyDefinitionsMethod.MakeGenericMethod(exportKey.ContractType.GenericTypeArguments[0]);
System\Composition\Hosting\Providers\Lazy\LazyWithMetadataExportDescriptorProvider.cs (2)
15private static readonly MethodInfo s_getLazyDefinitionsMethod = typeof(LazyWithMetadataExportDescriptorProvider).GetTypeInfo().GetDeclaredMethod("GetLazyDefinitions"); 23var gld = s_getLazyDefinitionsMethod.MakeGenericMethod(ga[0], ga[1]);
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (2)
15private static readonly MethodInfo s_getMetadataValueMethod = typeof(MetadataViewProvider).GetTypeInfo().GetDeclaredMethod(nameof(GetMetadataValue)); 59var m = s_getMetadataValueMethod.MakeGenericMethod(prop.PropertyType);
System\Composition\Hosting\Util\MethodInfoExtensions.cs (1)
10public static T CreateStaticDelegate<T>(this MethodInfo methodInfo)
System.Composition.TypedParts (5)
System\Composition\CompositionContextExtensions.cs (1)
75foreach (var ois in importsSatisfiedMethods)
System\Composition\TypedParts\ActivationFeatures\OnImportsSatisfiedFeature.cs (1)
41foreach (var m in importsSatisfiedMethods)
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
20private static readonly MethodInfo s_activatorInvokeMethod = typeof(CompositeActivator).GetTypeInfo().GetDeclaredMethod("Invoke");
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (1)
37private static readonly MethodInfo s_activatorInvoke = typeof(CompositeActivator).GetTypeInfo().GetDeclaredMethod("Invoke");
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (1)
13private static readonly MethodInfo s_activatorInvoke = typeof(CompositeActivator).GetRuntimeMethod("Invoke", new[] { typeof(LifetimeContext), typeof(CompositionOperation) });
System.Configuration.ConfigurationManager (2)
System\Configuration\CallbackValidatorAttribute.cs (1)
25MethodInfo methodInfo = _type.GetMethod(_callbackMethodName, BindingFlags.Public | BindingFlags.Static);
System\Configuration\ClientConfigPaths.cs (1)
320MethodInfo entryPoint = exeAssembly.EntryPoint;
System.Data.Common (4)
System\Data\ColumnTypeConverter.cs (1)
96MethodInfo method = typeof(Type).GetMethod("GetType", new Type[] { typeof(string) })!;
System\Data\SQLTypes\SqlXml.cs (3)
22private static MethodInfo? s_createSqlReaderMethodInfo; 23private MethodInfo? _createSqlReaderMethodInfo; 125private static MethodInfo CreateSqlReaderMethodInfo =>
System.Data.OleDb (1)
ColumnBinding.cs (1)
1043MethodInfo? mi = typeof(Marshal).GetMethod("GetIDispatchForObject", BindingFlags.Public | BindingFlags.Static);
System.Linq.Expressions (477)
System\Dynamic\DynamicObject.cs (7)
515private DynamicMetaObject CallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback) 525private DynamicMetaObject CallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback, Fallback<TBinder>? fallbackInvoke) 555private DynamicMetaObject BuildCallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, DynamicMetaObject fallbackResult, Fallback<TBinder>? fallbackInvoke) 684private DynamicMetaObject CallMethodReturnLast<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Expression value, Fallback<TBinder> fallback) 753private DynamicMetaObject CallMethodNoResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback) 814private bool IsOverridden(MethodInfo method) 818foreach (MethodInfo mi in methods)
System\Dynamic\ExpandoObject.cs (5)
22private static readonly MethodInfo s_expandoTryGetValue = 25private static readonly MethodInfo s_expandoTrySetValue = 28private static readonly MethodInfo s_expandoTryDeleteValue = 31private static readonly MethodInfo s_expandoPromoteClass = 34private static readonly MethodInfo s_expandoCheckVersion =
System\Dynamic\Utils\CachedReflectionInfo.cs (32)
12private static MethodInfo? s_String_Format_String_ObjectArray; 13public static MethodInfo String_Format_String_ObjectArray => 20private static MethodInfo? s_CallSiteOps_SetNotMatched; 21public static MethodInfo CallSiteOps_SetNotMatched => 24private static MethodInfo? s_CallSiteOps_GetMatch; 25public static MethodInfo CallSiteOps_GetMatch => 28private static MethodInfo? s_CallSiteOps_ClearMatch; 29public static MethodInfo CallSiteOps_ClearMatch => 32private static MethodInfo? s_DynamicObject_TryGetMember; 33public static MethodInfo DynamicObject_TryGetMember => 36private static MethodInfo? s_DynamicObject_TrySetMember; 37public static MethodInfo DynamicObject_TrySetMember => 40private static MethodInfo? s_DynamicObject_TryDeleteMember; 41public static MethodInfo DynamicObject_TryDeleteMember => 44private static MethodInfo? s_DynamicObject_TryGetIndex; 45public static MethodInfo DynamicObject_TryGetIndex => 48private static MethodInfo? s_DynamicObject_TrySetIndex; 49public static MethodInfo DynamicObject_TrySetIndex => 52private static MethodInfo? s_DynamicObject_TryDeleteIndex; 53public static MethodInfo DynamicObject_TryDeleteIndex => 56private static MethodInfo? s_DynamicObject_TryConvert; 57public static MethodInfo DynamicObject_TryConvert => 60private static MethodInfo? s_DynamicObject_TryInvoke; 61public static MethodInfo DynamicObject_TryInvoke => 64private static MethodInfo? s_DynamicObject_TryInvokeMember; 65public static MethodInfo DynamicObject_TryInvokeMember => 68private static MethodInfo? s_DynamicObject_TryBinaryOperation; 69public static MethodInfo DynamicObject_TryBinaryOperation => 72private static MethodInfo? s_DynamicObject_TryUnaryOperation; 73public static MethodInfo DynamicObject_TryUnaryOperation => 76private static MethodInfo? s_DynamicObject_TryCreateInstance; 77public static MethodInfo DynamicObject_TryCreateInstance =>
System\Dynamic\Utils\DelegateHelpers.cs (15)
41private static readonly CacheDict<Type, MethodInfo> s_thunks = new CacheDict<Type, MethodInfo>(256); 42private static readonly MethodInfo s_FuncInvoke = typeof(Func<object?[], object?>).GetMethod("Invoke")!; 43private static readonly MethodInfo s_ArrayEmpty = GetEmptyObjectArrayMethod(); 44private static readonly MethodInfo[] s_ActionThunks = GetActionThunks(); 45private static readonly MethodInfo[] s_FuncThunks = GetFuncThunks(); 78private static MethodInfo GetEmptyObjectArrayMethod() => ((Func<object[]>)Array.Empty<object>).GetMethodInfo(); 80private static MethodInfo[] GetActionThunks() 83return new MethodInfo[]{delHelpers.GetMethod("ActionThunk")!, 88private static MethodInfo[] GetFuncThunks() 91return new MethodInfo[]{delHelpers.GetMethod("FuncThunk")!, 99private static MethodInfo? GetCSharpThunk(Type returnType, bool hasReturnValue, ParameterInfo[] parameters) 132MethodInfo uninstantiatedMethod; 174if (!s_thunks.TryGetValue(delegateType, out MethodInfo? thunkMethod)) 176MethodInfo delegateInvokeMethod = delegateType.GetInvokeMethod();
System\Dynamic\Utils\TypeExtensions.cs (4)
19public static MethodInfo? GetAnyStaticMethodValidated( 25MethodInfo? method = type.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly, null, types, null); 38private static bool MatchesArgumentTypes(this MethodInfo? mi, Type[] argTypes) 65public static Type GetReturnType(this MethodBase mi) => mi.IsConstructor ? mi.DeclaringType! : ((MethodInfo)mi).ReturnType;
System\Dynamic\Utils\TypeUtils.cs (13)
687public static MethodInfo? GetUserDefinedCoercionMethod(Type convertFrom, Type convertToType) 693MethodInfo[] eMethods = nnExprType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 695MethodInfo? method = FindConversionOperator(eMethods, convertFrom, convertToType); 701MethodInfo[] cMethods = nnConvType.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 721private static MethodInfo? FindConversionOperator(MethodInfo[] methods, Type? typeFrom, Type? typeTo) 723foreach (MethodInfo mi in methods) 894public static MethodInfo? GetBooleanOperator(Type type, string name) 900MethodInfo? result = type.GetAnyStaticMethodValidated(name, new[] { type }); 967public static MethodInfo GetInvokeMethod(this Type delegateType) 1008public static MethodInfo GetArrayGetMethod(Type arrayType) 1016public static MethodInfo GetArraySetMethod(Type arrayType) 1024public static MethodInfo GetArrayAddressMethod(Type arrayType)
System\Linq\Expressions\BinaryExpression.cs (128)
74public MethodInfo? Method => GetMethod(); 76internal virtual MethodInfo? GetMethod() => null; 292MethodInfo? method = GetMethod(); 313internal static BinaryExpression Create(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo? method, LambdaExpression? conversion) 338MethodInfo? method = GetMethod(); 356MethodInfo? method = GetMethod(); 400MethodInfo? opTrueFalse = TypeUtils.GetBooleanOperator(Method!.DeclaringType!, opName); 535internal OpAssignMethodConversionBinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo method, LambdaExpression conversion) 564private readonly MethodInfo _method; 566internal MethodBinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type, MethodInfo method) 572internal override MethodInfo GetMethod() => _method; 605MethodInfo? method = GetUserDefinedBinaryOperator(binaryType, left.Type, right.Type, name); 631private static BinaryExpression GetMethodBasedBinaryOperator(ExpressionType binaryType, Expression left, Expression right, MethodInfo method, bool liftToNull) 662private static BinaryExpression GetMethodBasedAssignOperator(ExpressionType binaryType, Expression left, Expression right, MethodInfo method, LambdaExpression? conversion, bool liftToNull) 717private static MethodInfo? GetUserDefinedBinaryOperator(ExpressionType binaryType, Type leftType, Type rightType, string name) 724MethodInfo? method = nnLeftType.GetAnyStaticMethodValidated(name, types); 737private static bool IsLiftingConditionalLogicalOperator(Type left, Type right, MethodInfo? method, ExpressionType binaryType) 761private static void ValidateOperator(MethodInfo method) 771private static void ValidateMethodInfo(MethodInfo method, string paramName) 799private static void ValidateUserDefinedConditionalLogicOperator(ExpressionType nodeType, Type left, Type right, MethodInfo method) 832MethodInfo? opTrue = TypeUtils.GetBooleanOperator(declaringType, "op_True"); 833MethodInfo? opFalse = TypeUtils.GetBooleanOperator(declaringType, "op_False"); 843private static void VerifyOpTrueFalse(ExpressionType nodeType, Type left, MethodInfo opTrue, string paramName) 884public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo? method) 900public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo? method, LambdaExpression? conversion) => 964/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 969public static BinaryExpression Equal(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1017/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1021public static BinaryExpression NotEqual(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1109/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1114public static BinaryExpression GreaterThan(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1143/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1148public static BinaryExpression LessThan(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1176/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1181public static BinaryExpression GreaterThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1209/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1214public static BinaryExpression LessThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo? method) 1262/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1266public static BinaryExpression AndAlso(Expression left, Expression right, MethodInfo? method) 1315/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1319public static BinaryExpression OrElse(Expression left, Expression right, MethodInfo? method) 1394MethodInfo method = delegateType.GetInvokeMethod(); 1469/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1473public static BinaryExpression Add(Expression left, Expression right, MethodInfo? method) 1505/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1509public static BinaryExpression AddAssign(Expression left, Expression right, MethodInfo? method) 1519/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1525public static BinaryExpression AddAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 1546private static void ValidateOpAssignConversionLambda(LambdaExpression conversion, Expression left, MethodInfo method, ExpressionType nodeType) 1550MethodInfo mi = delegateType.GetInvokeMethod(); 1588/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1592public static BinaryExpression AddAssignChecked(Expression left, Expression right, MethodInfo? method) 1602/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1608public static BinaryExpression AddAssignChecked(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 1647/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1651public static BinaryExpression AddChecked(Expression left, Expression right, MethodInfo? method) 1683/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1687public static BinaryExpression Subtract(Expression left, Expression right, MethodInfo? method) 1719/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1723public static BinaryExpression SubtractAssign(Expression left, Expression right, MethodInfo? method) 1733/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1739public static BinaryExpression SubtractAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 1777/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1781public static BinaryExpression SubtractAssignChecked(Expression left, Expression right, MethodInfo? method) 1791/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1797public static BinaryExpression SubtractAssignChecked(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 1835/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1839public static BinaryExpression SubtractChecked(Expression left, Expression right, MethodInfo? method) 1871/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1875public static BinaryExpression Divide(Expression left, Expression right, MethodInfo? method) 1907/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1911public static BinaryExpression DivideAssign(Expression left, Expression right, MethodInfo? method) 1921/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1927public static BinaryExpression DivideAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 1965/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 1969public static BinaryExpression Modulo(Expression left, Expression right, MethodInfo? method) 2001/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2005public static BinaryExpression ModuloAssign(Expression left, Expression right, MethodInfo? method) 2015/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2021public static BinaryExpression ModuloAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2059/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2063public static BinaryExpression Multiply(Expression left, Expression right, MethodInfo? method) 2095/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2099public static BinaryExpression MultiplyAssign(Expression left, Expression right, MethodInfo? method) 2109/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2115public static BinaryExpression MultiplyAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2153/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2157public static BinaryExpression MultiplyAssignChecked(Expression left, Expression right, MethodInfo? method) 2167/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2173public static BinaryExpression MultiplyAssignChecked(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2211/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2215public static BinaryExpression MultiplyChecked(Expression left, Expression right, MethodInfo? method) 2263/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2267public static BinaryExpression LeftShift(Expression left, Expression right, MethodInfo? method) 2300/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2304public static BinaryExpression LeftShiftAssign(Expression left, Expression right, MethodInfo? method) 2314/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2320public static BinaryExpression LeftShiftAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2359/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2363public static BinaryExpression RightShift(Expression left, Expression right, MethodInfo? method) 2396/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2400public static BinaryExpression RightShiftAssign(Expression left, Expression right, MethodInfo? method) 2410/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2416public static BinaryExpression RightShiftAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2455/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2459public static BinaryExpression And(Expression left, Expression right, MethodInfo? method) 2491/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2495public static BinaryExpression AndAssign(Expression left, Expression right, MethodInfo? method) 2505/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2511public static BinaryExpression AndAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2549/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2553public static BinaryExpression Or(Expression left, Expression right, MethodInfo? method) 2585/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2589public static BinaryExpression OrAssign(Expression left, Expression right, MethodInfo? method) 2599/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2605public static BinaryExpression OrAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2643/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2647public static BinaryExpression ExclusiveOr(Expression left, Expression right, MethodInfo? method) 2679/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2683public static BinaryExpression ExclusiveOrAssign(Expression left, Expression right, MethodInfo? method) 2693/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2699public static BinaryExpression ExclusiveOrAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion) 2737/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2741public static BinaryExpression Power(Expression left, Expression right, MethodInfo? method) 2795/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2799public static BinaryExpression PowerAssign(Expression left, Expression right, MethodInfo? method) 2809/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="BinaryExpression.Method"/> property equal to.</param> 2815public static BinaryExpression PowerAssign(Expression left, Expression right, MethodInfo? method, LambdaExpression? conversion)
System\Linq\Expressions\Common\CachedReflectionInfo.cs (24)
24public static MethodInfo MethodBase_GetMethodFromHandle_RuntimeMethodHandle => field ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(RuntimeMethodHandle) })!; 25public static MethodInfo MethodBase_GetMethodFromHandle_RuntimeMethodHandle_RuntimeTypeHandle => field ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(RuntimeMethodHandle), typeof(RuntimeTypeHandle) })!; 26public static MethodInfo MethodInfo_CreateDelegate_Type_Object => field ??= typeof(MethodInfo).GetMethod(nameof(MethodInfo.CreateDelegate), new[] { typeof(Type), typeof(object) })!; 27public static MethodInfo String_op_Equality_String_String => field ??= typeof(string).GetMethod("op_Equality", new[] { typeof(string), typeof(string) })!; 28public static MethodInfo String_Equals_String_String => field ??= typeof(string).GetMethod("Equals", new[] { typeof(string), typeof(string) })!; 29public static MethodInfo DictionaryOfStringInt32_Add_String_Int32 => field ??= typeof(Dictionary<string, int>).GetMethod(nameof(Dictionary<string, int>.Add), new[] { typeof(string), typeof(int) })!; 31public static MethodInfo Type_GetTypeFromHandle => field ??= typeof(Type).GetMethod(nameof(Type.GetTypeFromHandle))!; 32public static MethodInfo Object_GetType => field ??= typeof(object).GetMethod(nameof(object.GetType))!; 33public static MethodInfo Decimal_op_Implicit_Byte => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(byte) })!; 34public static MethodInfo Decimal_op_Implicit_SByte => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(sbyte) })!; 35public static MethodInfo Decimal_op_Implicit_Int16 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(short) })!; 36public static MethodInfo Decimal_op_Implicit_UInt16 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(ushort) })!; 37public static MethodInfo Decimal_op_Implicit_Int32 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(int) })!; 38public static MethodInfo Decimal_op_Implicit_UInt32 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(uint) })!; 39public static MethodInfo Decimal_op_Implicit_Int64 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(long) })!; 40public static MethodInfo Decimal_op_Implicit_UInt64 => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(ulong) })!; 41public static MethodInfo Decimal_op_Implicit_Char => field ??= typeof(decimal).GetMethod("op_Implicit", new[] { typeof(char) })!; 42public static MethodInfo Math_Pow_Double_Double => field ??= typeof(Math).GetMethod(nameof(Math.Pow), new[] { typeof(double), typeof(double) })!; 48public static MethodInfo RuntimeOps_CreateRuntimeVariables_ObjectArray_Int64Array => field ??= typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.CreateRuntimeVariables), new[] { typeof(object[]), typeof(long[]) })!; 49public static MethodInfo RuntimeOps_CreateRuntimeVariables => field ??= typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.CreateRuntimeVariables), Type.EmptyTypes)!; 50public static MethodInfo RuntimeOps_MergeRuntimeVariables => field ??= typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.MergeRuntimeVariables))!; 51public static MethodInfo RuntimeOps_Quote => field ??= typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.Quote))!;
System\Linq\Expressions\Compiler\ILGen.cs (12)
15private static readonly MethodInfo s_nullableHasValueGetter = typeof(Nullable<>).GetMethod("get_HasValue", BindingFlags.Instance | BindingFlags.Public)!; 16private static readonly MethodInfo s_nullableValueGetter = typeof(Nullable<>).GetMethod("get_Value", BindingFlags.Instance | BindingFlags.Public)!; 17private static readonly MethodInfo s_nullableGetValueOrDefault = typeof(Nullable<>).GetMethod("GetValueOrDefault", Type.EmptyTypes)!; 21Debug.Assert(methodBase is MethodInfo || methodBase is ConstructorInfo); 30il.Emit(opcode, (MethodInfo)methodBase); 654MethodInfo method = tf switch 883MethodInfo mi = (MethodInfo)nullableType.GetMemberWithSameMetadataDefinitionAs(s_nullableHasValueGetter); 892MethodInfo mi = (MethodInfo)nullableType.GetMemberWithSameMetadataDefinitionAs(s_nullableValueGetter); 901MethodInfo mi = (MethodInfo)nullableType.GetMemberWithSameMetadataDefinitionAs(s_nullableGetValueOrDefault);
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (2)
176MethodInfo mi = TypeUtils.GetArrayAddressMethod(node.Object.Type); 202MethodInfo address = TypeUtils.GetArrayAddressMethod(node.Object!.Type);
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
44private readonly MethodInfo _method;
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (10)
298MethodInfo method = node.Indexer.GetGetMethod(nonPublic: true)!; 326MethodInfo method = node.Indexer.GetSetMethod(nonPublic: true)!; 365private void EmitMethodCall(Expression obj, MethodInfo method, IArgumentProvider methodCallExpr) 370private void EmitMethodCall(Expression? obj, MethodInfo method, IArgumentProvider methodCallExpr, CompilationFlags flags) 392private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type? objectType) 398private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type? objectType, CompilationFlags flags) 439private static bool MethodHasByRefParameter(MethodInfo mi) 451private void EmitCall(Type? objectType, MethodInfo method) 466private static bool UseVirtual(MethodInfo mi) 596MethodInfo invoke = node.DelegateType.GetInvokeMethod();
System\Linq\Expressions\Compiler\LambdaCompiler.Lambda.cs (1)
103_boundConstants.EmitConstant(this, dynamicMethod, typeof(MethodInfo));
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (2)
281MethodInfo? opFalse = TypeUtils.GetBooleanOperator(b.Method!.DeclaringType!, "op_False"); 394MethodInfo? opTrue = TypeUtils.GetBooleanOperator(b.Method!.DeclaringType!, "op_True");
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
670MethodInfo add = DictionaryOfStringInt32_Add_String_Int32;
System\Linq\Expressions\DynamicExpression.cs (7)
870var method = GetValidMethodForDynamic(delegateType); 897var method = GetValidMethodForDynamic(delegateType); 927var method = GetValidMethodForDynamic(delegateType); 960var method = GetValidMethodForDynamic(delegateType); 996var method = GetValidMethodForDynamic(delegateType); 1012private static MethodInfo GetValidMethodForDynamic(Type delegateType) 1014var method = delegateType.GetInvokeMethod();
System\Linq\Expressions\ElementInit.cs (8)
16internal ElementInit(MethodInfo addMethod, ReadOnlyCollection<Expression> arguments) 23/// Gets the <see cref="MethodInfo"/> used to add elements to the object. 25public MethodInfo AddMethod { get; } 75/// <param name="addMethod">The <see cref="MethodInfo"/> for the list's Add method.</param> 78public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) 86/// <param name="addMethod">The <see cref="MethodInfo"/> for the list's Add method.</param> 89public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable<Expression> arguments) 102private static void ValidateElementInitAddMethodInfo(MethodInfo addMethod, string paramName)
System\Linq\Expressions\Expression.cs (2)
31private static readonly CacheDict<Type, MethodInfo> s_lambdaDelegateCache = new CacheDict<Type, MethodInfo>(40);
System\Linq\Expressions\Expression.DebuggerProxy.cs (4)
28public MethodInfo? Method => _node.Method; 324public MethodInfo Method => _node.Method; 427public MethodInfo? Comparison => _node.Comparison; 487public MethodInfo? Method => _node.Method;
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
783MethodInfo toString = node.GetType().GetMethod("ToString", Type.EmptyTypes)!;
System\Linq\Expressions\IndexExpression.cs (5)
298MethodInfo? mi = pi.GetGetMethod(nonPublic: true); 392MethodInfo? getter = indexer.GetGetMethod(nonPublic: true); 404MethodInfo? setter = indexer.GetSetMethod(nonPublic: true); 458private static void ValidateAccessor(Expression? instance, MethodInfo method, ParameterInfo[] indexes, ref ReadOnlyCollection<Expression> arguments, string? paramName) 489private static void ValidateAccessorArgumentTypes(MethodInfo method, ParameterInfo[] indexes, ref ReadOnlyCollection<Expression> arguments, string? paramName)
System\Linq\Expressions\Interpreter\CallInstruction.cs (12)
26private static readonly CacheDict<MethodInfo, CallInstruction> s_cache = new CacheDict<MethodInfo, CallInstruction>(256); 28public static CallInstruction Create(MethodInfo info) 36public static CallInstruction Create(MethodInfo info, ParameterInfo[] parameters) 119private static CallInstruction GetArrayAccessor(MethodInfo info, int argumentCount) 123MethodInfo? alternativeMethod = null; 173private static Type? TryGetParameterOrReturnType(MethodInfo target, ParameterInfo[] pi, int index) 200private static bool IndexIsNotReturnType(int index, MethodInfo target, ParameterInfo[] pi) 210private static CallInstruction SlowCreate(MethodInfo info, ParameterInfo[] pis) 283protected readonly MethodInfo _target; 288internal MethodInfoCallInstruction(MethodInfo target, int argumentCount) 381internal ByRefMethodInfoCallInstruction(MethodInfo target, int argumentCount, ByRefUpdater[] byrefArgs)
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (14)
36private static CallInstruction FastCreate(MethodInfo target, ParameterInfo[] pi) 76private static CallInstruction FastCreate<T0>(MethodInfo target, ParameterInfo[] pi) 120private static CallInstruction FastCreate<T0, T1>(MethodInfo target, ParameterInfo[] pi) 164private static Type GetHelperType(MethodInfo info, Type[] arrTypes) 224public ActionCallInstruction(MethodInfo target) 246public ActionCallInstruction(MethodInfo target) 285public ActionCallInstruction(MethodInfo target) 324public ActionCallInstruction(MethodInfo target) 363public ActionCallInstruction(MethodInfo target) 401public FuncCallInstruction(MethodInfo target) 423public FuncCallInstruction(MethodInfo target) 464public FuncCallInstruction(MethodInfo target) 505public FuncCallInstruction(MethodInfo target) 546public FuncCallInstruction(MethodInfo target)
System\Linq\Expressions\Interpreter\InstructionList.cs (4)
890public void EmitCall(MethodInfo method) 895public void EmitCall(MethodInfo method, ParameterInfo[] parameters) 900public void EmitByRefCall(MethodInfo method, ParameterInfo[] parameters, ByRefUpdater[] byrefArgs) 905public void EmitNullableCall(MethodInfo method, ParameterInfo[] parameters)
System\Linq\Expressions\Interpreter\LightCompiler.cs (10)
666MethodInfo method = pi.GetSetMethod(nonPublic: true)!; 1041MethodInfo method = node.Method; 1359MethodInfo? opTrue = TypeUtils.GetBooleanOperator(expr.Method!.DeclaringType!, andAlso ? "op_False" : "op_True"); 1604MethodInfo? equality = String_op_Equality_String_String; 2158private void CompileMethodCallExpression(Expression @object, MethodInfo method, IArgumentProvider arguments) 2505MethodInfo method = pi.GetGetMethod(nonPublic: true)!; 2689MethodInfo compMethod = LambdaExpression.GetCompileMethod(node.Expression.Type); 2725MethodInfo add = initializer.AddMethod; 3267private readonly MethodInfo _indexer; 3271public IndexMethodByRefUpdater(LocalDefinition? obj, LocalDefinition[] args, MethodInfo indexer, int argumentIndex)
System\Linq\Expressions\Interpreter\LightLambda.cs (1)
358MethodInfo method = delegateType.GetInvokeMethod();
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
151public GetValueOrDefault(MethodInfo mi) 229public static Instruction Create(string method, int argCount, MethodInfo mi)
System\Linq\Expressions\InvocationExpression.cs (8)
424MethodInfo method = GetInvokeMethod(expression); 460MethodInfo method = GetInvokeMethod(expression); 500MethodInfo method = GetInvokeMethod(expression); 545MethodInfo method = GetInvokeMethod(expression); 594MethodInfo method = GetInvokeMethod(expression); 647MethodInfo method = GetInvokeMethod(expression); 734MethodInfo mi = GetInvokeMethod(expression); 743internal static MethodInfo GetInvokeMethod(Expression expression)
System\Linq\Expressions\LambdaExpression.cs (6)
24private static readonly MethodInfo s_expressionCompileMethodInfo = typeof(Expression<>).GetMethod("Compile", Type.EmptyTypes)!; 120internal static MethodInfo GetCompileMethod(Type lambdaExpressionType) 130return (MethodInfo)lambdaExpressionType.GetMemberWithSameMetadataDefinitionAs(s_expressionCompileMethodInfo); 623MethodInfo create; 926CacheDict<Type, MethodInfo> ldc = s_lambdaDelegateCache; 927if (!ldc.TryGetValue(delegateType, out MethodInfo? mi))
System\Linq\Expressions\ListInitExpression.cs (5)
133MethodInfo? addMethod = FindMethod(newExpression.Type, "Add", null, new Expression[] { initializerlist[0] }, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 141/// <param name="addMethod">A <see cref="MethodInfo"/> that represents an instance method named "Add" (case insensitive), that adds an element to a collection.</param> 146public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo? addMethod, params Expression[] initializers) 155/// <param name="addMethod">A <see cref="MethodInfo"/> that represents an instance method named "Add" (case insensitive), that adds an element to a collection.</param> 160public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo? addMethod, IEnumerable<Expression> initializers)
System\Linq\Expressions\MemberAssignment.cs (1)
79public static MemberAssignment Bind(MethodInfo propertyAccessor, Expression expression)
System\Linq\Expressions\MemberExpression.cs (5)
254MethodInfo? mi = property.GetGetMethod(nonPublic: true); 300public static MemberExpression Property(Expression? expression, MethodInfo propertyAccessor) 308private static PropertyInfo GetProperty(MethodInfo mi, string? paramName, int index = -1) 334private static bool CheckMethod(MethodInfo method, MethodInfo propertyMethod)
System\Linq\Expressions\MemberListBinding.cs (4)
93/// <param name="propertyAccessor">A <see cref="MethodInfo"/> that represents a property accessor method.</param> 100public static MemberListBinding ListBind(MethodInfo propertyAccessor, params ElementInit[] initializers) 107/// <param name="propertyAccessor">A <see cref="MethodInfo"/> that represents a property accessor method.</param> 114public static MemberListBinding ListBind(MethodInfo propertyAccessor, IEnumerable<ElementInit> initializers)
System\Linq\Expressions\MemberMemberBinding.cs (2)
101public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, params MemberBinding[] bindings) 117public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, IEnumerable<MemberBinding> bindings)
System\Linq\Expressions\MethodCallExpression.cs (56)
19internal MethodCallExpression(MethodInfo method) 39/// Gets the <see cref="MethodInfo"/> for the method to be called. 41public MethodInfo Method { get; } 156public InstanceMethodCallExpression(MethodInfo method, Expression instance) 171public MethodCallExpressionN(MethodInfo method, IReadOnlyList<Expression> args) 202public InstanceMethodCallExpressionN(MethodInfo method, Expression instance, IReadOnlyList<Expression> args) 231public MethodCallExpression0(MethodInfo method) 264public MethodCallExpression1(MethodInfo method, Expression arg0) 317public MethodCallExpression2(MethodInfo method, Expression arg0, Expression arg1) 382public MethodCallExpression3(MethodInfo method, Expression arg0, Expression arg1, Expression arg2) 453public MethodCallExpression4(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 530public MethodCallExpression5(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) 611public InstanceMethodCallExpression0(MethodInfo method, Expression instance) 644public InstanceMethodCallExpression1(MethodInfo method, Expression instance, Expression arg0) 698public InstanceMethodCallExpression2(MethodInfo method, Expression instance, Expression arg0, Expression arg1) 763public InstanceMethodCallExpression3(MethodInfo method, Expression instance, Expression arg0, Expression arg1, Expression arg2) 837/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 840internal static MethodCallExpression Call(MethodInfo method) 855/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 859public static MethodCallExpression Call(MethodInfo method, Expression arg0) 875/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 880public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1) 898/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 904public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2) 924/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 931public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3) 953/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 962public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) 987/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 990public static MethodCallExpression Call(MethodInfo method, params Expression[]? arguments) 998/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1001public static MethodCallExpression Call(MethodInfo method, IEnumerable<Expression>? arguments) 1010/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1012public static MethodCallExpression Call(Expression? instance, MethodInfo method) 1032/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1035public static MethodCallExpression Call(Expression? instance, MethodInfo method, params Expression[]? arguments) 1044/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1047internal static MethodCallExpression Call(Expression? instance, MethodInfo method, Expression arg0) 1072/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1076public static MethodCallExpression Call(Expression? instance, MethodInfo method, Expression arg0, Expression arg1) 1101/// <param name="method">The <see cref="MethodInfo"/> that represents the target method.</param> 1106public static MethodCallExpression Call(Expression? instance, MethodInfo method, Expression arg0, Expression arg1, Expression arg2) 1129/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="ExpressionType.Call"/>, the <see cref="MethodCallExpression.Object"/> property equal to <paramref name="instance"/>, <see cref="MethodCallExpression.Method"/> set to the <see cref="MethodInfo"/> that represents the specified instance method, and <see cref="MethodCallExpression.Arguments"/> set to the specified arguments.</returns> 1153/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="ExpressionType.Call"/>, the <see cref="MethodCallExpression.Method"/> property set to the <see cref="MethodInfo"/> that represents the specified static (Shared in Visual Basic) method, and the <see cref="MethodCallExpression.Arguments"/> property set to the specified arguments.</returns> 1183/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="MethodCallExpression.Method"/> property equal to.</param> 1189public static MethodCallExpression Call(Expression? instance, MethodInfo method, IEnumerable<Expression>? arguments) 1239private static ParameterInfo[] ValidateMethodAndGetParameters(Expression? instance, MethodInfo method) 1247private static void ValidateStaticOrInstanceMethod(Expression? instance, MethodInfo method) 1261private static void ValidateCallInstanceType(Type instanceType, MethodInfo method) 1297private static MethodInfo? FindMethod( 1305MethodInfo? method = null; 1307foreach (MethodInfo mi in type.GetMethods(flags)) 1311MethodInfo? moo = ApplyTypeArgs(mi, typeArgs); 1373private static MethodInfo? ApplyTypeArgs(MethodInfo m, Type[]? typeArgs) 1437MethodInfo mi = TypeUtils.GetArrayGetMethod(array.Type);
System\Linq\Expressions\NewExpression.cs (1)
333if (member is MethodInfo method)
System\Linq\Expressions\SwitchExpression.cs (6)
18internal SwitchExpression(Type type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, ReadOnlyCollection<SwitchCase> cases) 58public MethodInfo? Comparison { get; } 136public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases) 150public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases) 163public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases) 177public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases)
System\Linq\Expressions\UnaryExpression.cs (40)
18internal UnaryExpression(ExpressionType nodeType, Expression expression, Type type, MethodInfo? method) 47/// <returns>The <see cref="MethodInfo"/> that represents the implementing method.</returns> 48public MethodInfo? Method { get; } 314/// <param name="method">The <see cref="MethodInfo"/> that represents the implementing method.</param> 318public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo? method) => 362MethodInfo? method = nnOperandType.GetAnyStaticMethodValidated(name, types); 380private static UnaryExpression GetMethodBasedUnaryOperator(ExpressionType unaryType, Expression operand, MethodInfo method) 415MethodInfo? method = TypeUtils.GetUserDefinedCoercionMethod(expression.Type, convertToType); 426private static UnaryExpression GetMethodBasedCoercionOperator(ExpressionType unaryType, Expression operand, Type convertToType, MethodInfo method) 466/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 471public static UnaryExpression Negate(Expression expression, MethodInfo? method) 501/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 506public static UnaryExpression UnaryPlus(Expression expression, MethodInfo? method) 533/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 540public static UnaryExpression NegateChecked(Expression expression, MethodInfo? method) 568/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 575public static UnaryExpression Not(Expression expression, MethodInfo? method) 608/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 610public static UnaryExpression IsFalse(Expression expression, MethodInfo? method) 638/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 640public static UnaryExpression IsTrue(Expression expression, MethodInfo? method) 668/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 670public static UnaryExpression OnesComplement(Expression expression, MethodInfo? method) 738/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 745public static UnaryExpression Convert(Expression expression, Type type, MethodInfo? method) 778/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 785public static UnaryExpression ConvertChecked(Expression expression, Type type, MethodInfo? method) 906/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 908public static UnaryExpression Increment(Expression expression, MethodInfo? method) 936/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 938public static UnaryExpression Decrement(Expression expression, MethodInfo? method) 968/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 970public static UnaryExpression PreIncrementAssign(Expression expression, MethodInfo? method) 991/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 993public static UnaryExpression PreDecrementAssign(Expression expression, MethodInfo? method) 1014/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 1016public static UnaryExpression PostIncrementAssign(Expression expression, MethodInfo? method) 1037/// <param name="method">A <see cref="MethodInfo"/> that represents the implementing method.</param> 1039public static UnaryExpression PostDecrementAssign(Expression expression, MethodInfo? method) 1044private static UnaryExpression MakeOpAssignUnary(ExpressionType kind, Expression expression, MethodInfo? method)
System\Runtime\CompilerServices\CallSite.cs (7)
102MethodInfo method = typeof(CallSite<>).MakeGenericType(delegateType).GetMethod(nameof(Create))!; 287MethodInfo invoke = target.GetInvokeMethod(); 304MethodInfo? method = null; 305MethodInfo? noMatchMethod = null; 334private static bool IsSimpleSignature(MethodInfo invoke, out Type[] sig) 360private T CreateCustomUpdateDelegate(MethodInfo invoke) 669private T CreateCustomNoMatchDelegate(MethodInfo invoke)
System\Runtime\CompilerServices\CallSiteBinder.cs (1)
56MethodInfo invoke = target.GetInvokeMethod();
System\Runtime\CompilerServices\CallSiteOpsReflectionCache.cs (8)
15public static readonly MethodInfo CreateMatchmaker = ((Delegate)CallSiteOps.CreateMatchmaker<T>).GetMethodInfo(); 18public static readonly MethodInfo UpdateRules = ((Delegate)CallSiteOps.UpdateRules<T>).GetMethodInfo(); 21public static readonly MethodInfo GetRules = ((Delegate)CallSiteOps.GetRules<T>).GetMethodInfo(); 24public static readonly MethodInfo GetRuleCache = ((Delegate)CallSiteOps.GetRuleCache<T>).GetMethodInfo(); 27public static readonly MethodInfo GetCachedRules = ((Delegate)CallSiteOps.GetCachedRules<T>).GetMethodInfo(); 30public static readonly MethodInfo AddRule = ((Delegate)CallSiteOps.AddRule<T>).GetMethodInfo(); 33public static readonly MethodInfo MoveRule = ((Delegate)CallSiteOps.MoveRule<T>).GetMethodInfo(); 36public static readonly MethodInfo Bind = ((Delegate)CallSiteOps.Bind<T>).GetMethodInfo();
System.Linq.Queryable (17)
System\Linq\EnumerableRewriter.cs (17)
36MethodInfo mInfo = m.Method; 48MethodInfo seqMethod = FindEnumerableMethodForQueryable(mInfo.Name, args, typeArgs); 55MethodInfo method = FindMethod(mInfo.DeclaringType!, mInfo.Name, args, typeArgs); 63private static ReadOnlyCollection<Expression> FixupQuotedArgs(MethodInfo mi, ReadOnlyCollection<Expression> argList) 217private static ILookup<string, MethodInfo>? s_seqMethods; 218private static MethodInfo FindEnumerableMethodForQueryable(string name, ReadOnlyCollection<Expression> args, params Type[]? typeArgs) 222MethodInfo[] matchingMethods = s_seqMethods[name] 236static MethodInfo[] GetEnumerableStaticMethods(Type type) => 239MethodInfo ApplyTypeArgs(MethodInfo methodInfo) => typeArgs == null ? methodInfo : methodInfo.MakeGenericMethod(typeArgs); 245static MethodInfo DisambiguateMatches(MethodInfo[] matchingMethods) 297private static MethodInfo FindMethod(Type type, string name, ReadOnlyCollection<Expression> args, Type[]? typeArgs) 299using (IEnumerator<MethodInfo> en = type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static).Where(m => m.Name == name).GetEnumerator()) 305MethodInfo mi = en.Current; 313private static bool ArgsMatch(MethodInfo m, ReadOnlyCollection<Expression> args, Type[]? typeArgs) 335static ParameterInfo[] GetConstrutedGenericParameters(MethodInfo method, Type[] genericTypes) =>
System.Net.HttpListener (1)
src\runtime\src\libraries\Common\src\System\Net\CookieParser.cs (1)
538MethodInfo? method = typeof(Cookie).GetMethod("InternalSetName", BindingFlags.Instance | BindingFlags.NonPublic);
System.Net.NameResolution (11)
System\Net\DnsSocket.cs (11)
31public MethodInfo ConnectAsyncMethod = null!; 32public MethodInfo SendAsyncMethod = null!; 33public MethodInfo ReceiveAsyncMethod = null!; 34public MethodInfo ConnectMethod = null!; 35public MethodInfo SendMethod = null!; 36public MethodInfo ReceiveMethod = null!; 37public MethodInfo BeginConnectMethod = null!; 38public MethodInfo EndConnectMethod = null!; 39public MethodInfo DisposeMethod = null!; 40public MethodInfo SetSendTimeoutMethod = null!; 41public MethodInfo SetReceiveTimeoutMethod = null!;
System.Private.CoreLib (271)
Internal\Reflection\Augments\ReflectionAugments.cs (7)
201public static MethodInfo GetImplicitlyOverriddenBaseClassMethod(MethodInfo m) 240public static Delegate CreateDelegate(Type type, object firstArgument, MethodInfo method, bool throwOnBindFailure) 246public static Delegate CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure) 258private static Delegate CreateDelegateWorker(Type type, object firstArgument, MethodInfo method, bool throwOnBindFailure, bool allowClosed) 375MethodInfo? methodInfo = type.GetMethod(method, 0, bindingFlags, parameterTypes); 521public static MethodInfo GetDelegateMethod(Delegate del)
Internal\Reflection\Core\Execution\ExecutionEnvironment.cs (5)
32public abstract void GetInterfaceMap(Type instanceType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType, out MethodInfo[] interfaceMethods, out MethodInfo[] targetMethods); 56public abstract void ValidateGenericMethodConstraints(MethodInfo method); 81public abstract MethodInfo GetDelegateMethod(Delegate del); 117protected MethodBaseInvoker GetMethodInvoker(MethodInfo methodInfo)
Internal\Reflection\Extensions\NonPortable\CustomAttributeInheritanceRules.cs (9)
55MethodInfo? methodInfo = element as MethodInfo; 165private sealed class MethodCustomAttributeSearcher : CustomAttributeSearcher<MethodInfo> 167protected sealed override IEnumerable<CustomAttributeData> GetDeclaredCustomAttributes(MethodInfo element) 172public sealed override MethodInfo GetParent(MethodInfo e) 229MethodInfo? method = e.Member as MethodInfo; 232MethodInfo? methodParent = new MethodCustomAttributeSearcher().GetParent(method);
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
338MethodInfo methodInfo = type.GetMethod(methodName, bindingFlags) ??
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
145MethodInfo entry = assembly.EntryPoint ??
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (1)
581if (candidates[i] is not MethodInfo methodInfo)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Delegate.cs (3)
59public static Delegate CreateDelegate(Type type, object? firstArgument, MethodInfo method) => CreateDelegate(type, firstArgument, method, throwOnBindFailure: true)!; 62public static Delegate CreateDelegate(Type type, MethodInfo method) => CreateDelegate(type, method, throwOnBindFailure: true)!; 158public MethodInfo Method => GetMethodImpl();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrame.cs (1)
211if (_method is MethodInfo methodInfo && methodInfo.IsGenericMethod)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (3)
451static MethodInfo[]? GetDeclaredMethods(Type type) => 454MethodInfo[]? methods = GetDeclaredMethods(parentType); 460foreach (MethodInfo candidateMethod in methods)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (4)
3054MethodInfo[] methods = eventSourceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 3138MethodInfo method = methods[i]; 3603Dictionary<int, EventMetadata> eventData, MethodInfo method, EventAttribute eventAttribute, 3697private static int GetHelperCallFirstArg(MethodInfo method)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
43MethodInfo? getterInfo = propertyInfo.GetGetMethod();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
86public virtual MethodInfo? EntryPoint => throw NotImplemented.ByDesign;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (1)
59public override MethodInfo? EntryPoint => null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (5)
40public abstract void Emit(OpCode opcode, MethodInfo meth); 57public abstract void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes); 121MethodInfo mi = consoleType.GetMethod("WriteLine", s_parameterTypes)!; 141MethodInfo mi = typeof(IO.TextWriter).GetMethod("WriteLine", [cls]) ?? 173MethodInfo mi = typeof(IO.TextWriter).GetMethod("WriteLine", [cls]) ??
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (7)
12internal static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst) 23internal readonly MethodInfo _method; 28internal MethodBuilderInstantiation(MethodInfo method, Type[] inst) 64public override MethodInfo GetGenericMethodDefinition() { return _method; } 89public override MethodInfo MakeGenericMethod(params Type[] arguments) 103public override MethodInfo GetBaseDefinition() { throw new NotSupportedException(); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (10)
12internal static MethodInfo GetMethod(MethodInfo method, TypeBuilderInstantiation type) 19internal MethodInfo _method; 24internal MethodOnTypeBuilderInstantiation(MethodInfo method, Type type) 33private static MethodInfo ExtractBaseMethod(MethodInfo info) 47return (MethodInfo)t.Module.ResolveMethod(info.MetadataToken)!; 98public override MethodInfo GetGenericMethodDefinition() { return _method; } 106public override MethodInfo MakeGenericMethod(params Type[] typeArgs) 123public override MethodInfo GetBaseDefinition() { throw new NotSupportedException(); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (3)
158public MethodInfo GetArrayMethod(Type arrayClass, string methodName, CallingConventions callingConvention, 167protected abstract MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, 189public abstract int GetMethodMetadataToken(MethodInfo method);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
386protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 393public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (6)
144public void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration) 152protected abstract void DefineMethodOverrideCore(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration); 334public static MethodInfo GetMethod(Type type, MethodInfo method)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (2)
170protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetMethod))); } 173public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetMethod))); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (14)
18public MethodInfo[] GetOtherMethods() => GetOtherMethods(nonPublic: false); 19public virtual MethodInfo[] GetOtherMethods(bool nonPublic) { throw NotImplemented.ByDesign; } 21public virtual MethodInfo? AddMethod => GetAddMethod(nonPublic: true); 22public virtual MethodInfo? RemoveMethod => GetRemoveMethod(nonPublic: true); 23public virtual MethodInfo? RaiseMethod => GetRaiseMethod(nonPublic: true); 25public MethodInfo? GetAddMethod() => GetAddMethod(nonPublic: false); 26public MethodInfo? GetRemoveMethod() => GetRemoveMethod(nonPublic: false); 27public MethodInfo? GetRaiseMethod() => GetRaiseMethod(nonPublic: false); 29public abstract MethodInfo? GetAddMethod(bool nonPublic); 30public abstract MethodInfo? GetRemoveMethod(bool nonPublic); 31public abstract MethodInfo? GetRaiseMethod(bool nonPublic); 47MethodInfo m = GetAddMethod(true)!; 64MethodInfo addMethod = GetAddMethod(nonPublic: false) ?? throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); 72MethodInfo removeMethod = GetRemoveMethod(nonPublic: false) ?? throw new InvalidOperationException(SR.InvalidOperation_NoPublicRemoveMethod);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\InterfaceMapping.cs (2)
10public MethodInfo[] TargetMethods; // The methods implementing the interface 11public MethodInfo[] InterfaceMethods; // The methods defined on the interface
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\IReflect.cs (3)
15MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers); 21MethodInfo? GetMethod(string name, BindingFlags bindingAttr); 24MethodInfo[] GetMethods(BindingFlags bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInfo.cs (7)
19public virtual MethodInfo GetGenericMethodDefinition() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 23public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 25public abstract MethodInfo GetBaseDefinition(); 42public static bool operator ==(MethodInfo? left, MethodInfo? right) 60public static bool operator !=(MethodInfo? left, MethodInfo? right) => !(left == right);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (2)
109protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 114public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Module.cs (6)
39public MethodInfo? GetMethod(string name) 47public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, DefaultLookup, null, CallingConventions.Any, types, null); 49public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 62protected virtual MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw NotImplemented.ByDesign; } 65public MethodInfo[] GetMethods() => GetMethods(DefaultLookup); 67public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags) { throw NotImplemented.ByDesign; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (8)
100case MethodInfo method: 101MethodInfo metaMethod = GetMethodMetadataDefinition(method); 130private static MethodInfo GetMethodMetadataDefinition(MethodInfo method) 137return (MethodInfo)GetMemberMetadataDefinition(method); 195MethodInfo? getter = propertyInfo.GetGetMethod(true); 196MethodInfo? setter = propertyInfo.GetSetMethod(true); 442if (property.GetGetMethod(true) is MethodInfo method)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (1)
76return ((MethodInfo)MemberImpl).ReturnParameter;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\PropertyInfo.cs (8)
25public MethodInfo[] GetAccessors() => GetAccessors(nonPublic: false); 26public abstract MethodInfo[] GetAccessors(bool nonPublic); 28public virtual MethodInfo? GetMethod => GetGetMethod(nonPublic: true); 29public MethodInfo? GetGetMethod() => GetGetMethod(nonPublic: false); 30public abstract MethodInfo? GetGetMethod(bool nonPublic); 32public virtual MethodInfo? SetMethod => GetSetMethod(nonPublic: true); 33public MethodInfo? GetSetMethod() => GetSetMethod(nonPublic: false); 34public abstract MethodInfo? GetSetMethod(bool nonPublic);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeReflectionExtensions.cs (5)
26public static IEnumerable<MethodInfo> GetRuntimeMethods( 66public static MethodInfo? GetRuntimeMethod( 96public static MethodInfo? GetRuntimeBaseDefinition(this MethodInfo method) 112public static MethodInfo GetMethodInfo(this Delegate del)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (3)
131public sealed override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 146protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 149protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (1)
102internal static Type? TryResolveAgainstGenericMethod(this SignatureType signatureType, MethodInfo genericMethod)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (2)
73protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 85public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => typeImpl.GetMethods(bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (5)
25public virtual MethodInfo? GetDeclaredMethod(string name) => GetMethod(name, DeclaredOnlyLookup); 34public virtual IEnumerable<MethodInfo> GetDeclaredMethods(string name) 36foreach (MethodInfo method in GetDeclaredOnlyMethods(this)) 44static MethodInfo[] GetDeclaredOnlyMethods( 72public virtual IEnumerable<MethodInfo> DeclaredMethods
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
518public static void Prelink(MethodInfo m) 531MethodInfo[] mi = c.GetMethods();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecurityException.cs (1)
87public MethodInfo? Method { get; set; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (2)
188MethodInfo? initializeMethod = type.GetMethod(InitializeMethodName, 202MethodInfo? wrongSigMethod = type.GetMethod(InitializeMethodName,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (16)
295public MethodInfo? GetMethod(string name) => GetMethod(name, DefaultLookup); 298public MethodInfo? GetMethod(string name, BindingFlags bindingAttr) 321public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Type[] types) => GetMethod(name, bindingAttr, binder: null, types, modifiers: null); 324public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, types, null); 327public MethodInfo? GetMethod(string name, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, DefaultLookup, null, types, modifiers); 330public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, bindingAttr, binder, CallingConventions.Any, types, modifiers); 333public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 346protected abstract MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers); 349public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types) => GetMethod(name, genericParameterCount, types, null); 352public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, DefaultLookup, null, types, modifiers); 371public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Type[] types) => GetMethod(name, genericParameterCount, bindingAttr, null, types, null); 374public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, bindingAttr, binder, CallingConventions.Any, types, modifiers); 377public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) 390protected virtual MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 393public MethodInfo[] GetMethods() => GetMethods(DefaultLookup); 396public abstract MethodInfo[] GetMethods(BindingFlags bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
177MethodInfo?[]? m = null; 464attr = ((MethodInfo)m).Attributes;
System\Delegate.cs (4)
242protected virtual MethodInfo GetMethodImpl() 283MethodInfo mi = ReflectionAugments.GetDelegateMethod(this); 347public static Delegate CreateDelegate(Type type, object? firstArgument, MethodInfo method, bool throwOnBindFailure) => ReflectionAugments.CreateDelegate(type, firstArgument, method, throwOnBindFailure); 350public static Delegate CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure) => ReflectionAugments.CreateDelegate(type, method, throwOnBindFailure);
System\Reflection\DynamicInvokeInfo.cs (1)
118if (method is MethodInfo methodInfo)
System\Reflection\Emit\DynamicMethod.cs (1)
162public override MethodInfo GetBaseDefinition()
System\Reflection\Runtime\Assemblies\NativeFormat\NativeFormatRuntimeAssembly.cs (1)
69public sealed override MethodInfo EntryPoint
System\Reflection\Runtime\Assemblies\RuntimeAssemblyInfo.cs (1)
178public abstract override MethodInfo EntryPoint { get; }
System\Reflection\Runtime\BindingFlagSupport\EventPolicies.cs (4)
36MethodInfo? accessorMethod = GetAccessorMethod(member); 72MethodInfo? baseAccessor = GetAccessorMethod(baseMember!); 73MethodInfo? derivedAccessor = GetAccessorMethod(derivedMember!); 82private static MethodInfo? GetAccessorMethod(EventInfo e)
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (2)
86protected static bool AreNamesAndSignaturesEqual(MethodInfo method1, MethodInfo method2)
System\Reflection\Runtime\BindingFlagSupport\MethodPolicies.cs (11)
14internal sealed class MethodPolicies : MemberPolicies<MethodInfo> 22public sealed override IEnumerable<MethodInfo> GetDeclaredMembers(Type type) 27public sealed override IEnumerable<MethodInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? optionalNameFilter, RuntimeTypeInfo reflectedType) 34public sealed override void GetMemberAttributes(MethodInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 43public sealed override bool ImplicitlyOverrides(MethodInfo? baseMember, MethodInfo? derivedMember) 52public sealed override bool IsSuppressedByMoreDerivedMember(MethodInfo member, MethodInfo[] priorMembers, int startIndex, int endIndex) 59MethodInfo prior = priorMembers[i]; 71public sealed override bool OkToIgnoreAmbiguity(MethodInfo m1, MethodInfo m2)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (10)
36MethodInfo? accessorMethod = GetMostAccessibleAccessor(member); 59MethodInfo? baseAccessor = GetAccessorMethod(baseMember!); 60MethodInfo? derivedAccessor = GetAccessorMethod(derivedMember!); 70MethodInfo? baseAccessor = GetAccessorMethod(member); 74MethodInfo? derivedAccessor = GetAccessorMethod(prior); 92private static MethodInfo? GetAccessorMethod(PropertyInfo property) 94MethodInfo? accessor = property.GetMethod; 103private static MethodInfo? GetMostAccessibleAccessor(PropertyInfo property) 105MethodInfo? getter = property.GetMethod; 106MethodInfo? setter = property.SetMethod;
System\Reflection\Runtime\EventInfos\NativeFormat\NativeFormatRuntimeEventInfo.cs (1)
55protected sealed override MethodInfo GetEventMethod(EventMethodSemantics whichMethod)
System\Reflection\Runtime\EventInfos\RuntimeEventInfo.cs (10)
29public sealed override MethodInfo AddMethod 33MethodInfo adder = _lazyAdder; 54public sealed override MethodInfo[] GetOtherMethods(bool nonPublic) 85public sealed override MethodInfo RaiseMethod 93public sealed override MethodInfo RemoveMethod 97MethodInfo remover = _lazyRemover; 112MethodInfo addMethod = this.AddMethod; 151protected abstract MethodInfo GetEventMethod(EventMethodSemantics whichMethod); 168private volatile MethodInfo _lazyAdder; 169private volatile MethodInfo _lazyRemover;
System\Reflection\Runtime\General\Helpers.cs (3)
69public static MethodInfo FilterAccessor(this MethodInfo accessor, bool nonPublic) 122MethodInfo? invokeMethod = delegateType.ToType().GetMethod("Invoke", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
System\Reflection\Runtime\General\ThunkedApis.cs (10)
107public sealed override MethodInfo GetAddMethod(bool nonPublic) => AddMethod.FilterAccessor(nonPublic); 108public sealed override MethodInfo GetRemoveMethod(bool nonPublic) => RemoveMethod.FilterAccessor(nonPublic); 109public sealed override MethodInfo GetRaiseMethod(bool nonPublic) => RaiseMethod?.FilterAccessor(nonPublic); 143public sealed override MethodInfo GetGetMethod(bool nonPublic) => Getter?.FilterAccessor(nonPublic); 144public sealed override MethodInfo GetSetMethod(bool nonPublic) => Setter?.FilterAccessor(nonPublic); 145public sealed override MethodInfo[] GetAccessors(bool nonPublic) 147MethodInfo getter = GetGetMethod(nonPublic); 148MethodInfo setter = GetSetMethod(nonPublic); 154MethodInfo[] accessors = new MethodInfo[count];
System\Reflection\Runtime\MethodInfos\RuntimeConstructedGenericMethodInfo.cs (2)
90public sealed override MethodInfo GetGenericMethodDefinition() 137public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Runtime\MethodInfos\RuntimeDummyMethodInfo.cs (2)
24public sealed override MethodInfo GetGenericMethodDefinition() { throw NotImplemented.ByDesign; } 27public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw NotImplemented.ByDesign; }
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (5)
104public sealed override MethodInfo GetBaseDefinition() 111MethodInfo method = this; 119MethodInfo next = method.GetImplicitlyOverriddenBaseClassMember(MethodPolicies.Instance); 134public abstract override MethodInfo GetGenericMethodDefinition(); 186public abstract override MethodInfo MakeGenericMethod(params Type[] typeArguments);
System\Reflection\Runtime\MethodInfos\RuntimeNamedMethodInfo.cs (2)
89public sealed override MethodInfo GetGenericMethodDefinition() 124public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Runtime\MethodInfos\RuntimeSyntheticMethodInfo.cs (3)
62return other is MethodInfo && other is IRuntimeMemberInfoWithNoMetadataDefinition; 76public sealed override MethodInfo GetGenericMethodDefinition() 114public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Runtime\Modules\NativeFormat\NativeFormatRuntimeModule.cs (2)
72protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) 76public sealed override MethodInfo[] GetMethods(BindingFlags bindingFlags)
System\Reflection\Runtime\PropertyInfos\RuntimePropertyInfo.cs (2)
113public sealed override MethodInfo GetMethod 179public sealed override MethodInfo SetMethod
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs (1)
41internal sealed override IEnumerable<MethodInfo> CoreGetDeclaredMethods(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType, RuntimeTypeInfo contextTypeInfo)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.BindingFlags.cs (9)
53public MethodInfo[] GetMethods(BindingFlags bindingAttr) => Query<MethodInfo>(MethodPolicies.Instance, bindingAttr).ToArray(); 55public MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) 67return Query<MethodInfo>(MethodPolicies.Instance, name, bindingAttr).Disambiguate(); 72QueryResult<MethodInfo> queryResult = Query<MethodInfo>(MethodPolicies.Instance, name, bindingAttr); 73ListBuilder<MethodInfo> candidates = default; 74foreach (MethodInfo candidate in queryResult) 91return binder.SelectMethod(bindingAttr, candidates.ToArray(), types, modifiers) as MethodInfo;
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.CoreGetDeclared.cs (3)
59internal IEnumerable<MethodInfo> CoreGetDeclaredMethods(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType) 73private IEnumerable<MethodInfo> CoreGetDeclaredSyntheticMethods(NameFilter optionalNameFilter) 130internal abstract IEnumerable<MethodInfo> CoreGetDeclaredMethods(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType, RuntimeTypeInfo contextTypeInfo);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (2)
214ReflectionCoreExecution.ExecutionEnvironment.GetInterfaceMap(this.ToType(), interfaceType, out MethodInfo[] interfaceMethods, out MethodInfo[] targetMethods);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.GetMember.cs (1)
43QueryResult<MethodInfo> methods;
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.InvokeMember.cs (10)
261MethodInfo[]? finalists = null; 262MethodInfo? finalist = null; 268MethodInfo[] semiFinalists = (MethodInfo[])GetMember(name, MemberTypes.Method, bindingFlags); 269ArrayBuilder<MethodInfo> results = default; 273MethodInfo semiFinalist = semiFinalists[i]; 309ArrayBuilder<MethodInfo> results = default; 313MethodInfo? semiFinalist; 371finalists ??= new MethodInfo[] { finalist }; 389object? result = ((MethodInfo)invokeMethod).Invoke(target, bindingFlags, binder, providedArgs, culture);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.TypeComponentsCache.cs (1)
88perNameCaches[MemberTypeIndex.Method] = new PerNameQueryCache<MethodInfo>(type, ignoreCase: ignoreCase);
System\Runtime\InteropServices\Marshal.NativeAot.cs (1)
156static partial void PrelinkCore(MethodInfo m);
System\RuntimeType.NativeAot.cs (3)
734protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 738protected override MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 742public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
System.Private.DataContractSerialization (317)
System\Runtime\Serialization\AccessorBuilder.cs (3)
25private static readonly MethodInfo s_createGetterInternal = typeof(FastInvokerBuilder).GetMethod(nameof(CreateGetterInternal), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static)!; 26private static readonly MethodInfo s_createSetterInternal = typeof(FastInvokerBuilder).GetMethod(nameof(CreateSetterInternal), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static)!; 27private static readonly MethodInfo s_make = typeof(FastInvokerBuilder).GetMethod(nameof(Make), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static)!;
System\Runtime\Serialization\ClassDataContract.cs (23)
104internal MethodInfo? OnSerializing => _helper.OnSerializing; 106internal MethodInfo? OnSerialized => _helper.OnSerialized; 108internal MethodInfo? OnDeserializing => _helper.OnDeserializing; 110internal MethodInfo? OnDeserialized => _helper.OnDeserialized; 112internal MethodInfo? ExtensionDataSetMethod => _helper.ExtensionDataSetMethod; 591private MethodInfo? _onSerializing, _onSerialized; 592private MethodInfo? _onDeserializing, _onDeserialized; 593private MethodInfo? _extensionDataSetMethod; 834MethodInfo? getMethod = property.GetMethod; 837MethodInfo? setMethod = property.SetMethod; 898MethodInfo? getMethod = property.GetGetMethod(); 902MethodInfo? setMethod = property.SetMethod; 1060private static bool IsMethodOverriding(MethodInfo method) 1074MethodInfo[] methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 1077MethodInfo method = methods[i]; 1103private bool IsValidExtensionDataSetMethod(MethodInfo method, ParameterInfo[] parameters) 1120private static bool IsValidCallback(MethodInfo method, ParameterInfo[] parameters, Type attributeType, MethodInfo? currentCallback, ref Type? prevAttributeType) 1163internal MethodInfo? OnSerializing 1172internal MethodInfo? OnSerialized 1181internal MethodInfo? OnDeserializing 1190internal MethodInfo? OnDeserialized 1199internal MethodInfo? ExtensionDataSetMethod
System\Runtime\Serialization\CodeGenerator.cs (31)
17private static MethodInfo? s_getTypeFromHandle; 18private static MethodInfo GetTypeFromHandle 31private static MethodInfo? s_objectEquals; 32private static MethodInfo ObjectEquals 45private static MethodInfo? s_arraySetValue; 46private static MethodInfo ArraySetValue 59private static MethodInfo? s_objectToString; 60private static MethodInfo ObjectToString 73private static MethodInfo? s_stringFormat; 74private static MethodInfo StringFormat 89internal static MethodInfo GetInvokeMethod(Type delegateType) 122MethodInfo signature = GetInvokeMethod(delegateType); 166internal MethodInfo CurrentMethod 282LocalBuilder enumerator, MethodInfo getCurrentMethod) 296internal void EndForEach(MethodInfo moveNextMethod) 415internal static void VerifyParameterCount(MethodInfo methodInfo, int expectedCount) 421internal void Call(object? thisObj, MethodInfo methodInfo) 428internal void Call(object? thisObj, MethodInfo methodInfo, object? param1) 436internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2) 445internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3) 455internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4) 466internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4, object? param5) 478internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4, object? param5, object? param6) 491internal void Call(MethodInfo methodInfo) 588MethodInfo? getMethod = property.GetMethod; 593else if (memberInfo is MethodInfo method) 619MethodInfo? setMethod = property.SetMethod; 624else if (memberInfo is MethodInfo method) 1103private void LoadThis(object? thisObj, MethodInfo methodInfo) 1112private void LoadParam(object? arg, int oneBasedArgIndex, MethodInfo methodInfo) 1247private static readonly MethodInfo s_stringLength = typeof(string).GetProperty("Length")!.GetMethod!;
System\Runtime\Serialization\CollectionDataContract.cs (34)
106private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage) 114private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor) 122private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired) 246internal MethodInfo? GetEnumeratorMethod => _helper.GetEnumeratorMethod; 248internal MethodInfo? AddMethod => _helper.AddMethod; 407private readonly MethodInfo? _getEnumeratorMethod; 408private readonly MethodInfo? _addMethod; 544CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage) 567CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor) 580internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired) 686internal MethodInfo? GetEnumeratorMethod => _getEnumeratorMethod; 688internal MethodInfo? AddMethod => _addMethod; 766MethodInfo? buildIncrementCollectionCountDelegate = GetBuildIncrementCollectionCountGenericDelegate(ItemType); 772MethodInfo? buildIncrementCollectionCountDelegate = GetBuildIncrementCollectionCountGenericDelegate(typeof(KeyValuePair<,>).MakeGenericType(ItemType.GetGenericArguments())); 787static MethodInfo GetBuildIncrementCollectionCountGenericDelegate(Type type) => BuildIncrementCollectionCountDelegateMethod.MakeGenericMethod(type); 793private static MethodInfo GetBuildIncrementCollectionCountGenericDelegate(Type type) => BuildIncrementCollectionCountDelegateMethod.MakeGenericMethod(type); 795private static MethodInfo? s_buildIncrementCollectionCountDelegateMethod; 797private static MethodInfo BuildIncrementCollectionCountDelegateMethod => 821MethodInfo buildCreateGenericDictionaryEnumerator = GetBuildCreateGenericDictionaryEnumeratorGenericMethod(keyValueTypes); 836static MethodInfo GetBuildCreateGenericDictionaryEnumeratorGenericMethod(Type[] keyValueTypes) => GetBuildCreateGenericDictionaryEnumeratorMethodInfo.MakeGenericMethod(keyValueTypes[0], keyValueTypes[1]); 861MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 894private static MethodInfo? s_buildCreateGenericDictionaryEnumerator; 896private static MethodInfo GetBuildCreateGenericDictionaryEnumeratorMethodInfo => 987internal static MethodInfo? GetTargetMethodWithName(string name, 1020MethodInfo? addMethod, getEnumeratorMethod; 1290ref MethodInfo? addMethod, ref MethodInfo? getEnumeratorMethod) 1310Type[] addMethodTypeArray, bool addMethodOnInterface, out MethodInfo? getEnumeratorMethod, out MethodInfo? addMethod) 1360private static MethodInfo? GetIEnumerableGetEnumeratorMethod(
System\Runtime\Serialization\DataContract.cs (7)
57internal MethodInfo? ParseMethod => _helper.ParseMethod; 343private MethodInfo? _parseMethod; 1069internal MethodInfo? ParseMethod 1075MethodInfo? method = UnderlyingType.GetMethod(Globals.ParseMethodName, BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string) }); 2009MethodInfo? method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes); 2199internal static bool MethodRequiresMemberAccess(MethodInfo? method) 2235if (member is MethodInfo method)
System\Runtime\Serialization\DataMember.cs (2)
254MethodInfo? getMethod = property.GetMethod; 279MethodInfo? setMethod = property.SetMethod;
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (50)
17private static MethodInfo? s_boxPointer; 21private static MethodInfo? s_getItemContractMethod; 23private static MethodInfo? s_getJsonDataContractMethod; 25private static MethodInfo? s_getJsonMemberIndexMethod; 27private static MethodInfo? s_getRevisedItemContractMethod; 29private static MethodInfo? s_getUninitializedObjectMethod; 31private static MethodInfo? s_ienumeratorGetCurrentMethod; 33private static MethodInfo? s_ienumeratorMoveNextMethod; 35private static MethodInfo? s_isStartElementMethod0; 37private static MethodInfo? s_isStartElementMethod2; 43private static MethodInfo? s_moveToContentMethod; 47private static MethodInfo? s_onDeserializationMethod; 49private static MethodInfo? s_readJsonValueMethod; 53private static MethodInfo? s_throwDuplicateMemberExceptionMethod; 55private static MethodInfo? s_throwMissingRequiredMembersMethod; 59private static MethodInfo? s_unboxPointer; 65private static MethodInfo? s_writeAttributeStringMethod; 67private static MethodInfo? s_writeEndElementMethod; 69private static MethodInfo? s_writeJsonISerializableMethod; 71private static MethodInfo? s_writeJsonNameWithMappingMethod; 73private static MethodInfo? s_writeJsonValueMethod; 75private static MethodInfo? s_writeStartElementMethod; 77private static MethodInfo? s_writeStartElementStringMethod; 79private static MethodInfo? s_parseEnumMethod; 81private static MethodInfo? s_getJsonMemberNameMethod; 83public static MethodInfo BoxPointer 114public static MethodInfo GetCurrentMethod 126public static MethodInfo GetItemContractMethod 139public static MethodInfo GetJsonDataContractMethod 152public static MethodInfo GetJsonMemberIndexMethod 165public static MethodInfo GetRevisedItemContractMethod 178public static MethodInfo GetUninitializedObjectMethod 192public static MethodInfo IsStartElementMethod0 204public static MethodInfo IsStartElementMethod2 240public static MethodInfo MoveNextMethod 252public static MethodInfo MoveToContentMethod 276public static MethodInfo OnDeserializationMethod 289public static MethodInfo ReadJsonValueMethod 315public static MethodInfo ThrowDuplicateMemberExceptionMethod 327public static MethodInfo ThrowMissingRequiredMembersMethod 351public static MethodInfo UnboxPointer 387public static MethodInfo WriteAttributeStringMethod 399public static MethodInfo WriteEndElementMethod 411public static MethodInfo WriteJsonISerializableMethod 424public static MethodInfo WriteJsonNameWithMappingMethod 436public static MethodInfo WriteJsonValueMethod 449public static MethodInfo WriteStartElementMethod 462public static MethodInfo WriteStartElementStringMethod 475public static MethodInfo ParseEnumMethod 488public static MethodInfo GetJsonMemberNameMethod
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (4)
180MethodInfo signature = CodeGenerator.GetInvokeMethod(delegateType); 295MethodInfo? extensionDataSetMethod = currentContract.ExtensionDataSetMethod; 686MethodInfo ensureArraySizeMethod = XmlFormatGeneratorStatics.EnsureArraySizeMethod.MakeGenericMethod(itemType); 705MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (6)
115MethodInfo signature = CodeGenerator.GetInvokeMethod(delegateType); 341MethodInfo? incrementCollectionCountMethod = null; 381MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 382MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 593MethodInfo writeArrayMethodInfo = typeof(JsonWriterDelegator).GetMethod( 698private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType)
System\Runtime\Serialization\PrimitiveDataContract.cs (9)
62internal MethodInfo XmlFormatWriterMethod 78internal MethodInfo XmlFormatContentWriterMethod 94internal MethodInfo XmlFormatReaderMethod => 137private MethodInfo? _xmlFormatWriterMethod; 138private MethodInfo? _xmlFormatContentWriterMethod; 139private MethodInfo? _xmlFormatReaderMethod; 149internal MethodInfo? XmlFormatWriterMethod 155internal MethodInfo? XmlFormatContentWriterMethod 161internal MethodInfo? XmlFormatReaderMethod
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
75MethodInfo getValue = memberType.GetMethod("get_Value", Type.EmptyTypes)!;
System\Runtime\Serialization\ReflectionReader.cs (9)
23private static MethodInfo? s_getCollectionSetItemDelegateMethod; 24private static readonly MethodInfo s_objectToKeyValuePairGetKey = typeof(ReflectionReader).GetMethod(nameof(ObjectToKeyValuePairGetKey), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static)!; 25private static readonly MethodInfo s_objectToKeyValuePairGetValue = typeof(ReflectionReader).GetMethod(nameof(ObjectToKeyValuePairGetValue), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static)!; 30private static MethodInfo CollectionSetItemDelegateMethod => 154MethodInfo getCollectionSetItemDelegateMethod = CollectionSetItemDelegateMethod.MakeGenericMethod(itemType); 186MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType); 605MethodInfo? addMethod = collectionContract.AddMethod; 621static MethodInfo MakeGenericMethod(MethodInfo method, Type keyType, Type valueType) => method.MakeGenericMethod(keyType, valueType);
System\Runtime\Serialization\SchemaExporter.cs (1)
629MethodInfo? getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) });
System\Runtime\Serialization\XmlDataContract.cs (1)
308MethodInfo? XName_op_Implicit = xName.GetMethod(
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (129)
15private static MethodInfo? s_writeStartElementMethod2; 16internal static MethodInfo WriteStartElementMethod2 29private static MethodInfo? s_writeStartElementMethod3; 30internal static MethodInfo WriteStartElementMethod3 43private static MethodInfo? s_writeEndElementMethod; 44internal static MethodInfo WriteEndElementMethod 57private static MethodInfo? s_writeNamespaceDeclMethod; 58internal static MethodInfo WriteNamespaceDeclMethod 73internal static MethodInfo BoxPointer => field ??= typeof(Pointer).GetMethod("Box")!; 89private static MethodInfo? s_ienumeratorMoveNextMethod; 90internal static MethodInfo MoveNextMethod 103private static MethodInfo? s_ienumeratorGetCurrentMethod; 104internal static MethodInfo GetCurrentMethod 117private static MethodInfo? s_getItemContractMethod; 118internal static MethodInfo GetItemContractMethod 132private static MethodInfo? s_isStartElementMethod2; 133internal static MethodInfo IsStartElementMethod2 146private static MethodInfo? s_isStartElementMethod0; 147internal static MethodInfo IsStartElementMethod0 160private static MethodInfo? s_getUninitializedObjectMethod; 161internal static MethodInfo GetUninitializedObjectMethod 175private static MethodInfo? s_onDeserializationMethod; 176internal static MethodInfo OnDeserializationMethod 189internal static MethodInfo UnboxPointer => field ??= typeof(Pointer).GetMethod("Unbox")!; 225private static MethodInfo? s_getStreamingContextMethod; 226internal static MethodInfo GetStreamingContextMethod 239private static MethodInfo? s_getCollectionMemberMethod; 240internal static MethodInfo GetCollectionMemberMethod 253private static MethodInfo? s_storeCollectionMemberInfoMethod; 254internal static MethodInfo StoreCollectionMemberInfoMethod 267private static MethodInfo? s_resetCollectionMemberInfoMethod; 268internal static MethodInfo ResetCollectionMemberInfoMethod 281private static MethodInfo? s_storeIsGetOnlyCollectionMethod; 282internal static MethodInfo StoreIsGetOnlyCollectionMethod 295private static MethodInfo? s_resetIsGetOnlyCollection; 296internal static MethodInfo ResetIsGetOnlyCollectionMethod 309private static MethodInfo? s_throwNullValueReturnedForGetOnlyCollectionExceptionMethod; 310internal static MethodInfo ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod 323private static MethodInfo? s_throwArrayExceededSizeExceptionMethod; 324internal static MethodInfo ThrowArrayExceededSizeExceptionMethod 337private static MethodInfo? s_incrementItemCountMethod; 338internal static MethodInfo IncrementItemCountMethod 351private static MethodInfo? s_internalDeserializeMethod; 352internal static MethodInfo InternalDeserializeMethod 366private static MethodInfo? s_moveToNextElementMethod; 367internal static MethodInfo MoveToNextElementMethod 380private static MethodInfo? s_getMemberIndexMethod; 381internal static MethodInfo GetMemberIndexMethod 395private static MethodInfo? s_getMemberIndexWithRequiredMembersMethod; 396internal static MethodInfo GetMemberIndexWithRequiredMembersMethod 410private static MethodInfo? s_throwRequiredMemberMissingExceptionMethod; 411internal static MethodInfo ThrowRequiredMemberMissingExceptionMethod 424private static MethodInfo? s_skipUnknownElementMethod; 425internal static MethodInfo SkipUnknownElementMethod 438private static MethodInfo? s_readIfNullOrRefMethod; 439internal static MethodInfo ReadIfNullOrRefMethod 453private static MethodInfo? s_readAttributesMethod; 454internal static MethodInfo ReadAttributesMethod 467private static MethodInfo? s_resetAttributesMethod; 468internal static MethodInfo ResetAttributesMethod 481private static MethodInfo? s_getObjectIdMethod; 482internal static MethodInfo GetObjectIdMethod 495private static MethodInfo? s_getArraySizeMethod; 496internal static MethodInfo GetArraySizeMethod 509private static MethodInfo? s_addNewObjectMethod; 510internal static MethodInfo AddNewObjectMethod 523private static MethodInfo? s_addNewObjectWithIdMethod; 524internal static MethodInfo AddNewObjectWithIdMethod 537private static MethodInfo? s_replaceDeserializedObjectMethod; 538internal static MethodInfo ReplaceDeserializedObjectMethod 551private static MethodInfo? s_getExistingObjectMethod; 552internal static MethodInfo GetExistingObjectMethod 566private static MethodInfo? s_getRealObjectMethod; 567internal static MethodInfo GetRealObjectMethod 580private static MethodInfo? s_ensureArraySizeMethod; 581internal static MethodInfo EnsureArraySizeMethod 594private static MethodInfo? s_trimArraySizeMethod; 595internal static MethodInfo TrimArraySizeMethod 608private static MethodInfo? s_checkEndOfArrayMethod; 609internal static MethodInfo CheckEndOfArrayMethod 622private static MethodInfo? s_getArrayLengthMethod; 623internal static MethodInfo GetArrayLengthMethod 636private static MethodInfo? s_readSerializationInfoMethod; 637internal static MethodInfo ReadSerializationInfoMethod 651private static MethodInfo? s_createUnexpectedStateExceptionMethod; 652internal static MethodInfo CreateUnexpectedStateExceptionMethod 665private static MethodInfo? s_internalSerializeReferenceMethod; 666internal static MethodInfo InternalSerializeReferenceMethod 680private static MethodInfo? s_internalSerializeMethod; 681internal static MethodInfo InternalSerializeMethod 695private static MethodInfo? s_writeNullMethod; 696internal static MethodInfo WriteNullMethod 710private static MethodInfo? s_incrementArrayCountMethod; 711internal static MethodInfo IncrementArrayCountMethod 724private static MethodInfo? s_incrementCollectionCountMethod; 725internal static MethodInfo IncrementCollectionCountMethod 738private static MethodInfo? s_incrementCollectionCountGenericMethod; 739internal static MethodInfo IncrementCollectionCountGenericMethod 752private static MethodInfo? s_getDefaultValueMethod; 753internal static MethodInfo GetDefaultValueMethod 774private static MethodInfo? s_getNullableValueMethod; 775internal static MethodInfo GetNullableValueMethod 788private static MethodInfo? s_throwRequiredMemberMustBeEmittedMethod; 789internal static MethodInfo ThrowRequiredMemberMustBeEmittedMethod 802private static MethodInfo? s_getHasValueMethod; 803internal static MethodInfo GetHasValueMethod 816private static MethodInfo? s_writeISerializableMethod; 817internal static MethodInfo WriteISerializableMethod 831private static MethodInfo? s_writeExtensionDataMethod; 832internal static MethodInfo WriteExtensionDataMethod 838private static MethodInfo? s_writeXmlValueMethod; 839internal static MethodInfo WriteXmlValueMethod 853private static MethodInfo? s_readXmlValueMethod; 854internal static MethodInfo ReadXmlValueMethod 910internal static MethodInfo ExtensionDataSetExplicitMethodInfo => field ??= typeof(IExtensibleDataObject).GetMethod(Globals.ExtensionDataSetMethod)!; 956private static MethodInfo? s_getDateTimeOffsetMethod; 957internal static MethodInfo GetDateTimeOffsetMethod 970private static MethodInfo? s_getDateTimeOffsetAdapterMethod; 971internal static MethodInfo GetDateTimeOffsetAdapterMethod 984private static MethodInfo? s_getMemoryStreamMethod; 985internal static MethodInfo GetMemoryStreamMethod 998private static MethodInfo? s_getMemoryStreamAdapterMethod; 999internal static MethodInfo GetMemoryStreamAdapterMethod 1012private static MethodInfo? s_getTypeHandleMethod; 1013internal static MethodInfo GetTypeHandleMethod 1026private static MethodInfo? s_getTypeMethod; 1027internal static MethodInfo GetTypeMethod 1040private static MethodInfo? s_throwInvalidDataContractExceptionMethod; 1041internal static MethodInfo ThrowInvalidDataContractExceptionMethod
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (3)
361MethodInfo? extensionDataSetMethod = currentContract.ExtensionDataSetMethod; 716MethodInfo ensureArraySizeMethod = XmlFormatGeneratorStatics.EnsureArraySizeMethod.MakeGenericMethod(itemType); 735MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType);
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
420MethodInfo? incrementCollectionCountMethod = null; 460MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 461MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes); 711private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue, Type memberType, bool writeXsiType)
System.Private.Reflection.Execution (15)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (1)
221public sealed override void ValidateGenericMethodConstraints(MethodInfo method)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.Runtime.cs (6)
26public sealed override void GetInterfaceMap(Type instanceType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType, out MethodInfo[] interfaceMethods, out MethodInfo[] targetMethods) 28MethodInfo[] ifaceMethods = interfaceType.GetMethods(); 29var tMethods = new MethodInfo[ifaceMethods.Length]; 46tMethods[i] = (MethodInfo)methodBase; 75public override MethodInfo GetDelegateMethod(Delegate del)
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (2)
125MethodInfo methodInfo = (MethodInfo)MethodInvokeInfo.Method;
Internal\Reflection\Execution\TypeLoader\ConstraintValidator.cs (2)
103public static void EnsureSatisfiesClassConstraints(MethodInfo reflectionMethodInfo) 105MethodInfo genericMethodDefinition = reflectionMethodInfo.GetGenericMethodDefinition();
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (2)
164public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; } 186protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { Debug.Assert(false); throw NotImplemented.ByDesign; }
Internal\Reflection\Extensions\NonPortable\DelegateMethodInfoRetriever.cs (2)
18public static MethodInfo GetDelegateMethodInfo(Delegate del) 65return (MethodInfo)ExecutionDomain.GetMethod(typeOfFirstParameterIfInstanceDelegate, methodHandle, genericMethodTypeArgumentHandles);
System.Private.Windows.Core.TestUtilities (6)
TestAccessor.cs (3)
66MethodInfo? invokeMethodInfo = type.GetMethod("Invoke"); 73MethodInfo? methodInfo = s_type.GetMethod( 99MethodInfo? methodInfo = null;
XUnit\ForceGCAttribute.cs (1)
17public override void After(MethodInfo methodUnderTest, IXunitTest test)
XUnit\UseCultureAttribute.cs (2)
72public override unsafe void Before(MethodInfo methodUnderTest, IXunitTest test) 96public override void After(MethodInfo methodUnderTest, IXunitTest test)
System.Private.Xml (635)
System\Xml\Serialization\CodeGenerator.cs (7)
301MethodInfo ICollection_get_Count = typeof(ICollection).GetMethod( 400internal void Call(MethodInfo methodInfo) 496private static MethodInfo? GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 503MethodInfo? result = null; 557MethodInfo? getMethod = property.GetMethod ?? GetPropertyMethodFromBaseType(property, true); 590MethodInfo? getMethod = property.GetMethod ?? GetPropertyMethodFromBaseType(property, true); 624MethodInfo? setMethod = property.SetMethod ?? GetPropertyMethodFromBaseType(property, false);
System\Xml\Serialization\Compilation.cs (4)
31internal MethodInfo? writeMethod; 32internal MethodInfo? readMethod; 574private static MethodInfo GetMethodFromType( 577MethodInfo? method = type.GetMethod(methodName);
System\Xml\Serialization\Mappings.cs (4)
917private MethodInfo? _checkShouldPersistMethodInfo; 965internal MethodInfo? CheckShouldPersistMethodInfo 1083private readonly MethodInfo? _getSchemaMethod; 1096internal SerializableMapping(MethodInfo getSchemaMethod, bool any, string? ns)
System\Xml\Serialization\Models.cs (3)
251MethodInfo getMethod = propertyInfo.GetMethod!; 271private readonly MethodInfo? _checkShouldPersistMethodInfo; 373internal MethodInfo? CheckShouldPersistMethodInfo
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
591MethodInfo? addMethod = targetCollectionType.GetMethod("Add"); 655MethodInfo getSetMemberValueDelegateWithTypeGenericMi = typeof(ReflectionXmlSerializationReaderHelper).GetMethod("GetSetMemberValueDelegateWithType", BindingFlags.Static | BindingFlags.Public)!; 656MethodInfo getSetMemberValueDelegateWithTypeMi = getSetMemberValueDelegateWithTypeGenericMi.MakeGenericMethod(o.GetType(), memberType); 1324MethodInfo? method = typeof(XmlSerializationReader).GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(string) }); 1778var addMethod = mapping.TypeDesc.Type!.GetMethod("Add"); 2264var setMethod = propInfo.GetSetMethod(true);
System\Xml\Serialization\SourceInfo.cs (4)
25private static readonly Lazy<MethodInfo> s_iListGetItemMethod = new Lazy<MethodInfo>( 106MethodInfo get_Item = varType.GetMethod( 225MethodInfo Nullable_get_Value = nullableType.GetMethod(
System\Xml\Serialization\TypeExtensions.cs (2)
37MethodInfo[] methods = targetType.GetMethods(BindingFlags.Static | BindingFlags.Public); 39foreach (MethodInfo method in methods)
System\Xml\Serialization\Types.cs (5)
1337MethodInfo? enumerator = type.GetMethod("GetEnumerator", Type.EmptyTypes); 1345enumerator = member as MethodInfo; 1374MethodInfo? addMethod = type.GetMethod("Add", new Type[] { currentType }); 1420MethodInfo getMethod = defaultProp.GetMethod!; 1436MethodInfo? addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType });
System\Xml\Serialization\XmlReflectionImporter.cs (3)
486internal static MethodInfo? GetMethodFromSchemaProvider(XmlSchemaProviderAttribute provider, 498MethodInfo? getMethod = getMethod = type.GetMethod(provider.MethodName, /* BindingFlags.DeclaredOnly | */ BindingFlags.Static | BindingFlags.Public, new Type[] { typeof(XmlSchemaSet) }); 530MethodInfo method = GetMethodFromSchemaProvider(provider, type)!;
System\Xml\Serialization\XmlSchemaExporter.cs (1)
920System.Reflection.MethodInfo? format = formatter.GetMethod("ToString", new Type[] { pm.TypeDesc.Type! });
System\Xml\Serialization\XmlSerializationILGen.cs (5)
212MethodInfo Hashtable_set_Item = typeof(Hashtable).GetMethod( 342MethodInfo XmlReader_IsStartElement = typeof(XmlReader).GetMethod( 367MethodInfo writerType_writeMethod = CreatedTypes[writerClass].GetMethod( 391MethodInfo readerType_readMethod = CreatedTypes[readerClass].GetMethod( 412MethodInfo Hashtable_Add = typeof(Hashtable).GetMethod(
System\Xml\Serialization\XmlSerializationReaderILGen.cs (141)
239MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 244MethodInfo XmlReader_get_NameTable = typeof(XmlReader).GetMethod( 249MethodInfo XmlNameTable_Add = typeof(XmlNameTable).GetMethod( 296MethodInfo AppContext_TryGetSwitch = typeof(AppContext).GetMethod( 359MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 364MethodInfo XmlReader_IsStartElement = typeof(XmlReader).GetMethod( 405MethodInfo method = typeof(XmlSerializationReader).GetMethod( 475MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 480MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 577MethodInfo XmlSerializationReader_set_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 595MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod( 610MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 620MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 635MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 664MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 724MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 729MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 773MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 778MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 789MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 794MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 823MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 828MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 839MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 844MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 876MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 888MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 893MethodInfo XmlReader_method = typeof(XmlReader).GetMethod( 905MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 917MethodInfo ToXXX; 946MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 951MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 962MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 967MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 1059MethodInfo Hashtable_Add = typeof(Hashtable).GetMethod( 1121MethodInfo XmlSerializationReader_ToEnum = typeof(XmlSerializationReader).GetMethod( 1164MethodInfo String_op_Equality = typeof(string).GetMethod( 1185MethodInfo XmlSerializationReader_CreateUnknownConstantException = typeof(XmlSerializationReader).GetMethod( 1257MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1262MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 1282MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 1287MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 1301MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 1366MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 1424MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod( 1429MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 1468MethodInfo XmlSerializationReader_ReadTypedNull = typeof(XmlSerializationReader).GetMethod( 1516MethodInfo XmlSerializationReader_ReadTypedPrimitive = typeof(XmlSerializationReader).GetMethod( 1534MethodInfo XmlSerializationReader_ReadTypedPrimitive = typeof(XmlSerializationReader).GetMethod( 1547MethodInfo XmlSerializationReader_CreateUnknownTypeException = typeof(XmlSerializationReader).GetMethod( 1574MethodInfo XmlSerializationReader_CreateAbstractTypeException = typeof(XmlSerializationReader).GetMethod( 1589MethodInfo XmlSerializationReader_set_DecodeName = typeof(XmlSerializationReader).GetMethod( 1688MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1693MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod( 1703MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 1712MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 1726MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 1742MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 1755MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 1776MethodInfo XmlQualifiedName_get_Name = typeof(XmlQualifiedName).GetMethod( 1781MethodInfo XmlQualifiedName_get_Namespace = typeof(XmlQualifiedName).GetMethod( 1819MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1824MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod( 1829MethodInfo XmlReader_get_NamespaceURI = typeof(XmlReader).GetMethod( 1884MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1889MethodInfo XmlReader_MoveToNextAttribute = typeof(XmlReader).GetMethod( 1943MethodInfo XmlSerializationReader_IsXmlnsAttribute = typeof(XmlSerializationReader).GetMethod( 1948MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod( 1953MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod( 1958MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 1985MethodInfo Add = xmlnsMember.Mapping.TypeDesc.Type!.GetMethod( 1990MethodInfo String_get_Length = typeof(string).GetMethod( 2018MethodInfo XmlSerializationReader_IsXmlnsAttribute = typeof(XmlSerializationReader).GetMethod( 2023MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod( 2039MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod( 2044MethodInfo XmlDocument_ReadNode = typeof(XmlDocument).GetMethod( 2056MethodInfo XmlSerializationReader_ParseWsdlArrayType = typeof(XmlSerializationReader).GetMethod( 2088MethodInfo elseCallMethod = typeof(XmlSerializationReader).GetMethod( 2150MethodInfo String_Split = typeof(string).GetMethod( 2155MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2160MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 2246MethodInfo XmlSerializationReader_CreateReadOnlyCollectionException = typeof(XmlSerializationReader).GetMethod( 2312MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 2317MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2344MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2349MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 2400MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2405MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 2410MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod( 2415MethodInfo XmlDocument_CreateTextNode = typeof(XmlDocument).GetMethod( 2442MethodInfo String_Split = typeof(string).GetMethod( 2447MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2452MethodInfo XmlReader_ReadContentAsString = typeof(XmlReader).GetMethod( 2483MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2488MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 2498MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 2511MethodInfo XmlSerializationReader_ReadString = typeof(XmlSerializationReader).GetMethod( 2623MethodInfo XmlSerializationReader_get_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 2652MethodInfo XmlSerializationReader_set_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 2752MethodInfo XmlSerializationReader_ShrinkArray = typeof(XmlSerializationReader).GetMethod( 2834MethodInfo XmlSerializationReader_EnsureArrayIndex = typeof(XmlSerializationReader).GetMethod( 2936MethodInfo Add = localA.LocalType.GetMethod( 2970MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2975MethodInfo XmlReader_get_HasAttributes = typeof(XmlReader).GetMethod( 2980MethodInfo XmlReader_MoveToNextAttribute = typeof(XmlReader).GetMethod( 2985MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod( 2990MethodInfo XmlSerializationReader_IsXmlnsAttribute = typeof(XmlSerializationReader).GetMethod( 2995MethodInfo XmlSerializationReader_UnknownNode = typeof(XmlSerializationReader).GetMethod( 3000MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod( 3050MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 3091MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3096MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 3112MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3122MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 3134MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 3145MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 3205MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 3232MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3237MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 3246MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3264MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3269MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 3279MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3303MethodInfo XmlSerializationReader_ReadElementQualifiedName = typeof(XmlSerializationReader).GetMethod( 3344MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3349MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3391MethodInfo XmlSerializationReader_ReadXmlXXX = typeof(XmlSerializationReader).GetMethod( 3409MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod( 3434MethodInfo XmlSerializationReader_ReadSerializable = typeof(XmlSerializationReader).GetMethod( 3507MethodInfo XmlSerializationReader_ReadSerializable = typeof(XmlSerializationReader).GetMethod( 3526MethodInfo XmlSerializationReader_CreateBadDerivationException = typeof(XmlSerializationReader).GetMethod( 3544MethodInfo XmlSerializationReader_CreateMissingIXmlSerializableType = typeof(XmlSerializationReader).GetMethod( 3564MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3569MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 3589MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3594MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 3660MethodInfo XmlSerializationReader_CreateInaccessibleConstructorException = typeof(XmlSerializationReader).GetMethod( 3671MethodInfo XmlSerializationReader_CreateCtorHasSecurityException = typeof(XmlSerializationReader).GetMethod( 3723MethodInfo XmlSerializationReader_UnknownNode1 = typeof(XmlSerializationReader).GetMethod( 3728MethodInfo XmlSerializationReader_UnknownNode2 = typeof(XmlSerializationReader).GetMethod( 3811MethodInfo XmlSerializationReader_CreateUnknownNodeException = typeof(XmlSerializationReader).GetMethod(
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1850_writer.Write($"static {typeof(MethodInfo).FullName} {methodVariable} = {typeVariable}.GetMethod(");
System\Xml\Serialization\XmlSerializationWriterILGen.cs (77)
113MethodInfo XmlSerializationWriter_WriteXXX = typeof(XmlSerializationWriter).GetMethod( 161MethodInfo XmlConvert_ToString = typeof(XmlConvert).GetMethod( 179MethodInfo FromXXX = typeof(XmlSerializationWriter).GetMethod( 264MethodInfo XmlSerializationWriter_method = typeof(XmlSerializationWriter).GetMethod( 279MethodInfo XmlSerializationWriter_Method = typeof(XmlSerializationWriter).GetMethod( 292MethodInfo XmlSerializationWriter_Method = typeof(XmlSerializationWriter).GetMethod( 312MethodInfo XmlSerializationWriter_WriteEndElement = typeof(XmlSerializationWriter).GetMethod( 322MethodInfo XmlSerializationWriter_WriteEndElement = typeof(XmlSerializationWriter).GetMethod( 365MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod( 373MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod( 556MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod( 576MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod( 680MethodInfo XmlSerializationWriter_FromEnum = typeof(XmlSerializationWriter).GetMethod( 700MethodInfo CultureInfo_get_InvariantCulture = typeof(CultureInfo).GetMethod( 705MethodInfo Int64_ToString = typeof(long).GetMethod( 710MethodInfo XmlSerializationWriter_CreateInvalidEnumValueException = typeof(XmlSerializationWriter).GetMethod( 769MethodInfo methodBuilder = EnsureMethodBuilder(typeBuilder, 801MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 806MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod( 816MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 831MethodInfo XmlWriter_WriteString = typeof(XmlWriter).GetMethod( 844MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod( 867MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 872MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod( 882MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 894MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod( 941MethodInfo XmlSerializationWriter_WriteNullTagLiteral = typeof(XmlSerializationWriter).GetMethod( 959MethodInfo Object_GetType = typeof(object).GetMethod( 978MethodInfo XmlSerializationWriter_WriteTypedPrimitive = typeof(XmlSerializationWriter).GetMethod( 993MethodInfo XmlSerializationWriter_CreateUnknownTypeException = typeof(XmlSerializationWriter).GetMethod( 1011MethodInfo XmlSerializationWriter_set_EscapeName = typeof(XmlSerializationWriter).GetMethod( 1046MethodInfo XmlSerializationWriter_WriteStartElement = typeof(XmlSerializationWriter).GetMethod( 1056MethodInfo XmlSerializationWriter_WriteXsiType = typeof(XmlSerializationWriter).GetMethod( 1174MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1179MethodInfo XmlWriter_WriteStartAttribute = typeof(XmlWriter).GetMethod( 1225MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1230MethodInfo XmlWriter_WriteString = typeof(XmlWriter).GetMethod( 1246MethodInfo StringBuilder_Append = typeof(StringBuilder).GetMethod( 1267MethodInfo method = methodType.GetMethod( 1289MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1294MethodInfo XmlWriter_WriteEndAttribute = typeof(XmlWriter).GetMethod( 1305MethodInfo StringBuilder_get_Length = typeof(StringBuilder).GetMethod( 1325MethodInfo Object_ToString = typeof(object).GetMethod( 1333MethodInfo XmlSerializationWriter_WriteAttribute = typeof(XmlSerializationWriter).GetMethod( 1363MethodInfo XmlSerializationWriter_WriteXmlAttribute = typeof(XmlSerializationWriter).GetMethod( 1453MethodInfo XmlSerializationWriter_CreateInvalidChoiceIdentifierValueException = typeof(XmlSerializationWriter).GetMethod( 1487MethodInfo getEnumeratorMethod; 1548MethodInfo IEnumerator_MoveNext = typeof(IEnumerator).GetMethod( 1597MethodInfo XmlSerializationWriter_WriteValue = typeof(XmlSerializationWriter).GetMethod( 1754MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1759MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1767MethodInfo String_op_Equality = typeof(string).GetMethod( 1790MethodInfo XmlSerializationWriter_CreateChoiceIdentifierValueException = typeof(XmlSerializationWriter).GetMethod( 1817MethodInfo XmlSerializationWriter_CreateUnknownAnyElementException = typeof(XmlSerializationWriter).GetMethod( 1824MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1829MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1875MethodInfo XmlSerializationWriter_CreateUnknownTypeException = typeof(XmlSerializationWriter).GetMethod( 1906MethodInfo XmlSerializationWriter_WriteValue = typeof(XmlSerializationWriter).GetMethod( 1918MethodInfo WriteTo = source.Type!.GetMethod( 1923MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1947MethodInfo Nullable_get_HasValue = element.Mapping.TypeDesc.Type!.GetMethod( 2088MethodInfo XmlSerializationWriter_CreateInvalidAnyTypeException = typeof(XmlSerializationWriter).GetMethod( 2109MethodInfo XmlSerializationWriter_func = typeof(XmlSerializationWriter).GetMethod( 2138MethodInfo String_get_Length = typeof(string).GetMethod( 2180MethodInfo op_Inequality = valueType.GetMethod( 2210MethodInfo XmlSerializationWriter_CreateMismatchChoiceException = typeof(XmlSerializationWriter).GetMethod( 2237MethodInfo XmlSerializationWriter_WriteNamespaceDeclarations = typeof(XmlSerializationWriter).GetMethod( 2438MethodInfo XName_op_Implicit = xName.GetMethod( 2463MethodInfo getTypeInfoMehod = typeof(IntrospectionExtensions).GetMethod( 2472MethodInfo getDeclaredConstructors = typeof(TypeInfo).GetMethod("get_DeclaredConstructors")!; 2473MethodInfo getEnumerator = typeof(IEnumerable<>).MakeGenericType(typeof(ConstructorInfo)).GetMethod("GetEnumerator")!; 2480MethodInfo enumeratorCurrent = typeof(IEnumerator).GetMethod("get_Current")!; 2488MethodInfo constructorIsStatic = typeof(ConstructorInfo).GetMethod("get_IsStatic")!; 2492MethodInfo constructorGetParameters = typeof(ConstructorInfo).GetMethod("GetParameters")!; 2500MethodInfo constructorInvoke = typeof(ConstructorInfo).GetMethod("Invoke", new Type[] { typeof(object[]) })!; 2508MethodInfo IEnumeratorMoveNext = typeof(IEnumerator).GetMethod( 2517MethodInfo Activator_CreateInstance = typeof(Activator).GetMethod(
System\Xml\Xsl\IlGen\GenerateHelper.cs (265)
31public readonly MethodInfo? AggAvg; 32public readonly MethodInfo? AggAvgResult; 33public readonly MethodInfo? AggCreate; 34public readonly MethodInfo? AggIsEmpty; 35public readonly MethodInfo? AggMax; 36public readonly MethodInfo? AggMaxResult; 37public readonly MethodInfo? AggMin; 38public readonly MethodInfo? AggMinResult; 39public readonly MethodInfo? AggSum; 40public readonly MethodInfo? AggSumResult; 45public readonly MethodInfo SeqReuse; 46public readonly MethodInfo SeqReuseSgl; 47public readonly MethodInfo SeqAdd; 48public readonly MethodInfo SeqSortByKeys; 52public readonly MethodInfo IListCount; 53public readonly MethodInfo IListItem; 56public readonly MethodInfo? ValueAs; 59public readonly MethodInfo? ToAtomicValue; 173public static readonly MethodInfo AncCreate = typeof(AncestorIterator).GetMethod("Create")!; 174public static readonly MethodInfo AncNext = typeof(AncestorIterator).GetMethod("MoveNext")!; 175public static readonly MethodInfo AncCurrent = typeof(AncestorIterator).GetMethod("get_Current")!; 176public static readonly MethodInfo AncDOCreate = typeof(AncestorDocOrderIterator).GetMethod("Create")!; 177public static readonly MethodInfo AncDONext = typeof(AncestorDocOrderIterator).GetMethod("MoveNext")!; 178public static readonly MethodInfo AncDOCurrent = typeof(AncestorDocOrderIterator).GetMethod("get_Current")!; 179public static readonly MethodInfo AttrContentCreate = typeof(AttributeContentIterator).GetMethod("Create")!; 180public static readonly MethodInfo AttrContentNext = typeof(AttributeContentIterator).GetMethod("MoveNext")!; 181public static readonly MethodInfo AttrContentCurrent = typeof(AttributeContentIterator).GetMethod("get_Current")!; 182public static readonly MethodInfo AttrCreate = typeof(AttributeIterator).GetMethod("Create")!; 183public static readonly MethodInfo AttrNext = typeof(AttributeIterator).GetMethod("MoveNext")!; 184public static readonly MethodInfo AttrCurrent = typeof(AttributeIterator).GetMethod("get_Current")!; 185public static readonly MethodInfo ContentCreate = typeof(ContentIterator).GetMethod("Create")!; 186public static readonly MethodInfo ContentNext = typeof(ContentIterator).GetMethod("MoveNext")!; 187public static readonly MethodInfo ContentCurrent = typeof(ContentIterator).GetMethod("get_Current")!; 188public static readonly MethodInfo ContentMergeCreate = typeof(ContentMergeIterator).GetMethod("Create")!; 189public static readonly MethodInfo ContentMergeNext = typeof(ContentMergeIterator).GetMethod("MoveNext")!; 190public static readonly MethodInfo ContentMergeCurrent = typeof(ContentMergeIterator).GetMethod("get_Current")!; 191public static readonly MethodInfo DescCreate = typeof(DescendantIterator).GetMethod("Create")!; 192public static readonly MethodInfo DescNext = typeof(DescendantIterator).GetMethod("MoveNext")!; 193public static readonly MethodInfo DescCurrent = typeof(DescendantIterator).GetMethod("get_Current")!; 194public static readonly MethodInfo DescMergeCreate = typeof(DescendantMergeIterator).GetMethod("Create")!; 195public static readonly MethodInfo DescMergeNext = typeof(DescendantMergeIterator).GetMethod("MoveNext")!; 196public static readonly MethodInfo DescMergeCurrent = typeof(DescendantMergeIterator).GetMethod("get_Current")!; 197public static readonly MethodInfo DiffCreate = typeof(DifferenceIterator).GetMethod("Create")!; 198public static readonly MethodInfo DiffNext = typeof(DifferenceIterator).GetMethod("MoveNext")!; 199public static readonly MethodInfo DiffCurrent = typeof(DifferenceIterator).GetMethod("get_Current")!; 200public static readonly MethodInfo DodMergeCreate = typeof(DodSequenceMerge).GetMethod("Create")!; 201public static readonly MethodInfo DodMergeAdd = typeof(DodSequenceMerge).GetMethod("AddSequence")!; 202public static readonly MethodInfo DodMergeSeq = typeof(DodSequenceMerge).GetMethod("MergeSequences")!; 203public static readonly MethodInfo ElemContentCreate = typeof(ElementContentIterator).GetMethod("Create")!; 204public static readonly MethodInfo ElemContentNext = typeof(ElementContentIterator).GetMethod("MoveNext")!; 205public static readonly MethodInfo ElemContentCurrent = typeof(ElementContentIterator).GetMethod("get_Current")!; 206public static readonly MethodInfo FollSibCreate = typeof(FollowingSiblingIterator).GetMethod("Create")!; 207public static readonly MethodInfo FollSibNext = typeof(FollowingSiblingIterator).GetMethod("MoveNext")!; 208public static readonly MethodInfo FollSibCurrent = typeof(FollowingSiblingIterator).GetMethod("get_Current")!; 209public static readonly MethodInfo FollSibMergeCreate = typeof(FollowingSiblingMergeIterator).GetMethod("Create")!; 210public static readonly MethodInfo FollSibMergeNext = typeof(FollowingSiblingMergeIterator).GetMethod("MoveNext")!; 211public static readonly MethodInfo FollSibMergeCurrent = typeof(FollowingSiblingMergeIterator).GetMethod("get_Current")!; 212public static readonly MethodInfo IdCreate = typeof(IdIterator).GetMethod("Create")!; 213public static readonly MethodInfo IdNext = typeof(IdIterator).GetMethod("MoveNext")!; 214public static readonly MethodInfo IdCurrent = typeof(IdIterator).GetMethod("get_Current")!; 215public static readonly MethodInfo InterCreate = typeof(IntersectIterator).GetMethod("Create")!; 216public static readonly MethodInfo InterNext = typeof(IntersectIterator).GetMethod("MoveNext")!; 217public static readonly MethodInfo InterCurrent = typeof(IntersectIterator).GetMethod("get_Current")!; 218public static readonly MethodInfo KindContentCreate = typeof(NodeKindContentIterator).GetMethod("Create")!; 219public static readonly MethodInfo KindContentNext = typeof(NodeKindContentIterator).GetMethod("MoveNext")!; 220public static readonly MethodInfo KindContentCurrent = typeof(NodeKindContentIterator).GetMethod("get_Current")!; 221public static readonly MethodInfo NmspCreate = typeof(NamespaceIterator).GetMethod("Create")!; 222public static readonly MethodInfo NmspNext = typeof(NamespaceIterator).GetMethod("MoveNext")!; 223public static readonly MethodInfo NmspCurrent = typeof(NamespaceIterator).GetMethod("get_Current")!; 224public static readonly MethodInfo NodeRangeCreate = typeof(NodeRangeIterator).GetMethod("Create")!; 225public static readonly MethodInfo NodeRangeNext = typeof(NodeRangeIterator).GetMethod("MoveNext")!; 226public static readonly MethodInfo NodeRangeCurrent = typeof(NodeRangeIterator).GetMethod("get_Current")!; 227public static readonly MethodInfo ParentCreate = typeof(ParentIterator).GetMethod("Create")!; 228public static readonly MethodInfo ParentNext = typeof(ParentIterator).GetMethod("MoveNext")!; 229public static readonly MethodInfo ParentCurrent = typeof(ParentIterator).GetMethod("get_Current")!; 230public static readonly MethodInfo PrecCreate = typeof(PrecedingIterator).GetMethod("Create")!; 231public static readonly MethodInfo PrecNext = typeof(PrecedingIterator).GetMethod("MoveNext")!; 232public static readonly MethodInfo PrecCurrent = typeof(PrecedingIterator).GetMethod("get_Current")!; 233public static readonly MethodInfo PreSibCreate = typeof(PrecedingSiblingIterator).GetMethod("Create")!; 234public static readonly MethodInfo PreSibNext = typeof(PrecedingSiblingIterator).GetMethod("MoveNext")!; 235public static readonly MethodInfo PreSibCurrent = typeof(PrecedingSiblingIterator).GetMethod("get_Current")!; 236public static readonly MethodInfo PreSibDOCreate = typeof(PrecedingSiblingDocOrderIterator).GetMethod("Create")!; 237public static readonly MethodInfo PreSibDONext = typeof(PrecedingSiblingDocOrderIterator).GetMethod("MoveNext")!; 238public static readonly MethodInfo PreSibDOCurrent = typeof(PrecedingSiblingDocOrderIterator).GetMethod("get_Current")!; 239public static readonly MethodInfo SortKeyCreate = typeof(XmlSortKeyAccumulator).GetMethod("Create")!; 240public static readonly MethodInfo SortKeyDateTime = typeof(XmlSortKeyAccumulator).GetMethod("AddDateTimeSortKey")!; 241public static readonly MethodInfo SortKeyDecimal = typeof(XmlSortKeyAccumulator).GetMethod("AddDecimalSortKey")!; 242public static readonly MethodInfo SortKeyDouble = typeof(XmlSortKeyAccumulator).GetMethod("AddDoubleSortKey")!; 243public static readonly MethodInfo SortKeyEmpty = typeof(XmlSortKeyAccumulator).GetMethod("AddEmptySortKey")!; 244public static readonly MethodInfo SortKeyFinish = typeof(XmlSortKeyAccumulator).GetMethod("FinishSortKeys")!; 245public static readonly MethodInfo SortKeyInt = typeof(XmlSortKeyAccumulator).GetMethod("AddIntSortKey")!; 246public static readonly MethodInfo SortKeyInteger = typeof(XmlSortKeyAccumulator).GetMethod("AddIntegerSortKey")!; 247public static readonly MethodInfo SortKeyKeys = typeof(XmlSortKeyAccumulator).GetMethod("get_Keys")!; 248public static readonly MethodInfo SortKeyString = typeof(XmlSortKeyAccumulator).GetMethod("AddStringSortKey")!; 249public static readonly MethodInfo UnionCreate = typeof(UnionIterator).GetMethod("Create")!; 250public static readonly MethodInfo UnionNext = typeof(UnionIterator).GetMethod("MoveNext")!; 251public static readonly MethodInfo UnionCurrent = typeof(UnionIterator).GetMethod("get_Current")!; 252public static readonly MethodInfo XPFollCreate = typeof(XPathFollowingIterator).GetMethod("Create")!; 253public static readonly MethodInfo XPFollNext = typeof(XPathFollowingIterator).GetMethod("MoveNext")!; 254public static readonly MethodInfo XPFollCurrent = typeof(XPathFollowingIterator).GetMethod("get_Current")!; 255public static readonly MethodInfo XPFollMergeCreate = typeof(XPathFollowingMergeIterator).GetMethod("Create")!; 256public static readonly MethodInfo XPFollMergeNext = typeof(XPathFollowingMergeIterator).GetMethod("MoveNext")!; 257public static readonly MethodInfo XPFollMergeCurrent = typeof(XPathFollowingMergeIterator).GetMethod("get_Current")!; 258public static readonly MethodInfo XPPrecCreate = typeof(XPathPrecedingIterator).GetMethod("Create")!; 259public static readonly MethodInfo XPPrecNext = typeof(XPathPrecedingIterator).GetMethod("MoveNext")!; 260public static readonly MethodInfo XPPrecCurrent = typeof(XPathPrecedingIterator).GetMethod("get_Current")!; 261public static readonly MethodInfo XPPrecDOCreate = typeof(XPathPrecedingDocOrderIterator).GetMethod("Create")!; 262public static readonly MethodInfo XPPrecDONext = typeof(XPathPrecedingDocOrderIterator).GetMethod("MoveNext")!; 263public static readonly MethodInfo XPPrecDOCurrent = typeof(XPathPrecedingDocOrderIterator).GetMethod("get_Current")!; 264public static readonly MethodInfo XPPrecMergeCreate = typeof(XPathPrecedingMergeIterator).GetMethod("Create")!; 265public static readonly MethodInfo XPPrecMergeNext = typeof(XPathPrecedingMergeIterator).GetMethod("MoveNext")!; 266public static readonly MethodInfo XPPrecMergeCurrent = typeof(XPathPrecedingMergeIterator).GetMethod("get_Current")!; 269public static readonly MethodInfo AddNewIndex = typeof(XmlQueryRuntime).GetMethod("AddNewIndex")!; 270public static readonly MethodInfo ChangeTypeXsltArg = typeof(XmlQueryRuntime).GetMethod("ChangeTypeXsltArgument", new[] { typeof(int), typeof(object), typeof(Type) })!; 271public static readonly MethodInfo ChangeTypeXsltResult = typeof(XmlQueryRuntime).GetMethod("ChangeTypeXsltResult")!; 272public static readonly MethodInfo CompPos = typeof(XmlQueryRuntime).GetMethod("ComparePosition")!; 273public static readonly MethodInfo Context = typeof(XmlQueryRuntime).GetMethod("get_ExternalContext")!; 274public static readonly MethodInfo CreateCollation = typeof(XmlQueryRuntime).GetMethod("CreateCollation")!; 275public static readonly MethodInfo DocOrder = typeof(XmlQueryRuntime).GetMethod("DocOrderDistinct")!; 276public static readonly MethodInfo EndRtfConstr = typeof(XmlQueryRuntime).GetMethod("EndRtfConstruction")!; 277public static readonly MethodInfo EndSeqConstr = typeof(XmlQueryRuntime).GetMethod("EndSequenceConstruction")!; 278public static readonly MethodInfo FindIndex = typeof(XmlQueryRuntime).GetMethod("FindIndex")!; 279public static readonly MethodInfo GenId = typeof(XmlQueryRuntime).GetMethod("GenerateId")!; 280public static readonly MethodInfo GetAtomizedName = typeof(XmlQueryRuntime).GetMethod("GetAtomizedName")!; 281public static readonly MethodInfo GetCollation = typeof(XmlQueryRuntime).GetMethod("GetCollation")!; 282public static readonly MethodInfo GetEarly = typeof(XmlQueryRuntime).GetMethod("GetEarlyBoundObject")!; 283public static readonly MethodInfo GetNameFilter = typeof(XmlQueryRuntime).GetMethod("GetNameFilter")!; 284public static readonly MethodInfo GetOutput = typeof(XmlQueryRuntime).GetMethod("get_Output")!; 285public static readonly MethodInfo GetGlobalValue = typeof(XmlQueryRuntime).GetMethod("GetGlobalValue")!; 286public static readonly MethodInfo GetTypeFilter = typeof(XmlQueryRuntime).GetMethod("GetTypeFilter")!; 287public static readonly MethodInfo GlobalComputed = typeof(XmlQueryRuntime).GetMethod("IsGlobalComputed")!; 288public static readonly MethodInfo ItemMatchesCode = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(XPathItem), typeof(XmlTypeCode) })!; 289public static readonly MethodInfo ItemMatchesType = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(XPathItem), typeof(int) })!; 290public static readonly MethodInfo QNameEqualLit = typeof(XmlQueryRuntime).GetMethod("IsQNameEqual", new[] { typeof(XPathNavigator), typeof(int), typeof(int) })!; 291public static readonly MethodInfo QNameEqualNav = typeof(XmlQueryRuntime).GetMethod("IsQNameEqual", new[] { typeof(XPathNavigator), typeof(XPathNavigator) })!; 292public static readonly MethodInfo RtfConstr = typeof(XmlQueryRuntime).GetMethod("TextRtfConstruction")!; 293public static readonly MethodInfo SendMessage = typeof(XmlQueryRuntime).GetMethod("SendMessage")!; 294public static readonly MethodInfo SeqMatchesCode = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(IList<XPathItem>), typeof(XmlTypeCode) })!; 295public static readonly MethodInfo SeqMatchesType = typeof(XmlQueryRuntime).GetMethod("MatchesXmlType", new[] { typeof(IList<XPathItem>), typeof(int) })!; 296public static readonly MethodInfo SetGlobalValue = typeof(XmlQueryRuntime).GetMethod("SetGlobalValue")!; 297public static readonly MethodInfo StartRtfConstr = typeof(XmlQueryRuntime).GetMethod("StartRtfConstruction")!; 298public static readonly MethodInfo StartSeqConstr = typeof(XmlQueryRuntime).GetMethod("StartSequenceConstruction")!; 299public static readonly MethodInfo TagAndMappings = typeof(XmlQueryRuntime).GetMethod("ParseTagName", new[] { typeof(string), typeof(int) })!; 300public static readonly MethodInfo TagAndNamespace = typeof(XmlQueryRuntime).GetMethod("ParseTagName", new[] { typeof(string), typeof(string) })!; 301public static readonly MethodInfo ThrowException = typeof(XmlQueryRuntime).GetMethod("ThrowException")!; 302public static readonly MethodInfo XsltLib = typeof(XmlQueryRuntime).GetMethod("get_XsltFunctions")!; 305public static readonly MethodInfo GetDataSource = typeof(XmlQueryContext).GetMethod("GetDataSource")!; 306public static readonly MethodInfo GetDefaultDataSource = typeof(XmlQueryContext).GetMethod("get_DefaultDataSource")!; 307public static readonly MethodInfo GetParam = typeof(XmlQueryContext).GetMethod("GetParameter")!; 308public static readonly MethodInfo InvokeXsltLate = GetInvokeXsltLateBoundFunction(); 312private static MethodInfo GetInvokeXsltLateBoundFunction() => typeof(XmlQueryContext).GetMethod("InvokeXsltLateBoundFunction")!; 315public static readonly MethodInfo IndexAdd = typeof(XmlILIndex).GetMethod("Add")!; 316public static readonly MethodInfo IndexLookup = typeof(XmlILIndex).GetMethod("Lookup")!; 319public static readonly MethodInfo ItemIsNode = typeof(XPathItem).GetMethod("get_IsNode")!; 320public static readonly MethodInfo Value = typeof(XPathItem).GetMethod("get_Value")!; 321public static readonly MethodInfo ValueAsAny = typeof(XPathItem).GetMethod("ValueAs", new[] { typeof(Type), typeof(IXmlNamespaceResolver) })!; 324public static readonly MethodInfo NavClone = typeof(XPathNavigator).GetMethod("Clone")!; 325public static readonly MethodInfo NavLocalName = typeof(XPathNavigator).GetMethod("get_LocalName")!; 326public static readonly MethodInfo NavMoveAttr = typeof(XPathNavigator).GetMethod("MoveToAttribute", new[] { typeof(string), typeof(string) })!; 327public static readonly MethodInfo NavMoveId = typeof(XPathNavigator).GetMethod("MoveToId")!; 328public static readonly MethodInfo NavMoveParent = typeof(XPathNavigator).GetMethod("MoveToParent")!; 329public static readonly MethodInfo NavMoveRoot = typeof(XPathNavigator).GetMethod("MoveToRoot")!; 330public static readonly MethodInfo NavMoveTo = typeof(XPathNavigator).GetMethod("MoveTo")!; 331public static readonly MethodInfo NavNmsp = typeof(XPathNavigator).GetMethod("get_NamespaceURI")!; 332public static readonly MethodInfo NavPrefix = typeof(XPathNavigator).GetMethod("get_Prefix")!; 333public static readonly MethodInfo NavSamePos = typeof(XPathNavigator).GetMethod("IsSamePosition")!; 334public static readonly MethodInfo NavType = typeof(XPathNavigator).GetMethod("get_NodeType")!; 337public static readonly MethodInfo StartElemLitName = typeof(XmlQueryOutput).GetMethod("WriteStartElement", new[] { typeof(string), typeof(string), typeof(string) })!; 338public static readonly MethodInfo StartElemLocName = typeof(XmlQueryOutput).GetMethod("WriteStartElementLocalName", new[] { typeof(string) })!; 339public static readonly MethodInfo EndElemStackName = typeof(XmlQueryOutput).GetMethod("WriteEndElement")!; 340public static readonly MethodInfo StartAttrLitName = typeof(XmlQueryOutput).GetMethod("WriteStartAttribute", new[] { typeof(string), typeof(string), typeof(string) })!; 341public static readonly MethodInfo StartAttrLocName = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeLocalName", new[] { typeof(string) })!; 342public static readonly MethodInfo EndAttr = typeof(XmlQueryOutput).GetMethod("WriteEndAttribute")!; 343public static readonly MethodInfo Text = typeof(XmlQueryOutput).GetMethod("WriteString")!; 344public static readonly MethodInfo NoEntText = typeof(XmlQueryOutput).GetMethod("WriteRaw", new[] { typeof(string) })!; 346public static readonly MethodInfo StartTree = typeof(XmlQueryOutput).GetMethod("StartTree")!; 347public static readonly MethodInfo EndTree = typeof(XmlQueryOutput).GetMethod("EndTree")!; 349public static readonly MethodInfo StartElemLitNameUn = typeof(XmlQueryOutput).GetMethod("WriteStartElementUnchecked", new[] { typeof(string), typeof(string), typeof(string) })!; 350public static readonly MethodInfo StartElemLocNameUn = typeof(XmlQueryOutput).GetMethod("WriteStartElementUnchecked", new[] { typeof(string) })!; 351public static readonly MethodInfo StartContentUn = typeof(XmlQueryOutput).GetMethod("StartElementContentUnchecked")!; 352public static readonly MethodInfo EndElemLitNameUn = typeof(XmlQueryOutput).GetMethod("WriteEndElementUnchecked", new[] { typeof(string), typeof(string), typeof(string) })!; 353public static readonly MethodInfo EndElemLocNameUn = typeof(XmlQueryOutput).GetMethod("WriteEndElementUnchecked", new[] { typeof(string) })!; 354public static readonly MethodInfo StartAttrLitNameUn = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeUnchecked", new[] { typeof(string), typeof(string), typeof(string) })!; 355public static readonly MethodInfo StartAttrLocNameUn = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeUnchecked", new[] { typeof(string) })!; 356public static readonly MethodInfo EndAttrUn = typeof(XmlQueryOutput).GetMethod("WriteEndAttributeUnchecked")!; 357public static readonly MethodInfo NamespaceDeclUn = typeof(XmlQueryOutput).GetMethod("WriteNamespaceDeclarationUnchecked")!; 358public static readonly MethodInfo TextUn = typeof(XmlQueryOutput).GetMethod("WriteStringUnchecked")!; 359public static readonly MethodInfo NoEntTextUn = typeof(XmlQueryOutput).GetMethod("WriteRawUnchecked")!; 361public static readonly MethodInfo StartRoot = typeof(XmlQueryOutput).GetMethod("WriteStartRoot")!; 362public static readonly MethodInfo EndRoot = typeof(XmlQueryOutput).GetMethod("WriteEndRoot")!; 363public static readonly MethodInfo StartElemCopyName = typeof(XmlQueryOutput).GetMethod("WriteStartElementComputed", new[] { typeof(XPathNavigator) })!; 364public static readonly MethodInfo StartElemMapName = typeof(XmlQueryOutput).GetMethod("WriteStartElementComputed", new[] { typeof(string), typeof(int) })!; 365public static readonly MethodInfo StartElemNmspName = typeof(XmlQueryOutput).GetMethod("WriteStartElementComputed", new[] { typeof(string), typeof(string) })!; 366public static readonly MethodInfo StartElemQName = typeof(XmlQueryOutput).GetMethod("WriteStartElementComputed", new[] { typeof(XmlQualifiedName) })!; 367public static readonly MethodInfo StartAttrCopyName = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeComputed", new[] { typeof(XPathNavigator) })!; 368public static readonly MethodInfo StartAttrMapName = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeComputed", new[] { typeof(string), typeof(int) })!; 369public static readonly MethodInfo StartAttrNmspName = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeComputed", new[] { typeof(string), typeof(string) })!; 370public static readonly MethodInfo StartAttrQName = typeof(XmlQueryOutput).GetMethod("WriteStartAttributeComputed", new[] { typeof(XmlQualifiedName) })!; 371public static readonly MethodInfo NamespaceDecl = typeof(XmlQueryOutput).GetMethod("WriteNamespaceDeclaration")!; 372public static readonly MethodInfo StartComment = typeof(XmlQueryOutput).GetMethod("WriteStartComment")!; 373public static readonly MethodInfo CommentText = typeof(XmlQueryOutput).GetMethod("WriteCommentString")!; 374public static readonly MethodInfo EndComment = typeof(XmlQueryOutput).GetMethod("WriteEndComment")!; 375public static readonly MethodInfo StartPI = typeof(XmlQueryOutput).GetMethod("WriteStartProcessingInstruction")!; 376public static readonly MethodInfo PIText = typeof(XmlQueryOutput).GetMethod("WriteProcessingInstructionString")!; 377public static readonly MethodInfo EndPI = typeof(XmlQueryOutput).GetMethod("WriteEndProcessingInstruction")!; 378public static readonly MethodInfo WriteItem = typeof(XmlQueryOutput).GetMethod("WriteItem")!; 379public static readonly MethodInfo CopyOf = typeof(XmlQueryOutput).GetMethod("XsltCopyOf")!; 380public static readonly MethodInfo StartCopy = typeof(XmlQueryOutput).GetMethod("StartCopy")!; 381public static readonly MethodInfo EndCopy = typeof(XmlQueryOutput).GetMethod("EndCopy")!; 384public static readonly MethodInfo DecAdd = typeof(decimal).GetMethod("Add")!; 385public static readonly MethodInfo DecCmp = typeof(decimal).GetMethod("Compare", new[] { typeof(decimal), typeof(decimal) })!; 386public static readonly MethodInfo DecEq = typeof(decimal).GetMethod("Equals", new[] { typeof(decimal), typeof(decimal) })!; 387public static readonly MethodInfo DecSub = typeof(decimal).GetMethod("Subtract")!; 388public static readonly MethodInfo DecMul = typeof(decimal).GetMethod("Multiply")!; 389public static readonly MethodInfo DecDiv = typeof(decimal).GetMethod("Divide")!; 390public static readonly MethodInfo DecRem = typeof(decimal).GetMethod("Remainder")!; 391public static readonly MethodInfo DecNeg = typeof(decimal).GetMethod("Negate")!; 392public static readonly MethodInfo QNameEq = typeof(XmlQualifiedName).GetMethod("Equals")!; 393public static readonly MethodInfo StrEq = typeof(string).GetMethod("Equals", new[] { typeof(string), typeof(string) })!; 394public static readonly MethodInfo StrCat2 = typeof(string).GetMethod("Concat", new[] { typeof(string), typeof(string) })!; 395public static readonly MethodInfo StrCat3 = typeof(string).GetMethod("Concat", new[] { typeof(string), typeof(string), typeof(string) })!; 396public static readonly MethodInfo StrCat4 = typeof(string).GetMethod("Concat", new[] { typeof(string), typeof(string), typeof(string), typeof(string) })!; 397public static readonly MethodInfo StrCmp = typeof(string).GetMethod("CompareOrdinal", new[] { typeof(string), typeof(string) })!; 398public static readonly MethodInfo StrLen = typeof(string).GetMethod("get_Length")!; 401public static readonly MethodInfo DblToDec = typeof(XsltConvert).GetMethod("ToDecimal", new[] { typeof(double) })!; 402public static readonly MethodInfo DblToInt = typeof(XsltConvert).GetMethod("ToInt", new[] { typeof(double) })!; 403public static readonly MethodInfo DblToLng = typeof(XsltConvert).GetMethod("ToLong", new[] { typeof(double) })!; 404public static readonly MethodInfo DblToStr = typeof(XsltConvert).GetMethod("ToString", new[] { typeof(double) })!; 405public static readonly MethodInfo DecToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(decimal) })!; 406public static readonly MethodInfo DTToStr = typeof(XsltConvert).GetMethod("ToString", new[] { typeof(DateTime) })!; 407public static readonly MethodInfo IntToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(int) })!; 408public static readonly MethodInfo LngToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(long) })!; 409public static readonly MethodInfo StrToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(string) })!; 410public static readonly MethodInfo StrToDT = typeof(XsltConvert).GetMethod("ToDateTime", new[] { typeof(string) })!; 412public static readonly MethodInfo ItemToBool = typeof(XsltConvert).GetMethod("ToBoolean", new[] { typeof(XPathItem) })!; 413public static readonly MethodInfo ItemToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(XPathItem) })!; 414public static readonly MethodInfo ItemToStr = typeof(XsltConvert).GetMethod("ToString", new[] { typeof(XPathItem) })!; 415public static readonly MethodInfo ItemToNode = typeof(XsltConvert).GetMethod("ToNode", new[] { typeof(XPathItem) })!; 416public static readonly MethodInfo ItemToNodes = typeof(XsltConvert).GetMethod("ToNodeSet", new[] { typeof(XPathItem) })!; 418public static readonly MethodInfo ItemsToBool = typeof(XsltConvert).GetMethod("ToBoolean", new[] { typeof(IList<XPathItem>) })!; 419public static readonly MethodInfo ItemsToDbl = typeof(XsltConvert).GetMethod("ToDouble", new[] { typeof(IList<XPathItem>) })!; 420public static readonly MethodInfo ItemsToNode = typeof(XsltConvert).GetMethod("ToNode", new[] { typeof(IList<XPathItem>) })!; 421public static readonly MethodInfo ItemsToNodes = typeof(XsltConvert).GetMethod("ToNodeSet", new[] { typeof(IList<XPathItem>) })!; 422public static readonly MethodInfo ItemsToStr = typeof(XsltConvert).GetMethod("ToString", new[] { typeof(IList<XPathItem>) })!; 425public static readonly MethodInfo StrCatCat = typeof(StringConcat).GetMethod("Concat")!; 426public static readonly MethodInfo StrCatClear = typeof(StringConcat).GetMethod("Clear")!; 427public static readonly MethodInfo StrCatResult = typeof(StringConcat).GetMethod("GetResult")!; 428public static readonly MethodInfo StrCatDelim = typeof(StringConcat).GetMethod("set_Delimiter")!; 431public static readonly MethodInfo NavsToItems = typeof(XmlILStorageConverter).GetMethod("NavigatorsToItems")!; 432public static readonly MethodInfo ItemsToNavs = typeof(XmlILStorageConverter).GetMethod("ItemsToNavigators")!; 435public static readonly MethodInfo SetDod = typeof(XmlQueryNodeSequence).GetMethod("set_IsDocOrderDistinct")!; 438public static readonly MethodInfo GetTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle")!; 439public static readonly MethodInfo InitializeArray = typeof(System.Runtime.CompilerServices.RuntimeHelpers).GetMethod("InitializeArray")!; 487private MethodInfo? _methSyncToNav; 801public void TailCall(MethodInfo meth) 810private void TraceCall(OpCode opcode, MethodInfo meth) 838public void Call(MethodInfo meth) 951MethodInfo? meth = null; 994MethodInfo? meth = null; 1011MethodInfo? meth = null; 1183MethodInfo? meth = null; 1216MethodInfo? meth = null; 1246MethodInfo? meth = null; 1376MethodInfo? meth; 1403MethodInfo? meth = null;
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (6)
115public static StorageDescriptor Current(LocalBuilder locIter, MethodInfo currentMethod, Type itemStorageType) 131public static StorageDescriptor Global(MethodInfo methGlobal, Type itemStorageType, bool isCached) 213public MethodInfo? GlobalLocation 215get { return _locationObject as MethodInfo; } 240public CurrentContext(LocalBuilder local, MethodInfo currentMethod) 247public readonly MethodInfo CurrentMethod;
System\Xml\Xsl\IlGen\XmlILAnnotation.cs (2)
16private MethodInfo? _funcMethod; 57public MethodInfo? FunctionBinding
System\Xml\Xsl\IlGen\XmlILModule.cs (5)
118public MethodInfo DefineMethod(string name, Type returnType, Type[] paramTypes, string?[] paramNames, XmlILMethodAttributes xmlAttrs) 120MethodInfo methResult; 201public MethodInfo? FindMethod(string name) 203return (MethodInfo?)_methods[name]; 265return ((MethodInfo)_methods[name]!).CreateDelegate(typDelegate);
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (25)
50public void Visit(QilExpression qil, GenerateHelper helper, MethodInfo methRoot) 88MethodInfo? methGlobal; 116MethodInfo methGlobal; 215MethodInfo methFunc; 1274private QilBinary CreateSetIterator(QilBinary ndSet, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent) 1382private QilUnary CreateAggregator(QilUnary ndAgg, string aggName, XmlILStorageMethods methods, MethodInfo methAgg, MethodInfo methResult) 2550MethodInfo methInfo = XmlILAnnotation.Write(ndFunc).FunctionBinding!; 3797MethodInfo? meth; 3826private static bool GetXsltConvertMethod(XmlQueryType typSrc, XmlQueryType typDst, out MethodInfo? meth) 3922private void CreateSimpleIterator(QilNode ndCtxt, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent) 3945private void CreateFilteredIterator(QilNode ndCtxt, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent, 3981private void CreateContainerIterator(QilUnary ndDod, string iterName, Type iterType, MethodInfo methCreate, MethodInfo methNext, MethodInfo methCurrent, 4018private void GenerateSimpleIterator(Type itemStorageType, LocalBuilder locIter, MethodInfo methNext, MethodInfo methCurrent) 4050MethodInfo methNext, MethodInfo methCurrent, Type itemStorageType)
System\Xml\Xsl\QIL\QilInvokeEarlyBound.cs (2)
39public MethodInfo ClrMethod 41get { return (MethodInfo)((QilLiteral)Center).Value!; }
System\Xml\Xsl\QIL\QilPatternFactory.cs (1)
816public QilNode XsltInvokeEarlyBound(QilNode name, MethodInfo d, XmlQueryType t, IList<QilNode> args)
System\Xml\Xsl\QIL\QilTypeChecker.cs (1)
945CheckLiteralValue(node[1], typeof(MethodInfo));
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (10)
69private MethodInfo? _meth; // MethodInfo for extension function 85public XmlExtensionFunction(string name, string namespaceUri, MethodInfo meth) 123public MethodInfo? Method 167MethodInfo[] methods = _objectType!.GetMethods(_flags); 172foreach (MethodInfo methSearch in methods) 190MethodInfo[] methods = _objectType!.GetMethods(_flags); 191MethodInfo? methMatch = null; 196foreach (MethodInfo methSearch in methods) 210foreach (MethodInfo methSearch in methods) 229private void Bind(MethodInfo meth)
System\Xml\Xsl\Runtime\XsltLibrary.cs (38)
20public static readonly MethodInfo FormatMessage = typeof(XsltLibrary).GetMethod("FormatMessage")!; 23public static readonly MethodInfo EnsureNodeSet = typeof(XsltConvert).GetMethod("EnsureNodeSet", new[] { typeof(IList<XPathItem>) })!; 26public static readonly MethodInfo EqualityOperator = typeof(XsltLibrary).GetMethod("EqualityOperator")!; 27public static readonly MethodInfo RelationalOperator = typeof(XsltLibrary).GetMethod("RelationalOperator")!; 30public static readonly MethodInfo StartsWith = typeof(XsltFunctions).GetMethod("StartsWith")!; 31public static readonly MethodInfo Contains = typeof(XsltFunctions).GetMethod("Contains")!; 32public static readonly MethodInfo SubstringBefore = typeof(XsltFunctions).GetMethod("SubstringBefore")!; 33public static readonly MethodInfo SubstringAfter = typeof(XsltFunctions).GetMethod("SubstringAfter")!; 34public static readonly MethodInfo Substring2 = typeof(XsltFunctions).GetMethod("Substring", new[] { typeof(string), typeof(double) })!; 35public static readonly MethodInfo Substring3 = typeof(XsltFunctions).GetMethod("Substring", new[] { typeof(string), typeof(double), typeof(double) })!; 36public static readonly MethodInfo NormalizeSpace = typeof(XsltFunctions).GetMethod("NormalizeSpace")!; 37public static readonly MethodInfo Translate = typeof(XsltFunctions).GetMethod("Translate")!; 38public static readonly MethodInfo Lang = typeof(XsltFunctions).GetMethod("Lang")!; 39public static readonly MethodInfo Floor = typeof(Math).GetMethod("Floor", new[] { typeof(double) })!; 40public static readonly MethodInfo Ceiling = typeof(Math).GetMethod("Ceiling", new[] { typeof(double) })!; 41public static readonly MethodInfo Round = typeof(XsltFunctions).GetMethod("Round")!; 44public static readonly MethodInfo SystemProperty = typeof(XsltFunctions).GetMethod("SystemProperty")!; 45public static readonly MethodInfo BaseUri = typeof(XsltFunctions).GetMethod("BaseUri")!; 46public static readonly MethodInfo OuterXml = typeof(XsltFunctions).GetMethod("OuterXml")!; 47public static readonly MethodInfo OnCurrentNodeChanged = typeof(XmlQueryRuntime).GetMethod("OnCurrentNodeChanged")!; 50public static readonly MethodInfo MSFormatDateTime = typeof(XsltFunctions).GetMethod("MSFormatDateTime")!; 51public static readonly MethodInfo MSStringCompare = typeof(XsltFunctions).GetMethod("MSStringCompare")!; 52public static readonly MethodInfo MSUtc = typeof(XsltFunctions).GetMethod("MSUtc")!; 53public static readonly MethodInfo MSNumber = typeof(XsltFunctions).GetMethod("MSNumber")!; 54public static readonly MethodInfo MSLocalName = typeof(XsltFunctions).GetMethod("MSLocalName")!; 55public static readonly MethodInfo MSNamespaceUri = typeof(XsltFunctions).GetMethod("MSNamespaceUri")!; 58public static readonly MethodInfo EXslObjectType = typeof(XsltFunctions).GetMethod("EXslObjectType")!; 61public static readonly MethodInfo CheckScriptNamespace = typeof(XsltLibrary).GetMethod("CheckScriptNamespace")!; 62public static readonly MethodInfo FunctionAvailable = GetFunctionAvailableMethod(); 66private static MethodInfo GetFunctionAvailableMethod() => typeof(XsltLibrary).GetMethod("FunctionAvailable")!; 67public static readonly MethodInfo ElementAvailable = typeof(XsltLibrary).GetMethod("ElementAvailable")!; 68public static readonly MethodInfo RegisterDecimalFormat = typeof(XsltLibrary).GetMethod("RegisterDecimalFormat")!; 69public static readonly MethodInfo RegisterDecimalFormatter = typeof(XsltLibrary).GetMethod("RegisterDecimalFormatter")!; 70public static readonly MethodInfo FormatNumberStatic = typeof(XsltLibrary).GetMethod("FormatNumberStatic")!; 71public static readonly MethodInfo FormatNumberDynamic = typeof(XsltLibrary).GetMethod("FormatNumberDynamic")!; 72public static readonly MethodInfo IsSameNodeSort = typeof(XsltLibrary).GetMethod("IsSameNodeSort")!; 73public static readonly MethodInfo LangToLcid = typeof(XsltLibrary).GetMethod("LangToLcid")!; 74public static readonly MethodInfo NumberFormat = typeof(XsltLibrary).GetMethod("NumberFormat")!;
System\Xml\Xsl\XmlIlGenerator.cs (9)
132MethodInfo methExec = _module.DefineMethod("Execute", typeof(void), Type.EmptyTypes, Array.Empty<string>(), XmlILMethodAttributes.NonUser); 138MethodInfo methRoot = _module.DefineMethod("Root", typeof(void), Type.EmptyTypes, Array.Empty<string>(), methAttrs); 195MethodInfo methInfo; 252MethodInfo methInfo; 271private MethodInfo GenerateExecuteFunction(MethodInfo methExec, MethodInfo methRoot) 293MethodInfo meth; 332MethodInfo? methInfo;
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (6)
111private static MethodInfo? FindBestMethod(MethodInfo[] methods, bool ignoreCase, bool publicOnly, string name, XPathResultType[]? argTypes) 193MethodInfo? method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/true, /*publicOnly:*/false, name, argTypes); 204MethodInfo? method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/false, /*publicOnly:*/true, name, argTypes); 957private readonly MethodInfo _method; 960public FuncExtension(object extension, MethodInfo method)
System\Xml\Xslt\XslCompiledTransform.cs (2)
206MethodInfo? executeMethod = compiledStylesheet.GetMethod("Execute", BindingFlags.Static | BindingFlags.NonPublic); 224public void Load(MethodInfo executeMethod, byte[] queryData, Type[]? earlyBoundTypes)
System.Reflection (1)
System.Reflection.cs (1)
25[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodInfo))]
System.Reflection.Context (73)
System\Reflection\Context\Custom\CustomMethodInfo.cs (1)
10public CustomMethodInfo(MethodInfo template, CustomReflectionContext context)
System\Reflection\Context\Custom\CustomType.cs (12)
140public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 143MethodInfo[] methods = base.GetMethods(bindingAttr); 153List<MethodInfo> results = new List<MethodInfo>(methods); 182protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 184MethodInfo? method = base.GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); 218List<MethodInfo> matchingMethods = new List<MethodInfo>(); 227MethodInfo? accessor = getPropertyGetter ? newDeclaredProperty.GetGetMethod() : newDeclaredProperty.GetSetMethod(); 248MethodInfo? accessor = getPropertyGetter ? inheritedProperty.GetGetMethod() : inheritedProperty.GetSetMethod(); 266MethodInfo match = matchingMethods[0]; 279return (MethodInfo?)binder.SelectMethod(bindingAttr, matchingMethods.ToArray(), types, modifiers);
System\Reflection\Context\CustomReflectionContext.Projector.cs (5)
116public override MethodInfo? ProjectMethod(MethodInfo? value) 132MethodInfo? method = value as MethodInfo; 247output = ProjectMethod((MethodInfo)value);
System\Reflection\Context\Delegation\DelegatingAssembly.cs (1)
89public override MethodInfo? EntryPoint
System\Reflection\Context\Delegation\DelegatingEventInfo.cs (4)
65public override MethodInfo? GetAddMethod(bool nonPublic) 70public override MethodInfo[] GetOtherMethods(bool nonPublic) 75public override MethodInfo? GetRaiseMethod(bool nonPublic) 80public override MethodInfo? GetRemoveMethod(bool nonPublic)
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (5)
14public DelegatingMethodInfo(MethodInfo method) 106public MethodInfo UnderlyingMethod { get; } 108public override MethodInfo GetBaseDefinition() 133public override MethodInfo GetGenericMethodDefinition() 164public override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Context\Delegation\DelegatingModule.cs (2)
94protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 104public override MethodInfo[] GetMethods(BindingFlags bindingFlags)
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (3)
66public override MethodInfo[] GetAccessors(bool nonPublic) 71public override MethodInfo? GetGetMethod(bool nonPublic) 81public override MethodInfo? GetSetMethod(bool nonPublic)
System\Reflection\Context\Delegation\DelegatingType.cs (2)
353protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 361public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
System\Reflection\Context\Projection\ProjectingAssembly.cs (1)
49public override MethodInfo? EntryPoint
System\Reflection\Context\Projection\ProjectingEventInfo.cs (4)
43public override MethodInfo? GetAddMethod(bool nonPublic) 48public override MethodInfo[] GetOtherMethods(bool nonPublic) 53public override MethodInfo? GetRaiseMethod(bool nonPublic) 58public override MethodInfo? GetRemoveMethod(bool nonPublic)
System\Reflection\Context\Projection\ProjectingMethodInfo.cs (4)
14public ProjectingMethodInfo(MethodInfo method, Projector projector) 63public override MethodInfo GetBaseDefinition() 92public override MethodInfo GetGenericMethodDefinition() 108public override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Context\Projection\ProjectingModule.cs (2)
58protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 64public override MethodInfo[] GetMethods(BindingFlags bindingFlags)
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (3)
44public override MethodInfo[] GetAccessors(bool nonPublic) 49public override MethodInfo? GetGetMethod(bool nonPublic) 59public override MethodInfo? GetSetMethod(bool nonPublic)
System\Reflection\Context\Projection\ProjectingType.cs (3)
231MethodInfo[] methods = GetMethods(bindingAttr); 260protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 267public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
System\Reflection\Context\Projection\Projector.cs (2)
58public abstract MethodInfo? ProjectMethod(MethodInfo? value);
System\Reflection\Context\Virtual\InheritedMethodInfo.cs (1)
15public InheritedMethodInfo(MethodInfo baseMethod, Type reflectedType)
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (4)
36public override MethodInfo? GetGetMethod(bool nonPublic) 38MethodInfo? underlyingGetter = UnderlyingProperty.GetGetMethod(nonPublic); 45public override MethodInfo? GetSetMethod(bool nonPublic) 47MethodInfo? underlyingSetter = UnderlyingProperty.GetSetMethod(nonPublic);
System\Reflection\Context\Virtual\VirtualMethodBase.cs (3)
66public sealed override MethodInfo GetBaseDefinition() 76public sealed override MethodInfo GetGenericMethodDefinition() 92public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (8)
82public sealed override MethodInfo[] GetAccessors(bool nonPublic) 84MethodInfo? getMethod = GetGetMethod(nonPublic); 85MethodInfo? setMethod = GetSetMethod(nonPublic); 91return new MethodInfo[] { getMethod ?? setMethod! }; 94return new MethodInfo[] { getMethod, setMethod }; 104MethodInfo? getMethod = GetGetMethod(true); 113MethodInfo? setMethod = GetSetMethod(true); 209MethodInfo? method = GetGetMethod(true);
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (2)
44public override MethodInfo? GetGetMethod(bool nonPublic) 51public override MethodInfo? GetSetMethod(bool nonPublic)
System\Reflection\Context\Virtual\VirtualReturnParameter.cs (1)
9public VirtualReturnParameter(MethodInfo method)
System.Reflection.DispatchProxy (26)
System\Reflection\DispatchProxy.cs (1)
26protected abstract object? Invoke(MethodInfo? targetMethod, object?[]? args);
System\Reflection\DispatchProxyGenerator.cs (25)
51private static readonly MethodInfo s_dispatchProxyInvokeMethod = typeof(DispatchProxy).GetMethod("Invoke", BindingFlags.NonPublic | BindingFlags.Instance)!; 52private static readonly MethodInfo s_getTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle", new Type[] { typeof(RuntimeTypeHandle) })!; 53private static readonly MethodInfo s_makeGenericMethodMethod = GetGenericMethodMethodInfo(); 58private static MethodInfo GetGenericMethodMethodInfo() => 59typeof(MethodInfo).GetMethod("MakeGenericMethod", new Type[] { typeof(Type[]) })!; 83MethodInfo[] methodInfos) 91public MethodInfo[] MethodInfos { get; } 270private readonly List<MethodInfo> _methodInfos; 282_fields.Add(tb.DefineField("_methodInfos", typeof(MethodInfo[]), FieldAttributes.Private)); 284_methodInfos = new List<MethodInfo>(); 333var propertyMap = new Dictionary<MethodInfo, PropertyAccessorInfo>(); 343var eventMap = new Dictionary<MethodInfo, EventAccessorInfo>(); 355foreach (MethodInfo mi in iface.GetRuntimeMethods()) 422private MethodBuilder AddMethodImpl(MethodInfo mi, int methodInfoIndex) 490LocalBuilder methodInfoLocal = il.DeclareLocal(typeof(MethodInfo)); 776public MethodInfo? InterfaceGetMethod { get; } 777public MethodInfo? InterfaceSetMethod { get; } 781public PropertyAccessorInfo(MethodInfo? interfaceGetMethod, MethodInfo? interfaceSetMethod) 790public MethodInfo? InterfaceAddMethod { get; } 791public MethodInfo? InterfaceRemoveMethod { get; } 792public MethodInfo? InterfaceRaiseMethod { get; } 797public EventAccessorInfo(MethodInfo? interfaceAddMethod, MethodInfo? interfaceRemoveMethod, MethodInfo? interfaceRaiseMethod)
System.Reflection.Emit (79)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (7)
12internal static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst) 23internal readonly MethodInfo _method; 28internal MethodBuilderInstantiation(MethodInfo method, Type[] inst) 64public override MethodInfo GetGenericMethodDefinition() { return _method; } 89public override MethodInfo MakeGenericMethod(params Type[] arguments) 103public override MethodInfo GetBaseDefinition() { throw new NotSupportedException(); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
386protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 393public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
System\Reflection\Emit\ArrayMethod.cs (1)
79public override MethodInfo GetBaseDefinition() => this;
System\Reflection\Emit\EnumBuilderImpl.cs (2)
120public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(); 122protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder,
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (2)
107protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 109public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException();
System\Reflection\Emit\ILGeneratorImpl.cs (4)
598public override void Emit(OpCode opcode, MethodInfo meth) 621public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 639new KeyValuePair<MethodInfo, Type[]>(methodInfo, optionalParameterTypes)); 643private static int GetStackChange(OpCode opcode, MethodInfo methodInfo, Type voidType, Type[]? optionalParameterTypes)
System\Reflection\Emit\LocalBuilderImpl.cs (3)
11private readonly MethodInfo _method; 17internal LocalBuilderImpl(int index, Type type, MethodInfo method, bool isPinned) 27internal MethodInfo GetMethodBuilder() => _method;
System\Reflection\Emit\MethodBuilderImpl.cs (3)
268public override MethodInfo GetBaseDefinition() => this; 276public override MethodInfo GetGenericMethodDefinition() => !IsGenericMethod ? throw new InvalidOperationException() : this; 317public override MethodInfo MakeGenericMethod(params Type[] typeArguments) =>
System\Reflection\Emit\ModuleBuilderImpl.cs (20)
217foreach (List<(MethodInfo ifaceMethod, MethodInfo targetMethod)> mapList in typeBuilder._methodOverrides.Values) 219foreach ((MethodInfo ifaceMethod, MethodInfo targetMethod) pair in mapList) 619if (pair.Key is KeyValuePair<MethodInfo, Type[]> pair2) 756case MethodInfo method: 767method = (MethodInfo)GetOriginalMemberIfConstructedType(method); 782private EntityHandle GetMethodReference(MethodInfo methodInfo, Type[] optionalParameterTypes) 784MethodInfo method = (MethodInfo)GetOriginalMemberIfConstructedType(methodInfo); 786KeyValuePair<MethodInfo, BlobBuilder> pair = new(method, signature); 797private BlobBuilder GetMethodSignature(MethodInfo method, Type[]? optionalParameterTypes) => 1173public override int GetMethodMetadataToken(MethodInfo method) => GetTokenForHandle(TryGetMethodHandle(method)); 1175internal EntityHandle TryGetMethodHandle(MethodInfo method) 1191private bool IsArrayMethodTypeIsTypeBuilder(MethodInfo method) => method is ArrayMethod arrayMethod && 1194private bool IsConstructedFromMethodBuilderOrTypeBuilder(MethodInfo method) => method.IsConstructedGenericMethod && 1197internal EntityHandle TryGetMethodHandle(MethodInfo method, Type[] optionalParameterTypes) 1324protected override MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, 1347protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 1359public override MethodInfo[] GetMethods(BindingFlags bindingFlags)
System\Reflection\Emit\PropertyBuilderImpl.cs (7)
18private MethodInfo? _getMethod; 19private MethodInfo? _setMethod; 20internal HashSet<MethodInfo>? _otherMethods; 53_otherMethods ??= new HashSet<MethodInfo>(); 109public override MethodInfo? GetGetMethod(bool nonPublic) 124public override MethodInfo? GetSetMethod(bool nonPublic) 147public override MethodInfo[] GetAccessors(bool nonPublic) => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\TypeBuilderImpl.cs (28)
41internal Dictionary<Type, List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>>? _methodOverrides; 302protected override void DefineMethodOverrideCore(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration) 313if (_methodOverrides.TryGetValue(baseType, out List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>? im)) 324im = new List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>(); 678internal static BindingFlags GetBindingFlags(MethodInfo method) 773private MethodInfo[] GetMethods(string name, BindingFlags bindingAttr) 777MethodInfo[] candidates = GetMethods(bindingAttr); 778List<MethodInfo> methods = new List<MethodInfo>(); 779foreach (MethodInfo method in candidates) 791public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 795List<MethodInfo> methods = new List<MethodInfo>(); 813protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 818MethodInfo? found = null; 981MethodInfo? getMethod = property.GetMethod; 982MethodInfo? setMethod = property.SetMethod; 1169MethodInfo[] methods = []; 1254MethodInfo[] interfaceMethods = interfaceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); 1259InterfaceMethods = new MethodInfo[interfaceMethods.Length], 1260TargetMethods = new MethodInfo[interfaceMethods.Length] 1265MethodInfo interfaceMethod = interfaceMethods[i]; 1266MethodInfo? targetMethod = GetMethodImpl(interfaceMethod.Name, GetBindingFlags(interfaceMethod), null, interfaceMethod.CallingConvention, GetParameterTypes(interfaceMethod.GetParameters()), null); 1329MethodInfo[] methods = GetMethods(bindingAttr);
System.Reflection.MetadataLoadContext (104)
System\CoreRtBridge.cs (1)
69internal static int GetGenericParameterCount(this MethodInfo m)
System\Reflection\DefaultBinder.cs (1)
86if (!(candidates[i] is MethodInfo methodInfo))
System\Reflection\Runtime\BindingFlagSupport\EventPolicies.cs (6)
28MethodInfo? accessorMethod = GetAccessorMethod(member); 64MethodInfo? baseAccessor = GetAccessorMethod(baseMember!); 65MethodInfo? derivedAccessor = GetAccessorMethod(derivedMember!); 66return MemberPolicies<MethodInfo>.Default.ImplicitlyOverrides(baseAccessor, derivedAccessor); 74private static MethodInfo? GetAccessorMethod(EventInfo e) 76MethodInfo? accessor = e.AddMethod;
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (3)
79protected static bool AreNamesAndSignaturesEqual(MethodInfo method1, MethodInfo method2) 194else if (t.Equals(typeof(MethodInfo)))
System\Reflection\Runtime\BindingFlagSupport\MethodPolicies.cs (11)
12internal sealed class MethodPolicies : MemberPolicies<MethodInfo> 14public sealed override IEnumerable<MethodInfo> GetDeclaredMembers(TypeInfo typeInfo) 19public sealed override IEnumerable<MethodInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? filter, RuntimeTypeInfo reflectedType) 26public sealed override void GetMemberAttributes(MethodInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 35public sealed override bool ImplicitlyOverrides(MethodInfo? baseMember, MethodInfo? derivedMember) 43public sealed override bool IsSuppressedByMoreDerivedMember(MethodInfo member, MethodInfo[] priorMembers, int startIndex, int endIndex) 50MethodInfo prior = priorMembers[i]; 62public sealed override bool OkToIgnoreAmbiguity(MethodInfo m1, MethodInfo m2)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (10)
28MethodInfo? accessorMethod = GetMostAccessibleAccessor(member); 51MethodInfo? baseAccessor = GetAccessorMethod(baseMember!); 52MethodInfo? derivedAccessor = GetAccessorMethod(derivedMember!); 53return MemberPolicies<MethodInfo>.Default.ImplicitlyOverrides(baseAccessor, derivedAccessor); 62MethodInfo baseAccessor = GetAccessorMethod(member)!; 66MethodInfo derivedAccessor = GetAccessorMethod(prior)!; 84private static MethodInfo? GetAccessorMethod(PropertyInfo property) => 87private static MethodInfo? GetMostAccessibleAccessor(PropertyInfo property) 89MethodInfo? getter = property.GetMethod; 90MethodInfo? setter = property.SetMethod;
System\Reflection\Runtime\SignatureTypeExtensions.cs (1)
105internal static Type? TryResolveAgainstGenericMethod(this Type signatureType, MethodInfo genericMethod)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.cs (1)
36public sealed override MethodInfo? EntryPoint => GetEcmaManifestModule().ComputeEntryPoint(fileRefEntryPointAllowed: true);
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
165public abstract override MethodInfo? EntryPoint { get; }
System\Reflection\TypeLoading\Assemblies\RoStubAssembly.cs (1)
15public sealed override MethodInfo EntryPoint => throw null!;
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (4)
63public sealed override MethodInfo[] GetOtherMethods(bool nonPublic) 68List<MethodInfo> results = new List<MethodInfo>(capacity: count); 74MethodInfo methodInfo = others[i].ToMethod(GetRoDeclaringType(), GetRoDeclaringType());
System\Reflection\TypeLoading\Events\RoEvent.cs (4)
59public sealed override MethodInfo? GetAddMethod(bool nonPublic) => GetRoAddMethod()?.FilterAccessor(nonPublic); 60public sealed override MethodInfo? GetRemoveMethod(bool nonPublic) => GetRoRemoveMethod()?.FilterAccessor(nonPublic); 61public sealed override MethodInfo? GetRaiseMethod(bool nonPublic) => GetRoRaiseMethod()?.FilterAccessor(nonPublic); 71public abstract override MethodInfo[] GetOtherMethods(bool nonPublic);
System\Reflection\TypeLoading\General\Helpers.cs (2)
77public static MethodInfo? FilterAccessor(this MethodInfo accessor, bool nonPublic)
System\Reflection\TypeLoading\General\Sentinels.cs (2)
37public sealed override MethodInfo GetGenericMethodDefinition() => throw null!; 41public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw null!;
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (2)
49public sealed override MethodInfo GetGenericMethodDefinition() => _genericMethodDefinition; 52public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (2)
98public sealed override MethodInfo GetGenericMethodDefinition() => IsGenericMethodDefinition ? this : throw new InvalidOperationException(); // Very uninformative but compatible exception 101public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments)
System\Reflection\TypeLoading\Methods\RoMethod.cs (3)
98public abstract override MethodInfo GetGenericMethodDefinition(); 109public abstract override MethodInfo MakeGenericMethod(params Type[] typeArguments); 114public sealed override MethodInfo GetBaseDefinition() => throw new NotSupportedException(SR.NotSupported_GetBaseDefinition);
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (2)
86public sealed override MethodInfo GetGenericMethodDefinition() => throw new InvalidOperationException(); 88public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (4)
49internal MethodInfo? ComputeEntryPoint(bool fileRefEntryPointAllowed) 68return mdh.ResolveMethod<MethodInfo>(this, default); 114public sealed override MethodInfo[] GetMethods(BindingFlags bindingFlags) => GetModuleType().GetMethods(bindingFlags); 115protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => GetModuleType().InternalGetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers);
System\Reflection\TypeLoading\Modules\RoModule.cs (2)
72public abstract override MethodInfo[] GetMethods(BindingFlags bindingFlags); 73protected abstract override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers);
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (3)
48public sealed override MethodInfo[] GetMethods(BindingFlags bindingFlags) => Array.Empty<MethodInfo>(); 49protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => null;
System\Reflection\TypeLoading\Properties\RoProperty.cs (7)
93public sealed override MethodInfo? GetGetMethod(bool nonPublic) => GetRoGetMethod()?.FilterAccessor(nonPublic); 94public sealed override MethodInfo? GetSetMethod(bool nonPublic) => GetRoSetMethod()?.FilterAccessor(nonPublic); 108public sealed override MethodInfo[] GetAccessors(bool nonPublic) 110MethodInfo? getter = GetGetMethod(nonPublic); 111MethodInfo? setter = GetSetMethod(nonPublic); 119MethodInfo[] accessors = new MethodInfo[count];
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (11)
52public sealed override MethodInfo[] GetMethods(BindingFlags bindingAttr) => Query<MethodInfo>(bindingAttr).ToArray(); 54protected sealed override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 59protected sealed override MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 64private MethodInfo? GetMethodImplCommon(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 76return Query<MethodInfo>(name, bindingAttr).Disambiguate(); 81QueryResult<MethodInfo> queryResult = Query<MethodInfo>(name, bindingAttr); 82ListBuilder<MethodInfo> candidates = default; 83foreach (MethodInfo candidate in queryResult) 99return binder.SelectMethod(bindingAttr, candidates.ToArray(), types, modifiers) as MethodInfo;
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
43if ((results = QuerySpecificMemberTypeIfRequested(type, optionalName, bindingAttr, predicate, MemberTypes.Method, out QueryResult<MethodInfo> methods)) != null)
System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs (1)
90perNameCaches[MemberTypeIndex.Method] = new PerNameQueryCache<MethodInfo>(type, ignoreCase: ignoreCase, immediateTypeOnly: immediateTypeOnly);
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.BindingFlags.cs (1)
32internal sealed override IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType)
System\Reflection\TypeLoading\Types\RoArrayType.cs (1)
152internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType)
System\Reflection\TypeLoading\Types\RoByRefType.cs (2)
36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
140internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeMethods(filter, reflectedType, this);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (2)
237internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => SpecializeMethods(filter, reflectedType, this); 244internal abstract IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType);
System\Reflection\TypeLoading\Types\RoExceptionType.cs (1)
46internal sealed override IEnumerable<MethodInfo> SpecializeMethods(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!;
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (2)
211internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (2)
89internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoModifiedType.cs (1)
197internal override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
System\Reflection\TypeLoading\Types\RoPointerType.cs (2)
36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoStubType.cs (1)
78internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => throw null!;
System\Reflection\TypeLoading\Types\RoType.cs (2)
397internal abstract IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType); 404internal MethodInfo? InternalGetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
System.Reflection.TypeExtensions (19)
System\Reflection\TypeExtensions.cs (19)
218public static MethodInfo? GetMethod( 228public static MethodInfo? GetMethod( 239public static MethodInfo? GetMethod( 250public static MethodInfo[] GetMethods( 259public static MethodInfo[] GetMethods( 401public static MethodInfo? GetAddMethod(this EventInfo eventInfo) 409public static MethodInfo? GetAddMethod(this EventInfo eventInfo, bool nonPublic) 417public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo) 425public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo, bool nonPublic) 433public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo) 441public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo, bool nonPublic) 517public static MethodInfo GetBaseDefinition(this MethodInfo method) 549public static MethodInfo[] GetAccessors(this PropertyInfo property) 557public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic) 565public static MethodInfo? GetGetMethod(this PropertyInfo property) 573public static MethodInfo? GetGetMethod(this PropertyInfo property, bool nonPublic) 581public static MethodInfo? GetSetMethod(this PropertyInfo property) 589public static MethodInfo? GetSetMethod(this PropertyInfo property, bool nonPublic)
System.Resources.Extensions (12)
System\Resources\Extensions\BinaryFormat\SerializationEvents.cs (12)
18private readonly List<MethodInfo>? _onDeserializingMethods; 19private readonly List<MethodInfo>? _onDeserializedMethods; 24List<MethodInfo>? onDeserializingMethods, 25List<MethodInfo>? onDeserializedMethods) 39List<MethodInfo>? onDeserializingMethods = GetMethodsWithAttribute(typeof(OnDeserializingAttribute), type); 40List<MethodInfo>? onDeserializedMethods = GetMethodsWithAttribute(typeof(OnDeserializedAttribute), type); 47private static List<MethodInfo>? GetMethodsWithAttribute( 52List<MethodInfo>? attributedMethods = null; 58MethodInfo[] methods = baseType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 59foreach (MethodInfo method in methods) 94private static Action<StreamingContext>? AddOnDelegate(object obj, List<MethodInfo>? methods) 100foreach (MethodInfo method in methods)
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
492[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodInfo))]
System.Runtime.InteropServices (7)
System\Runtime\InteropServices\ComAwareEventInfo.cs (5)
66public override MethodInfo? GetAddMethod(bool nonPublic) => _innerEventInfo.GetAddMethod(nonPublic); 68public override MethodInfo[] GetOtherMethods(bool nonPublic) => _innerEventInfo.GetOtherMethods(nonPublic); 70public override MethodInfo? GetRaiseMethod(bool nonPublic) => _innerEventInfo.GetRaiseMethod(nonPublic); 72public override MethodInfo? GetRemoveMethod(bool nonPublic) => _innerEventInfo.GetRemoveMethod(nonPublic); 119MethodInfo methodInfo = sourceInterface.GetMethod(eventInfo.Name)!;
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (2)
84foreach (MethodInfo method in iface.GetMethods()) 188internal static readonly MethodInfo GetRuntimeCallableWrapperMethod = typeof(IComImportAdapter).GetMethod(nameof(GetRuntimeCallableWrapper))!;
System.Runtime.InteropServices.JavaScript (8)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.CoreCLR.cs (2)
28MethodInfo? registerMethod = generatedInitializerType.GetMethod("__Register_", BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null); 56var wrapperInfo = clazz.GetMethod(wrapperName, BindingFlags.Static | BindingFlags.NonPublic);
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (6)
17private static MethodInfo? s_taskGetResultMethodInfo; 27MethodInfo method = GetTaskResultMethodInfo(type); 49public static MethodInfo GetTaskResultMethodInfo(Type taskType) 57MethodInfo? getter = taskType.GetMethod(TaskGetResultName); 214MethodInfo? method = MethodBase.GetMethodFromHandle(methodHandle) as MethodInfo;
System.Runtime.Serialization.Formatters (12)
System\Runtime\Serialization\SerializationEventsCache.cs (12)
14private readonly List<MethodInfo>? _onSerializingMethods; 15private readonly List<MethodInfo>? _onSerializedMethods; 16private readonly List<MethodInfo>? _onDeserializingMethods; 17private readonly List<MethodInfo>? _onDeserializedMethods; 27private List<MethodInfo>? GetMethodsWithAttribute( 32List<MethodInfo>? mi = null; 39MethodInfo[] mis = baseType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 40foreach (MethodInfo m in mis) 45mi ??= new List<MethodInfo>(); 75private static void InvokeOnDelegate(object obj, StreamingContext context, List<MethodInfo>? methods) 82private static SerializationEventHandler? AddOnDelegate(object obj, SerializationEventHandler? handler, List<MethodInfo>? methods) 86foreach (MethodInfo m in methods)
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
321MethodInfo validationMethod = formatValidator.Method;
System.ServiceModel.NetNamedPipe.Tests (1)
NetNamedPipeBindingTest.cs (1)
21MethodInfo m = t.GetMethod("BuildSharedMemoryName", BindingFlags.Static | BindingFlags.Public);
System.ServiceModel.Primitives (90)
Extensions\ReflectionExtensions.cs (4)
107public static MethodInfo GetMethod(this Type type, string name) 112public static MethodInfo GetMethod(this Type type, string name, Type[] types) 226public static RuntimeMethodHandle MethodHandle(this MethodInfo mi) 230public static Type ReflectedType(this MethodInfo mi)
System\ServiceModel\Channels\ServiceChannelProxy.cs (6)
126protected override object Invoke(MethodInfo targetMethod, object[] args) 284private static MethodInfo s_createTcsOpenGenericMethod = typeof(TaskCompletionSourceInfo).GetMethod(nameof(CreateTaskCompletionSource), BindingFlags.Static | BindingFlags.NonPublic); 301public MethodInfo TrySetResultMethod { get; private set; } 302public MethodInfo TrySetExceptionMethod { get; set; } 303public MethodInfo TrySetCanceledMethod { get; set; } 309var createTcsGenericMethod = s_createTcsOpenGenericMethod.MakeGenericMethod(ResultType);
System\ServiceModel\Description\OperationDescription.cs (6)
20private MethodInfo _taskMethod; 60public MethodInfo TaskMethod 68public MethodInfo SyncMethod { get; set; } 72public MethodInfo BeginMethod { get; set; } 74internal MethodInfo OperationMethod 98public MethodInfo EndMethod { get; set; }
System\ServiceModel\Description\ServiceReflector.cs (31)
396static internal Type GetOperationContractProviderType(MethodInfo method) 427foreach (MethodInfo method in GetMethodsInternal(service)) 519MethodInfo method = attrProvider as MethodInfo; 535method = param.Member as MethodInfo; 664private static List<MethodInfo> GetMethodsInternal(Type interfaceType) 666List<MethodInfo> methods = new List<MethodInfo>(); 667foreach (MethodInfo mi in interfaceType.GetRuntimeMethods().Where(m => !m.IsStatic)) 693static internal void ValidateParameterMetadata(MethodInfo methodInfo) 729static internal ParameterInfo[] GetInputParameters(MethodInfo method, bool asyncPattern) 765static internal ParameterInfo[] GetOutputParameters(MethodInfo method, bool asyncPattern) 800static internal bool HasOutputParameters(MethodInfo method, bool asyncPattern) 823private static MethodInfo GetEndMethodInternal(MethodInfo beginMethod) 827MethodInfo[] endMethods = beginMethod.DeclaringType.GetTypeInfo().GetDeclaredMethods(endMethodName).ToArray(); 836return (MethodInfo)endMethods[0]; 839static internal MethodInfo GetEndMethod(MethodInfo beginMethod) 841MethodInfo endMethod = GetEndMethodInternal(beginMethod); 851static internal XmlName GetOperationName(MethodInfo method) 858static internal bool HasBeginMethodShape(MethodInfo method) 872static internal bool IsBegin(OperationContractAttribute opSettings, MethodInfo method) 886static internal bool IsTask(MethodInfo method) 899static internal bool IsTask(MethodInfo method, out Type taskTResult) 918static internal bool HasEndMethodShape(MethodInfo method) 930internal static OperationContractAttribute GetOperationContractAttribute(MethodInfo method) 945static internal bool IsBegin(MethodInfo method) 956static internal string GetLogicalName(MethodInfo method) 963static internal string GetLogicalName(MethodInfo method, bool isAsync, bool isTask) 979static internal bool HasNoDisposableParameters(MethodInfo methodInfo)
System\ServiceModel\Description\TypeLoader.cs (21)
135foreach (MethodInfo methodInfo in aParentType.GetRuntimeMethods().Where(m => !m.IsStatic)) 282MethodInfo opMethod = operationDescription.OperationMethod; 371if (type == null && provider is MethodInfo providerAsMethod) 376MethodInfo method = type.GetRuntimeMethod(knownTypeAttribute.MethodName, s_knownTypesMethodParamType); 421MethodInfo opMethod = opDesc.OperationMethod; 438private void ProcessOpMethod(MethodInfo opMethod, bool canHaveBehaviors, 442MethodInfo method = null; 445MethodInfo ifaceMethod = GetCorrespondingMethodFromType(ifaceType, opMethod); 450MethodInfo implMethod = GetCorrespondingMethodFromType(implType, opMethod); 515private static MethodInfo GetCorrespondingMethodFromType(Type type, MethodInfo methodInfo) 525MethodInfo matchingMethod = type.GetTypeInfo().DeclaredMethods.SingleOrDefault(m => MethodsMatch(m, methodInfo)); 530private static bool MethodsMatch(MethodInfo method1, MethodInfo method2) 700foreach (MethodInfo methodInfo in contractToGetMethodsFrom.GetRuntimeMethods().Where(m => !m.IsStatic)) 860private OperationDescription CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, 1037MethodInfo outputMethod = methodInfo; 1142private MessageDescription CreateMessageDescription(MethodInfo methodInfo, 1354MethodInfo getMethod = property.GetGetMethod(true); 1359MethodInfo setMethod = property.GetSetMethod(true); 1450private static bool IsMethodOverriding(MethodInfo method)
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
294MethodInfo methodInfo = operation.OperationMethod;
System\ServiceModel\Diagnostics\TraceUtility.cs (1)
480internal static void TraceUserCodeException(Exception e, MethodInfo method)
System\ServiceModel\Dispatcher\ClientOperation.cs (8)
40private MethodInfo _beginMethod; 41private MethodInfo _endMethod; 42private MethodInfo _syncMethod; 43private MethodInfo _taskMethod; 66public MethodInfo BeginMethod 79public MethodInfo EndMethod 92public MethodInfo SyncMethod 228public MethodInfo TaskMethod
System\ServiceModel\Dispatcher\InvokerUtil.cs (3)
35internal InvokeDelegate GenerateInvokeDelegate(MethodInfo method, out int inputParameterCount, 48internal InvokeDelegate GenerateInvokeDelegate(MethodInfo method, out int inputParameterCount, out int outputParameterCount) 106internal InvokeDelegate GenerateInvokeDelegateInternalWithExpressions(MethodInfo method, out int inputParameterCount, out int outputParameterCount)
System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (3)
24private MethodInfo _beginMethod; 25private MethodInfo _syncMethod; 26private MethodInfo _taskMethod;
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (2)
21public SyncMethodInvoker(MethodInfo method) 26public MethodInfo Method { get; }
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (3)
22private MethodInfo _taskTResultGetMethod; 25public TaskMethodInvoker(MethodInfo taskMethod, Type taskType) 36public MethodInfo Method { get; }
System\ServiceModel\OperationContractAttribute.cs (1)
102internal void EnsureInvariants(MethodInfo methodInfo, string operationName)
System.ServiceModel.Primitives.Tests (1)
Security\SecurityUtilsTest.cs (1)
20MethodInfo method = t.GetMethod("FixNetworkCredential", BindingFlags.NonPublic | BindingFlags.Static,
System.Speech (13)
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (7)
42MethodInfo? onInit = _grammarType.GetMethod(method, types); 64MethodInfo? onRecognition = _grammarType.GetMethod(method, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 81GetRuleInstance(rule, method, out MethodInfo? onParse, out System.Speech.Recognition.Grammar grammar); 98GetRuleInstance(rule, method, out MethodInfo? onError, out System.Speech.Recognition.Grammar grammar); 137private void GetRuleInstance(string rule, string method, out MethodInfo? onParse, out System.Speech.Recognition.Grammar grammar) 175MethodInfo[] mis = _grammarType.GetMethods(); 245private static string FormatConstructorParameters(MethodInfo[] cis, string method)
Recognition\Grammar.cs (2)
562internal MethodInfo? MethodInfo(string method) 1014MethodInfo? onInit = GetType().GetMethod(methodName, types);
Result\RecognizedPhrase.cs (4)
891MethodInfo? onParse; 935MethodInfo? onError; 980MethodInfo onRecognition = grammarType.GetMethod(script._sMethod, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)!; 993private static void GetRuleInstance(Grammar grammar, string rule, string method, out MethodInfo onParse, out Grammar? ruleInstance)
System.Text.Json (67)
src\runtime\src\libraries\Common\src\Polyfills\ReflectionPolyfills.cs (2)
6/// <summary>Provides downlevel polyfills for instance methods on <see cref="MethodInfo"/>.</summary> 9extension(MethodInfo method)
System\ReflectionExtensions.cs (1)
124public static object? InvokeNoWrapExceptions(this MethodInfo methodInfo, object? obj, object?[]? parameters)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactoryHelpers.cs (6)
22public static MethodInfo GetImmutableEnumerableCreateRangeMethod(this Type type, Type elementType) 27MethodInfo[] constructingTypeMethods = constructingType.GetMethods(); 28foreach (MethodInfo method in constructingTypeMethods) 46public static MethodInfo GetImmutableDictionaryCreateRangeMethod(this Type type, Type keyType, Type valueType) 51MethodInfo[] constructingTypeMethods = constructingType.GetMethods(); 52foreach (MethodInfo method in constructingTypeMethods)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
895MethodInfo? getMethod = propertyInfo.GetMethod; 901MethodInfo? setMethod = propertyInfo.SetMethod;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (8)
276KeyValuePair<Type, MethodInfo>[]? entries = PopulateTryGetValueMethods(); 291KeyValuePair<Type, MethodInfo>[]? PopulateTryGetValueMethods() 293Dictionary<Type, MethodInfo>? methodsByCaseType = null; 296MethodInfo method = (MethodInfo)member; 333KeyValuePair<Type, MethodInfo>[] orderedEntries = new KeyValuePair<Type, MethodInfo>[orderedCaseTypes.Length]; 337orderedEntries[i] = new KeyValuePair<Type, MethodInfo>(caseType, methodsByCaseType[caseType]);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (26)
48private readonly MethodInfo? _sourceConstructFlagsGetter; 56private readonly MethodInfo? _fsharpListCtor; 57private readonly MethodInfo? _fsharpSetCtor; 58private readonly MethodInfo? _fsharpMapCtor; 61private readonly MethodInfo? _getUnionCases; 62private readonly MethodInfo? _preComputeUnionTagReader; 63private readonly MethodInfo? _preComputeUnionReader; 64private readonly MethodInfo? _preComputeUnionConstructor; 65private readonly MethodInfo? _unionCaseInfoNameGetter; 66private readonly MethodInfo? _unionCaseInfoTagGetter; 67private readonly MethodInfo? _unionCaseInfoGetFields; 68private readonly MethodInfo? _unionCaseInfoGetCustomAttributes; 183MethodInfo getUnionCases = EnsureMemberExists(_getUnionCases, "Microsoft.FSharp.Reflection.FSharpType.GetUnionCases(Type, BindingFlags?)"); 184MethodInfo preComputeUnionReader = EnsureMemberExists(_preComputeUnionReader, "Microsoft.FSharp.Reflection.FSharpValue.PreComputeUnionReader(UnionCaseInfo, BindingFlags?)"); 185MethodInfo preComputeUnionConstructor = EnsureMemberExists(_preComputeUnionConstructor, "Microsoft.FSharp.Reflection.FSharpValue.PreComputeUnionConstructor(UnionCaseInfo, BindingFlags?)"); 186MethodInfo nameGetter = EnsureMemberExists(_unionCaseInfoNameGetter, "Microsoft.FSharp.Reflection.UnionCaseInfo.get_Name()"); 187MethodInfo tagGetter = EnsureMemberExists(_unionCaseInfoTagGetter, "Microsoft.FSharp.Reflection.UnionCaseInfo.get_Tag()"); 188MethodInfo getFields = EnsureMemberExists(_unionCaseInfoGetFields, "Microsoft.FSharp.Reflection.UnionCaseInfo.GetFields()"); 189MethodInfo getCustomAttributes = EnsureMemberExists(_unionCaseInfoGetCustomAttributes, "Microsoft.FSharp.Reflection.UnionCaseInfo.GetCustomAttributes()"); 236MethodInfo preComputeUnionTagReader = EnsureMemberExists(_preComputeUnionTagReader, "Microsoft.FSharp.Reflection.FSharpValue.PreComputeUnionTagReader(Type, BindingFlags?)"); 248MethodInfo valueGetter = EnsureMemberExists(typeof(TFSharpOption).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance), "Microsoft.FSharp.Core.FSharpOption<T>.get_Value()"); 257MethodInfo methodInfo = EnsureMemberExists(typeof(TFSharpOption).GetMethod("Some", BindingFlags.Public | BindingFlags.Static), "Microsoft.FSharp.Core.FSharpOption<T>.Some(T value)"); 267MethodInfo valueGetter = EnsureMemberExists(typeof(TFSharpValueOption).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance), "Microsoft.FSharp.Core.FSharpValueOption<T>.get_Value()"); 276MethodInfo methodInfo = EnsureMemberExists(typeof(TFSharpOption).GetMethod("Some", BindingFlags.Public | BindingFlags.Static), "Microsoft.FSharp.Core.FSharpValueOption<T>.ValueSome(T value)"); 328private static TDelegate CreateDelegate<TDelegate>(MethodInfo methodInfo) where TDelegate : Delegate 338MethodInfo invokeMethod = fsharpFunc.GetType().GetMethod("Invoke", BindingFlags.Public | BindingFlags.Instance)!;
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (1)
74public abstract UnionTryGetValueAccessor<TUnion> CreateUnionTryGetValueAccessor<TUnion>(IReadOnlyList<KeyValuePair<Type, MethodInfo>> entries);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (1)
86public override UnionTryGetValueAccessor<TUnion> CreateUnionTryGetValueAccessor<TUnion>(IReadOnlyList<KeyValuePair<Type, MethodInfo>> entries) =>
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (11)
342MethodInfo realMethod = (collectionType.GetMethod("Push") ?? collectionType.GetMethod("Enqueue"))!; 367MethodInfo realMethod = collectionType.GetImmutableEnumerableCreateRangeMethod(elementType); 391MethodInfo realMethod = collectionType.GetImmutableDictionaryCreateRangeMethod(keyType, valueType); 417MethodInfo? realMethod = propertyInfo.GetMethod; 460MethodInfo? realMethod = propertyInfo.GetMethod; 514MethodInfo? realMethod = propertyInfo.SetMethod; 612public override UnionTryGetValueAccessor<TUnion> CreateUnionTryGetValueAccessor<TUnion>(IReadOnlyList<KeyValuePair<Type, MethodInfo>> entries) => 615private static DynamicMethod CreateUnionTryGetValueAccessor(Type unionType, IReadOnlyList<KeyValuePair<Type, MethodInfo>> entries) 637KeyValuePair<Type, MethodInfo> entry = entries[i]; 639MethodInfo method = entry.Value; 693private static readonly MethodInfo s_getTypeFromHandleMethod =
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (9)
157MethodInfo addMethod = (collectionType.GetMethod("Push") ?? collectionType.GetMethod("Enqueue"))!; 168MethodInfo createRange = typeof(TCollection).GetImmutableEnumerableCreateRangeMethod(typeof(TElement)); 175MethodInfo createRange = typeof(TCollection).GetImmutableDictionaryCreateRangeMethod(typeof(TKey), typeof(TValue)); 182MethodInfo getMethodInfo = propertyInfo.GetMethod!; 195MethodInfo getMethodInfo = propertyInfo.GetMethod!; 210MethodInfo setMethodInfo = propertyInfo.SetMethod!; 232public override UnionTryGetValueAccessor<TUnion> CreateUnionTryGetValueAccessor<TUnion>(IReadOnlyList<KeyValuePair<Type, MethodInfo>> entries) 243KeyValuePair<Type, MethodInfo> entry = entries[i]; 272private static UnionTryGetValueAccessor<TUnion> CreateUnionTryGetValueAccessorCore<TUnion, TCase>(MethodInfo method)
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
854MethodInfo? getter = typeof(ITypeSymbol).GetProperty("IsClosed")?.GetMethod;
System.Text.RegularExpressions (83)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
201MethodInfo addMethod = typeof(Hashtable).GetMethod(nameof(Hashtable.Add), BindingFlags.Public | BindingFlags.Instance)!;
System\Text\RegularExpressions\RegexCompiler.cs (82)
31private static MethodInfo CaptureMethod => field ??= RegexRunnerMethod("Capture"); 32private static MethodInfo TransferCaptureMethod => field ??= RegexRunnerMethod("TransferCapture"); 33private static MethodInfo UncaptureMethod => field ??= RegexRunnerMethod("Uncapture"); 34private static MethodInfo IsMatchedMethod => field ??= RegexRunnerMethod("IsMatched"); 35private static MethodInfo MatchLengthMethod => field ??= RegexRunnerMethod("MatchLength"); 36private static MethodInfo MatchIndexMethod => field ??= RegexRunnerMethod("MatchIndex"); 37private static MethodInfo IsBoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsBoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 38private static MethodInfo IsPreWordCharBoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsPreWordCharBoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 39private static MethodInfo IsPostWordCharBoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsPostWordCharBoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 40private static MethodInfo IsWordCharMethod => field ??= RegexRunnerMethod("IsWordChar"); 41private static MethodInfo IsECMABoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsECMABoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 42private static MethodInfo CrawlposMethod => field ??= RegexRunnerMethod("Crawlpos"); 43private static MethodInfo CharInClassMethod => field ??= RegexRunnerMethod("CharInClass"); 44private static MethodInfo CheckTimeoutMethod => field ??= RegexRunnerMethod("CheckTimeout"); 46private static MethodInfo RegexCaseEquivalencesTryFindCaseEquivalencesForCharWithIBehaviorMethod => field ??= typeof(RegexCaseEquivalences).GetMethod("TryFindCaseEquivalencesForCharWithIBehavior", BindingFlags.Static | BindingFlags.Public)!; 47private static MethodInfo CharIsDigitMethod => field ??= typeof(char).GetMethod("IsDigit", [typeof(char)])!; 48private static MethodInfo CharIsWhiteSpaceMethod => field ??= typeof(char).GetMethod("IsWhiteSpace", [typeof(char)])!; 49private static MethodInfo CharIsControlMethod => field ??= typeof(char).GetMethod("IsControl", [typeof(char)])!; 50private static MethodInfo CharIsLetterMethod => field ??= typeof(char).GetMethod("IsLetter", [typeof(char)])!; 51private static MethodInfo CharIsAsciiDigitMethod => field ??= typeof(char).GetMethod("IsAsciiDigit", [typeof(char)])!; 52private static MethodInfo CharIsAsciiLetterMethod => field ??= typeof(char).GetMethod("IsAsciiLetter", [typeof(char)])!; 53private static MethodInfo CharIsAsciiLetterLowerMethod => field ??= typeof(char).GetMethod("IsAsciiLetterLower", [typeof(char)])!; 54private static MethodInfo CharIsAsciiLetterUpperMethod => field ??= typeof(char).GetMethod("IsAsciiLetterUpper", [typeof(char)])!; 55private static MethodInfo CharIsAsciiLetterOrDigitMethod => field ??= typeof(char).GetMethod("IsAsciiLetterOrDigit", [typeof(char)])!; 56private static MethodInfo CharIsAsciiHexDigitMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigit", [typeof(char)])!; 57private static MethodInfo CharIsAsciiHexDigitLowerMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigitLower", [typeof(char)])!; 58private static MethodInfo CharIsAsciiHexDigitUpperMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigitUpper", [typeof(char)])!; 59private static MethodInfo CharIsLetterOrDigitMethod => field ??= typeof(char).GetMethod("IsLetterOrDigit", [typeof(char)])!; 60private static MethodInfo CharIsLowerMethod => field ??= typeof(char).GetMethod("IsLower", [typeof(char)])!; 61private static MethodInfo CharIsUpperMethod => field ??= typeof(char).GetMethod("IsUpper", [typeof(char)])!; 62private static MethodInfo CharIsNumberMethod => field ??= typeof(char).GetMethod("IsNumber", [typeof(char)])!; 63private static MethodInfo CharIsPunctuationMethod => field ??= typeof(char).GetMethod("IsPunctuation", [typeof(char)])!; 64private static MethodInfo CharIsSeparatorMethod => field ??= typeof(char).GetMethod("IsSeparator", [typeof(char)])!; 65private static MethodInfo CharIsSymbolMethod => field ??= typeof(char).GetMethod("IsSymbol", [typeof(char)])!; 66private static MethodInfo CharGetUnicodeInfoMethod => field ??= typeof(char).GetMethod("GetUnicodeCategory", [typeof(char)])!; 67private static MethodInfo SpanGetItemMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("get_Item", [typeof(int)])!; 68private static MethodInfo SpanGetLengthMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("get_Length")!; 69private static MethodInfo SpanIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 70private static MethodInfo SpanIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 71private static MethodInfo SpanIndexOfSpanStringComparisonMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!; 72private static MethodInfo SpanIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 73private static MethodInfo SpanIndexOfAnyCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 74private static MethodInfo SpanIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 75private static MethodInfo SpanIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 76private static MethodInfo SpanIndexOfAnySearchValuesStringMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<char>), typeof(SearchValues<string>)])!; 77private static MethodInfo SpanIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 78private static MethodInfo SpanIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 79private static MethodInfo SpanIndexOfAnyExceptCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 80private static MethodInfo SpanIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 81private static MethodInfo SpanIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 82private static MethodInfo SpanIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 83private static MethodInfo SpanIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 84private static MethodInfo SpanLastIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 85private static MethodInfo SpanLastIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 86private static MethodInfo SpanLastIndexOfAnyCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 87private static MethodInfo SpanLastIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 88private static MethodInfo SpanLastIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 89private static MethodInfo SpanLastIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 90private static MethodInfo SpanLastIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 91private static MethodInfo SpanLastIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 92private static MethodInfo SpanLastIndexOfAnyExceptCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 93private static MethodInfo SpanLastIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 94private static MethodInfo SpanLastIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 95private static MethodInfo SpanLastIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 96private static MethodInfo SpanLastIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 97private static MethodInfo SpanSliceIntMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("Slice", [typeof(int)])!; 98private static MethodInfo SpanSliceIntIntMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("Slice", [typeof(int), typeof(int)])!; 99private static MethodInfo SpanStartsWithSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 100private static MethodInfo SpanStartsWithSpanComparisonMethod => field ??= typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!; 101private static MethodInfo SpanSequenceEqualSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("SequenceEqual", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 102private static MethodInfo StringAsSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("AsSpan", [typeof(string)])!; 103private static MethodInfo StringGetCharsMethod => field ??= typeof(string).GetMethod("get_Chars", [typeof(int)])!; 104private static MethodInfo ArrayResizeMethod => field ??= typeof(Array).GetMethod("Resize")!.MakeGenericMethod(typeof(int)); 105private static MethodInfo MathMinIntIntMethod => field ??= typeof(Math).GetMethod("Min", [typeof(int), typeof(int)])!; 106private static MethodInfo MemoryMarshalGetArrayDataReferenceSearchValuesMethod => field ??= typeof(MemoryMarshal).GetMethod("GetArrayDataReference", [Type.MakeGenericMethodParameter(0).MakeArrayType()])!.MakeGenericMethod(typeof(SearchValues<char>))!; 107private static MethodInfo UnsafeAsMethod => field ??= typeof(Unsafe).GetMethod("As", [typeof(object)])!; 132private static MethodInfo RegexRunnerMethod(string methname) => typeof(RegexRunner).GetMethod(methname, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)!; 257protected void Callvirt(MethodInfo mt) => _ilg!.Emit(OpCodes.Callvirt, mt); 260protected void Call(MethodInfo mt) => _ilg!.Emit(OpCodes.Call, mt); 5667protected void EmitScan(RegexOptions options, MethodInfo tryFindNextStartingPositionMethod, MethodInfo tryMatchAtCurrentPositionMethod) 6541static MethodInfo MakeUnsafeAs(Type type)
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
1477MethodInfo method = type.GetMethod("PopMenuMode", BindingFlags.NonPublic | BindingFlags.Instance);
System.Windows.Forms (4)
System\Windows\Forms\Accessibility\AccessibleObject.cs (3)
2905MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) 2909MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr) 2913MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr)
System\Windows\Forms\Internal\Formatter.cs (1)
448MethodInfo? methodInfo = targetType.GetMethod(
System.Windows.Forms.Design (32)
System\ComponentModel\Design\DesignerActionList.cs (3)
29ReadOnlyCollection<MethodInfo> originalMethods = Array.AsReadOnly( 35MethodInfo[] methods = GetType().GetMethods(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public); 36foreach (MethodInfo info in methods)
System\ComponentModel\Design\DesignerActionMethodItem.cs (1)
11private MethodInfo? _methodInfo;
System\ComponentModel\Design\DesignerHost.cs (3)
1197MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => 1201MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethod(name, bindingAttr); 1204MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethods(bindingAttr);
System\ComponentModel\Design\InheritanceService.cs (2)
166else if (member is MethodInfo mi) 237else if (member is MethodInfo method)
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (1)
45foreach (MethodInfo method in TypeDescriptor.GetReflectionType(collection).GetMethods(BindingFlags.Public | BindingFlags.Instance))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
115MethodInfo?[]? accessors = prop?.GetAccessors(true); 116if (accessors is not [MethodInfo methodInfo, ..])
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
726MethodInfo? delegateInvoke = type.GetMethod("Invoke"); 736MethodInfo? mi = GetReflectionTypeHelper(manager, target).GetMethod(methodRef.MethodName, paramTypes); 2001else if (descriptor.MemberInfo is MethodInfo methodInfo)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (13)
109protected bool MethodSupportsSerialization(MethodInfo method) 228private static MethodInfo? ChooseMethodByType(TypeDescriptionProvider provider, List<MethodInfo> methods, ICollection values) 233MethodInfo? final = null; 238MethodInfo? candidate = null; 242foreach (MethodInfo method in methods) 328MethodInfo[] methods = provider.GetReflectionType(originalCollection).GetMethods(BindingFlags.Public | BindingFlags.Instance); 329List<MethodInfo> addRangeMethods = []; 330List<MethodInfo> addMethods = []; 331foreach (MethodInfo method in methods) 354MethodInfo? addRangeMethodToUse = ChooseMethodByType(provider, addRangeMethods, valuesToSerialize); 363MethodInfo? addMethodToUse = ChooseMethodByType(provider, addMethods, valuesToSerialize); 675MethodInfo? clearMethod = TypeDescriptor.GetReflectionType(collection).GetMethod("Clear", BindingFlags.Public | BindingFlags.Instance, null, [], null);
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
135MethodInfo? method = prop.GetGetMethod();
System\Windows\Forms\Design\DocumentDesigner.DocumentInheritanceService.cs (2)
32MethodInfo? method = member as MethodInfo;
System\Windows\Forms\Design\LabelDesigner.cs (1)
69MethodInfo? info = type.GetMethod("GetLeadingTextPaddingFromTextFormatFlags", BindingFlags.Instance | BindingFlags.NonPublic);
System.Xaml (190)
System\Xaml\Runtime\ClrObjectRuntime.cs (6)
110MethodInfo method = GetFactoryMethod(type, methodName, args, BindingFlags.Public | BindingFlags.Static); 114protected MethodInfo GetFactoryMethod(Type type, string methodName, object[] args, BindingFlags flags) 116MethodInfo factory = null; 133factory = (MethodInfo)BindToMethod(flags, methods, args); 397var openMethod = typeof(ClrObjectRuntime).GetMethod( 399var method = openMethod.MakeGenericMethod(new Type[] { keyType, itemType });
System\Xaml\Runtime\DynamicMethodRuntime.cs (18)
31private static MethodInfo s_GetTypeFromHandleMethod; 32private static MethodInfo s_InvokeMemberMethod; 56private Dictionary<MethodInfo, PropertyGetDelegate> _propertyGetDelegates; 57private Dictionary<MethodInfo, PropertySetDelegate> _propertySetDelegates; 63private Dictionary<MethodInfo, PropertyGetDelegate> PropertyGetDelegates 69_propertyGetDelegates = new Dictionary<MethodInfo, PropertyGetDelegate>(); 76private Dictionary<MethodInfo, PropertySetDelegate> PropertySetDelegates 82_propertySetDelegates = new Dictionary<MethodInfo, PropertySetDelegate>(); 227MethodInfo factory = GetFactoryMethod(type, methodName, args, BF_AllStaticMembers); 240MethodInfo getter = member.Invoker.UnderlyingGetter; 258MethodInfo setter = member.Invoker.UnderlyingSetter; 282MethodInfo helper = targetType.GetMethod(KnownStrings.CreateDelegateHelper, 318MethodInfo method = typeof(Delegate).GetMethod(KnownStrings.CreateDelegate, 341private FactoryDelegate CreateFactoryDelegate(MethodInfo factory) 421private PropertyGetDelegate CreateGetDelegate(MethodInfo getter) 439private PropertySetDelegate CreateSetDelegate(MethodInfo setter) 472private Type GetTargetType(MethodInfo instanceMethod) 501private static void Emit_Call(ILGenerator ilGenerator, MethodInfo method)
System\Xaml\Schema\CollectionReflector.cs (28)
16private static MethodInfo s_getEnumeratorMethod; 17private static MethodInfo s_listAddMethod; 18private static MethodInfo s_dictionaryAddMethod; 29internal static XamlCollectionKind LookupCollectionKind(Type type, out MethodInfo addMethod) 82internal static MethodInfo LookupAddMethod(Type type, XamlCollectionKind collectionKind) 84MethodInfo result = null; 110private static bool TryGetICollectionAdder(Type type, out MethodInfo addMethod) 128private static bool TryGetCollectionAdder(Type type, bool mayBeICollection, out MethodInfo addMethod) 175private static bool TryGetIDictionaryAdder(Type type, out MethodInfo addMethod) 193private static bool TryGetDictionaryAdder(Type type, bool mayBeIDictionary, out MethodInfo addMethod) 238internal static MethodInfo GetAddMethod(Type type, Type contentType) 243internal static MethodInfo GetEnumeratorMethod(Type type) 255internal static MethodInfo GetIsReadOnlyMethod(Type collectionType, Type itemType) 260MethodInfo isReadOnlyMethod = genericICollection.GetProperty(KnownStrings.IsReadOnly).GetGetMethod(); 267private static MethodInfo LookupEnumeratorMethod(Type type) 269MethodInfo result = GetMethod(type, KnownStrings.GetEnumerator, Type.EmptyTypes); 305private static MethodInfo GetAddMethod(Type type, int paramCount, out bool hasMoreThanOne) 307MethodInfo result = null; 313MethodInfo method = (MethodInfo)mi; 353private static MethodInfo GetMethod(Type type, string name, Type[] argTypes) 355MethodInfo result = type.GetMethod(name, GetBindingFlags(type), null, argTypes, null); 364private static MethodInfo GetPublicMethod(Type type, string name, int argCount) 369MethodInfo method = (MethodInfo)mi; 405private static MethodInfo IEnumerableGetEnumeratorMethod 418private static MethodInfo IListAddMethod 431private static MethodInfo IDictionaryAddMethod
System\Xaml\Schema\MemberReflector.cs (9)
26private NullableReference<MethodInfo> _getter; 28private NullableReference<MethodInfo> _setter; 55internal MemberReflector(MethodInfo getter, MethodInfo setter, bool isEvent) 162internal MethodInfo Getter 178internal MethodInfo Setter 223internal static bool IsInternalVisibleTo(MethodInfo method, Assembly accessingAssembly, XamlSchemaContext schemaContext) 247internal static bool IsProtectedVisibleTo(MethodInfo method, Type derivedType, XamlSchemaContext schemaContext) 281internal static bool GenericArgumentsAreVisibleTo(MethodInfo method, Assembly accessingAssembly, XamlSchemaContext schemaContext)
System\Xaml\Schema\TypeReflector.cs (76)
57private NullableReference<MethodInfo> _isReadOnlyMethod; 65private NullableReference<MethodInfo> _addMethod; 67private NullableReference<MethodInfo> _getEnumeratorMethod; 230internal MethodInfo IsReadOnlyMethod 386internal MethodInfo AddMethod 394internal MethodInfo GetEnumeratorMethod 632private static bool IsPrivateOrNull(MethodInfo mi) 641private void PickAttachablePropertyAccessors(List<MethodInfo> getters, 642List<MethodInfo> setters, out MethodInfo getter, out MethodInfo setter) 644List<KeyValuePair<MethodInfo, MethodInfo>> candidates = 645new List<KeyValuePair<MethodInfo, MethodInfo>>(); 649foreach (MethodInfo curSetter in setters) 651foreach (MethodInfo curGetter in getters) 658candidates.Add(new KeyValuePair<MethodInfo, MethodInfo>(curGetter, curSetter)); 689private MethodInfo PickAttachableEventAdder(IEnumerable<MethodInfo> adders) 694foreach (MethodInfo adder in adders) 706internal bool LookupAttachableProperty(string name, out MethodInfo getter, out MethodInfo setter) 709List<MethodInfo> setters = LookupStaticSetters(name); 710List<MethodInfo> getters = LookupStaticGetters(name); 723internal MethodInfo LookupAttachableEvent(string name) 726List<MethodInfo> adders = LookupStaticAdders(name); 735private void LookupAllStaticAccessors(out Dictionary<string, List<MethodInfo>> getters, 736out Dictionary<string, List<MethodInfo>> setters, out Dictionary<string, List<MethodInfo>> adders) 738getters = new Dictionary<string, List<MethodInfo>>(); 739setters = new Dictionary<string, List<MethodInfo>>(); 740adders = new Dictionary<string, List<MethodInfo>>(); 742MethodInfo[] allMethods = UnderlyingType.GetMethods(AttachableProperties_BF); 754private void LookupAllStaticAccessorsHelper(MethodInfo[] allMethods, Dictionary<string, List<MethodInfo>> getters, 755Dictionary<string, List<MethodInfo>> setters, Dictionary<string, List<MethodInfo>> adders, bool isUnderlyingTypePublic) 757foreach (MethodInfo method in allMethods) 778private List<MethodInfo> LookupStaticAdders(string name) 782List<MethodInfo> preferredAdders, otherAdders; 787private List<MethodInfo> LookupStaticGetters(string name) 790List<MethodInfo> preferredGetters, otherGetters; 795private List<MethodInfo> LookupStaticSetters(string name) 798List<MethodInfo> preferredSetters, otherSetters; 805private void PrioritizeAccessors(MemberInfo[] accessors, bool isEvent, bool isGetter, out List<MethodInfo> preferredAccessors, out List<MethodInfo> otherAccessors) 812foreach (MethodInfo accessor in accessors) 818preferredAccessors = new List<MethodInfo>(); 827otherAccessors = new List<MethodInfo>(); 836foreach (MethodInfo accessor in accessors) 842preferredAccessors = new List<MethodInfo>(); 851private bool IsAttachablePropertyAccessor(bool isEvent, bool isGetter, MethodInfo accessor) 866private static void AddToMultiDict(Dictionary<string, List<MethodInfo>> dict, string name, MethodInfo value, bool isUnderlyingTypePublic) 868List<MethodInfo> list; 903list = new List<MethodInfo>(); 909private bool IsAttachablePropertyGetter(MethodInfo mi, out string name) 926private bool IsAttachablePropertyGetter(MethodInfo mi) 933private bool IsAttachablePropertySetter(MethodInfo mi, out string name) 950private bool IsAttachablePropertySetter(MethodInfo mi) 957private bool IsAttachableEventAdder(MethodInfo mi, out string name) 975private bool IsAttachableEventAdder(MethodInfo mi) 991Dictionary<string, List<MethodInfo>> getters; 992Dictionary<string, List<MethodInfo>> setters; 993Dictionary<string, List<MethodInfo>> adders; 1002Dictionary<string, List<MethodInfo>> getters, Dictionary<string, List<MethodInfo>> setters) 1004foreach (KeyValuePair<string, List<MethodInfo>> nameAndSetterList in setters) 1010List<MethodInfo> getterList; 1015MethodInfo getter, setter; 1031foreach (KeyValuePair<string, List<MethodInfo>> nameAndGetterList in getters) 1045List<XamlMember> result, Dictionary<string, List<MethodInfo>> adders) 1047foreach (KeyValuePair<string, List<MethodInfo>> nameAndAdderList in adders) 1053MethodInfo adder = PickAttachableEventAdder(nameAndAdderList.Value);
System\Xaml\Schema\XamlDirective.cs (2)
190protected sealed override MethodInfo LookupUnderlyingGetter() 200protected sealed override MethodInfo LookupUnderlyingSetter()
System\Xaml\Schema\XamlMemberInvoker.cs (4)
17private NullableReference<MethodInfo> _shouldSerializeMethod; 41public MethodInfo UnderlyingGetter 46public MethodInfo UnderlyingSetter 131MethodInfo shouldSerializeMethod = _shouldSerializeMethod.Value;
System\Xaml\Schema\XamlTypeInvoker.cs (11)
17private Dictionary<XamlType, MethodInfo> _addMethods; 18internal MethodInfo EnumeratorMethod { get; set; } 82MethodInfo addMethod = GetAddMethod(itemType); 116MethodInfo addMethod = GetAddMethod(itemType); 140public virtual MethodInfo GetAddMethod(XamlType contentType) 162MethodInfo addMethod; 165Dictionary<XamlType, MethodInfo> addMethods = new Dictionary<XamlType, MethodInfo>(); 189foreach (KeyValuePair<XamlType, MethodInfo> pair in _addMethods) 200public virtual MethodInfo GetEnumeratorMethod() 224MethodInfo getEnumMethod = GetEnumeratorMethod();
System\Xaml\XamlMember.cs (24)
88public XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, 94public XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, 100internal XamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, 104MethodInfo accessor = getter ?? setter; 123public XamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext) 128public XamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext, 134internal XamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext, 432internal MethodInfo Getter 470internal MethodInfo Setter 499MethodInfo getter = Getter; 518MethodInfo setter = Setter; 625MethodInfo getter = Getter; 668MethodInfo setter = Setter; 681MethodInfo accessor = UnderlyingMember as MethodInfo; 763protected virtual MethodInfo LookupUnderlyingGetter() 777protected virtual MethodInfo LookupUnderlyingSetter() 840private static void ValidateGetter(MethodInfo method, string argumentName) 853private static void ValidateSetter(MethodInfo method, string argumentName) 1017MethodInfo mi = underlyingMember as MethodInfo;
System\Xaml\XamlObjectReader.cs (2)
1237else if (memberInfo is MethodInfo mi) 3239MethodInfo accessor = member.Getter ?? member.Setter;
System\Xaml\XamlSchemaContext.cs (3)
655internal virtual XamlMember GetAttachableProperty(string name, MethodInfo getter, MethodInfo setter) 668internal virtual XamlMember GetAttachableEvent(string name, MethodInfo adder)
System\Xaml\XamlType.cs (7)
514internal MethodInfo IsReadOnlyMethod 568internal MethodInfo AddMethod 588internal MethodInfo GetEnumeratorMethod 770MethodInfo addMethod = null; 978MethodInfo addMethod = AddMethod; 998MethodInfo addMethod = AddMethod; 1140MethodInfo getter, setter;
vstest.console (1)
Internal\MSBuildLogger.cs (1)
491MethodInfo? getResourceStringMethod = typeof(Environment).GetMethod("GetResourceString", BindingFlags.Static | BindingFlags.NonPublic, null, [typeof(string)], null);
vstest.console.arm64 (1)
src\vstest\src\vstest.console\Internal\MSBuildLogger.cs (1)
491MethodInfo? getResourceStringMethod = typeof(Environment).GetMethod("GetResourceString", BindingFlags.Static | BindingFlags.NonPublic, null, [typeof(string)], null);
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
1086MethodInfo methodInfo = typeof(SWF.Control).GetMethod("OnParentRightToLeftChanged", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EventArgs) }, null);