14 types derived from MethodInfo
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
13public sealed partial class DynamicMethod : MethodInfo
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
8public abstract class MethodBuilder : MethodInfo
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
9internal sealed class MethodBuilderInstantiation : MethodInfo
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
9internal sealed partial class MethodOnTypeBuilderInstantiation : MethodInfo
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (1)
11internal sealed partial class RuntimeMethodInfo : MethodInfo
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (1)
16public sealed partial class DynamicMethod : MethodInfo
src\System\Reflection\Emit\SymbolMethod.cs (1)
8internal sealed class SymbolMethod : MethodInfo
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
16internal sealed partial class RuntimeMethodInfo : MethodInfo, IRuntimeMethodInfo
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\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)
35internal abstract class LeveledMethodInfo : MethodInfo
System.Xaml.Tests (1)
Common\CustomMethodInfo.cs (1)
10public class CustomMethodInfo : MethodInfo
5175 references to MethodInfo
Aspire.Dashboard.Components.Tests (2)
UseCultureAttribute.cs (2)
66public override void Before(MethodInfo methodUnderTest, IXunitTest test) 84public override void After(MethodInfo methodUnderTest, IXunitTest test)
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (2)
47private readonly MethodInfo _entryPoint; 57MethodInfo entryPoint,
Aspire.TestUtilities (2)
UseCultureAttribute.cs (2)
62public override void Before(MethodInfo methodUnderTest, IXunitTest test) 84public override void After(MethodInfo methodUnderTest, IXunitTest test)
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 =
DesignSurfaceExt (1)
PropertyGridExt.cs (1)
23MethodInfo methodInfo = typeof(PropertyGrid).GetMethod(nameof(OnComponentChanged), BindingFlags.NonPublic | BindingFlags.Instance);
Diagnostics.EFCore.FunctionalTests (1)
Helpers\StringHelpers.cs (1)
16var method = strings.GetDeclaredMethods(stringName).Single();
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);
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)
122MethodInfo methodInfo = type.GetMethod("GetMetadatadataAsync", BindingFlags.Public | BindingFlags.Instance);
Shared\ProjectPropertyResolver.cs (1)
54var getPropertyValue = projType.GetMethod("GetPropertyValue");
GenerateDocumentationAndConfigFiles (2)
CodeFixerExtensions.cs (2)
74MethodInfo? method = fixer?.GetType().GetTypeInfo().GetMethod("RegisterCodeFixesAsync"); 76MethodInfo? moveNextMethod = stateMachineAttr?.StateMachineType.GetTypeInfo().GetDeclaredMethod("MoveNext");
GetDocument.Insider (14)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25257.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (5)
103var factory = programType.GetMethod(name, DeclaredOnlyLookup); 113private static bool IsFactory<TReturn>(MethodInfo? factory) 181var buildMethod = builder.GetType().GetMethod("Build"); 199private readonly MethodInfo _entryPoint; 209public HostingListener(string[] args, MethodInfo entryPoint, TimeSpan waitTimeout, bool stopApplication, Action<object>? configure, Action<Exception?>? entrypointCompleted)
Commands\GetDocumentCommandWorker.cs (9)
209var getDocumentsMethod = GetMethod( 219var generateWithVersionMethod = serviceType.GetMethod( 240var generateMethod = GetMethod( 325MethodInfo generateMethod, 327MethodInfo? generateWithVersionMethod, 335var targetMethod = generateWithVersionMethod ?? generateMethod; 429private MethodInfo GetMethod(string methodName, Type type, Type[] parameterTypes, Type returnType) 431var method = type.GetMethod(methodName, parameterTypes); 455private object InvokeMethod(MethodInfo method, object instance, object[] arguments)
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FixtureLoggedTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
illink (2)
ILLink.RoslynAnalyzer (2)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
200 /// <item><see cref="System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression?, System.Reflection.MethodInfo)"/></item> 344 /// <see cref="System.Reflection.MethodInfo.MakeGenericMethod(System.Type[])"/>
Infrastructure.Common (5)
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\WcfTestDiscoverer.cs (1)
27MethodInfo testMethodInfo = testMethod.Method.ToRuntimeMethod();
InMemory.FunctionalTests (3)
Http2\Http2TestBase.cs (1)
393protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
Http3\Http3TestBase.cs (1)
117protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
37protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
20foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
Metrics (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Metrics.Legacy (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.Arcade.Common (1)
MSBuildTaskBase.cs (1)
88private MethodInfo GetExecuteMethod()
Microsoft.AspNetCore.App.Analyzers.Test (4)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (4)
39var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods() 44var parameterizedMethod = methodInfo.MakeGenericMethod(contractType, metadataType); 49var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods() 54var parameterizedMethod = methodInfo.MakeGenericMethod(contractType);
Microsoft.AspNetCore.Components (18)
BindConverter.cs (8)
1670private static MethodInfo? _makeArrayFormatter; 1788var method = _makeArrayFormatter ??= typeof(FormatterDelegateCache).GetMethod(nameof(MakeArrayFormatter), BindingFlags.NonPublic | BindingFlags.Static)!; 1859private static MethodInfo? _convertToEnum; 1860private static MethodInfo? _convertToNullableEnum; 1861private static MethodInfo? _makeArrayTypeConverter; 1984var method = _convertToEnum ??= typeof(BindConverter).GetMethod(nameof(ConvertToEnum), BindingFlags.NonPublic | BindingFlags.Static)!; 1990var method = _convertToNullableEnum ??= typeof(BindConverter).GetMethod(nameof(ConvertToNullableEnum), BindingFlags.NonPublic | BindingFlags.Static)!; 1995var method = _makeArrayTypeConverter ??= typeof(ParserDelegateCache).GetMethod(nameof(MakeArrayTypeConverter), BindingFlags.NonPublic | BindingFlags.Static)!;
Reflection\PropertyGetter.cs (3)
12private static readonly MethodInfo CallPropertyGetterOpenGenericMethod = 32var getMethod = property.GetMethod; 36var callPropertyGetterClosedGenericMethod =
Reflection\PropertySetter.cs (3)
12private static readonly MethodInfo CallPropertySetterOpenGenericMethod = 32var setMethod = property.SetMethod; 36var callPropertySetterClosedGenericMethod =
RenderTree\EventArgsTypeCache.cs (3)
11private static readonly ConcurrentDictionary<MethodInfo, Type> Cache = new ConcurrentDictionary<MethodInfo, Type>(); 13public static Type GetEventArgsType(MethodInfo methodInfo)
RenderTree\Renderer.cs (1)
524var methodInfo = GetRequiredEventBindingEntry(eventHandlerId).Callback.Delegate?.Method;
Microsoft.AspNetCore.Components.Endpoints (13)
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\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new(); 154private static MethodInfoData GetOrCreateMethodInfoData(MethodInfo methodInfo) 165static MethodInfoData GetMethodInfoData(MethodInfo methodInfo)
Microsoft.AspNetCore.Components.Web (3)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new(); 154private static MethodInfoData GetOrCreateMethodInfoData(MethodInfo methodInfo) 165static MethodInfoData GetMethodInfoData(MethodInfo methodInfo)
Microsoft.AspNetCore.Components.WebAssembly (8)
HotReload\HotReloadAgent.cs (2)
73var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>), typeof(ReadOnlySpan<byte>)], modifiers: null); 82var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null);
HotReload\MetadataUpdateHandlerInvoker.cs (6)
131if (GetUpdateMethod(handlerType, ClearCacheHandlerName) is MethodInfo clearCache) 137if (GetUpdateMethod(handlerType, UpdateApplicationHandlerName) is MethodInfo updateApplication) 153Action<Type[]?> CreateAction(MethodInfo update) 169MethodInfo? GetUpdateMethod(Type handlerType, string name) 171if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, binder: null, [typeof(Type[])], modifiers: null) is MethodInfo updateMethod && 177foreach (MethodInfo method in handlerType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance))
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.Grpc.JsonTranscoding (10)
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
43var 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\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (4)
28internal static MethodInfo? GetBindMethod(Type serviceType) 31var bindMethodInfo = GetBindMethodUsingAttribute(serviceType); 42internal static MethodInfo? GetBindMethodUsingAttribute(Type serviceType) 67internal static MethodInfo? GetBindMethodFallback(Type serviceType)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
441var methodInfo = serviceType.GetMethod(methodDescriptor.Name);
Microsoft.AspNetCore.Grpc.Swagger (4)
Internal\XmlComments\GrpcXmlCommentsOperationFilter.cs (3)
30var methodInfo = grpcMetadata.ServiceType.GetMethod(grpcMetadata.Method.Name); 37var targetMethod = methodInfo.DeclaringType!.IsConstructedGenericType 70private bool TryApplyMethodTags(OpenApiOperation operation, MethodInfo methodInfo)
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\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.Hosting.Tests (1)
ConfigureBuilderTests.cs (1)
15var methodInfo = GetType().GetMethod(nameof(InjectedMethod), BindingFlags.NonPublic | BindingFlags.Static);
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\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.Abstractions.Tests (2)
Validation\ValidatableInfoResolverTests.cs (2)
64var method = typeof(TestMethods).GetMethod(nameof(TestMethods.MethodWithNonValidatableParam))!; 82var method = typeof(TestMethods).GetMethod(nameof(TestMethods.MethodWithValidatableParam))!;
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))!; 137/// <param name="methodInfo">The <see cref="MethodInfo"/> for the route handler to be passed to <see cref="Create(Delegate, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult?)"/>.</param> 140public static RequestDelegateMetadataResult InferMetadata(MethodInfo methodInfo, RequestDelegateFactoryOptions? options = null) 169/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 171/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 209public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory, RequestDelegateFactoryOptions? options) 221/// The result returned from <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> if that was used to inferring metadata before creating the final RequestDelegate. 223/// <see cref="InferMetadata(MethodInfo, RequestDelegateFactoryOptions?)"/> would have inferred for the same <see cref="Delegate.Method"/> and populate <see cref="RequestDelegateFactoryOptions.EndpointBuilder"/> 228public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory = null, RequestDelegateFactoryOptions? options = null, RequestDelegateMetadataResult? metadataResult = null) 314MethodInfo methodInfo, 389private static Expression[] CreateArgumentsAndInferMetadata(MethodInfo methodInfo, RequestDelegateFactoryContext factoryContext) 413private static EndpointFilterDelegate? CreateFilterPipeline(MethodInfo methodInfo, Expression? targetExpression, RequestDelegateFactoryContext factoryContext, Expression<Func<HttpContext, object?>>? targetFactory) 926private static Expression CreateMethodCall(MethodInfo methodInfo, Expression? target, Expression[] arguments) => 2377private 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\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\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\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
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.Extensions.Tests (37)
ParameterBindingMethodCacheTests.cs (1)
185var method = call!.Method;
PropertyAsParameterInfoTests.cs (1)
181var methodInfo = typeof(ArgumentList).GetMethod(methodName);
RequestDelegateFactoryTests.cs (18)
133var methodInfo = typeof(RequestDelegateFactoryTests).GetMethod( 166var methodInfo = typeof(TestNonStaticActionClass).GetMethod( 203var methodInfo = typeof(RequestDelegateFactoryTests).GetMethod( 269var methodInfo = typeof(HttpHandler).GetMethod(nameof(HttpHandler.Handle)); 2153var methodInfo = typeof(RequestDelegateFactoryTests).GetMethod( 2190var methodInfo = typeof(RequestDelegateFactoryTests).GetMethod( 3342public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3358public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3377public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3387public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3397public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3408public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3435public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3453public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3478public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3503public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3526public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 3534public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (1)
524m is not MethodInfo &&
RequestDelegateGenerator\SharedTypes.cs (11)
40public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 564public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 599public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 612public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 619public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 629public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 660public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 683public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 925public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 945public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 958public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (5)
286var factory = programType.GetMethod(name, DeclaredOnlyLookup); 296private static bool IsFactory<TReturn>(MethodInfo factory) 364var buildMethod = builder.GetType().GetMethod("Build"); 382private readonly MethodInfo _entryPoint; 392public HostingListener(string[] args, MethodInfo entryPoint, TimeSpan waitTimeout, bool stopApplication, Action<object> configure, Action<Exception> entrypointCompleted)
Microsoft.AspNetCore.Http.Microbenchmarks (11)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (11)
40public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 564public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 599public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 612public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 619public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 629public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 660public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 683public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 925public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 945public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 958public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Microsoft.AspNetCore.Http.Results (32)
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)
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)
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)
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.Http.Results.Tests (37)
AcceptedAtRouteOfTResultTests.cs (1)
207private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
AcceptedAtRouteResultTests.cs (1)
119private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
AcceptedOfTResultTests.cs (1)
131private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
AcceptedResultTests.cs (1)
76private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
BadRequestOfTResultTests.cs (1)
174private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
BadRequestResultTests.cs (1)
89private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
ConflictOfTResultTests.cs (1)
152private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
ConflictResultTests.cs (1)
90private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
CreatedAtRouteOfTResultTests.cs (1)
174private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
CreatedAtRouteResultTests.cs (1)
122private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
CreatedOfTResultTests.cs (1)
171private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
CreatedResultTests.cs (1)
110private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
InternalServerErrorOfTResultTests.cs (1)
174private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
InternalServerErrorResultTests.cs (1)
89private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
NoContentResultTests.cs (1)
86private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
NotFoundOfTResultTests.cs (1)
134private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
NotFoundResultTests.cs (1)
85private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
OkOfTResultTests.cs (1)
151private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
OkResultTests.cs (1)
88private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
ResultsOfTHelperTests.cs (6)
81var methodInfo = typeof(ResultsOfTHelperTests).GetMethod(nameof(GetMetadata), BindingFlags.NonPublic | BindingFlags.Static); 101public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 109static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 117public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 122static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder) 130static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ResultsOfTTests.cs (1)
90private static void PopulateMetadata<TTarget>(MethodInfo method, EndpointBuilder builder) where TTarget : IEndpointMetadataProvider
ResultsOfTTests.Generated.cs (7)
1865public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1879public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1893public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1907public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1921public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1935public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 1948public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ServerSentEventsResultTests.cs (1)
334private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
UnprocessableEntityOfTResultTests.cs (1)
151private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
UnprocessableEntityResultTests.cs (1)
89private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
ValidationProblemResultTests.cs (1)
173private static void PopulateMetadata<TResult>(MethodInfo method, EndpointBuilder builder)
Microsoft.AspNetCore.InternalTesting (18)
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)
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.InternalTesting.Tests (3)
LoggedTestXunitTests.cs (1)
180protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TestableAspNetTestAssemblyRunner.cs (1)
89var method = type.GetMethod(TestableAssembly.TestMethodName);
TestableAssembly.cs (1)
86var trueInfo = typeof(Assert).GetMethod("True", new[] { typeof(bool) });
Microsoft.AspNetCore.Mvc.Abstractions (28)
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.Abstractions.Test (5)
ModelBinding\ModelMetadataTest.cs (3)
259var method = typeof(CollectionImplementation).GetMethod(nameof(CollectionImplementation.Add)); 296var method = typeof(CollectionImplementation).GetMethod(nameof(CollectionImplementation.Add)); 340var method = typeof(CollectionImplementation).GetMethod(nameof(CollectionImplementation.Add));
ModelBinding\ModelStateDictionaryTest.cs (2)
1029var method = typeof(string).GetMethod(nameof(string.Copy)); 1145var method = typeof(string).GetMethod(nameof(string.Copy));
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\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.ApiExplorer.Test (5)
ApiResponseTypeProviderTest.cs (1)
846var method = type.GetMethod(name);
DefaultApiDescriptionProviderTest.cs (3)
2174var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2200var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2223var methodInfo = GetType().GetMethod(nameof(AcceptsId_Query), BindingFlags.Instance | BindingFlags.NonPublic);
EndpointMetadataApiDescriptionProviderTest.cs (1)
1642var methodInfo = action.Method;
Microsoft.AspNetCore.Mvc.Core (118)
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\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\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\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
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.Core.Test (78)
ApiConventionMethodAttributeTest.cs (1)
63var method = type.GetMethod(nameof(ConventionWithNullableContextAttribute.Get));
ApiExplorer\ApiConventionMatcherTest.cs (14)
334var method = typeof(TestController).GetMethod(nameof(TestController.Get)); 335var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.Post)); 348var method = typeof(TestController).GetMethod(nameof(TestController.Get)); 349var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.GetNoArgs)); 362var method = typeof(TestController).GetMethod(nameof(TestController.Get)); 363var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.GetTwoArgs)); 376var method = typeof(TestController).GetMethod(nameof(TestController.Get)); 377var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.GetParameterNotMatching)); 390var method = typeof(TestController).GetMethod(nameof(TestController.Get)); 391var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.Get)); 404var method = typeof(TestController).GetMethod(nameof(TestController.Search)); 405var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.Search)); 418var method = typeof(TestController).GetMethod(nameof(TestController.SearchEmpty)); 419var conventionMethod = typeof(TestConvention).GetMethod(nameof(TestConvention.SearchWithParams));
ApiExplorer\ApiConventionResultTest.cs (8)
12var method = typeof(GetApiConvention_ReturnsNull_IfNoConventionMatchesController).GetMethod(nameof(GetApiConvention_ReturnsNull_IfNoConventionMatchesController.NoMatch)); 32var method = typeof(GetApiConvention_ReturnsResultFromConventionController) 68var method = typeof(GetApiConvention_ReturnsResultFromFirstMatchingConventionController) 97var method = typeof(DefaultConventionController) 117var method = typeof(DefaultConventionController) 137var method = typeof(DefaultConventionController) 161var method = typeof(DefaultConventionController) 185var method = typeof(DefaultConventionController)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (3)
23var method = typeof(TestApiController).GetMethod(nameof(TestApiController.TestAction)); 49var method = typeof(TestApiController).GetMethod(nameof(TestApiController.TestAction)); 92var method = typeof(TestApiController).GetMethod(nameof(TestApiController.TestActionWithIResult));
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (4)
39var methodInfo = typeof(TestController).GetMethod(nameof(TestController.SomeAction)); 71var methodInfo = typeof(TestController).GetMethod(nameof(TestController.SomeAction)); 97var methodInfo = typeof(TestController).GetMethod(nameof(TestController.SomeAction)); 123var methodInfo = typeof(TestController).GetMethod(nameof(TestController.SomeAction));
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
1160var methodInfo = typeof(ConventionsController).GetMethod("Create");
ApplicationModels\DefaultApplicationModelProviderTest.cs (24)
317var methodInfo = typeInfo.GetMethod(nameof(AsyncActionController.GetPersonAsync)); 337var methodInfo = typeInfo.GetMethod(nameof(AsyncActionController.GetPersonAsync)); 357var methodInfo = typeInfo.GetMethod(nameof(AsyncActionController.GetAddressAsync)); 483var method = typeof(DerivedController).GetMethod(methodName); 498var method = typeof(BaseController).GetMethod(nameof(BaseController.Redirect)); 513var method = typeof(DerivedController).GetMethod( 530var method = typeof(OperatorOverloadingController).GetMethod("op_Addition"); 546var method = typeof(DerivedController).GetMethod("GenericMethod"); 561var method = typeof(DerivedController).GetMethod("OverridenNonActionMethod"); 580var method = typeof(DerivedController).GetMethod( 598var methodInfo = 600var method = typeInfo.AsType().GetMethods().SingleOrDefault(m => (m == methodInfo)); 616var methodInfo = 622foreach (var method in methods) 638var method = typeInfo.GetDeclaredMethods("Dispose").SingleOrDefault(); 654var method = typeInfo.GetDeclaredMethods("Dispose").SingleOrDefault(); 670var methodInfo = 672var method = typeInfo.AsType().GetMethods().SingleOrDefault(m => (m == methodInfo)); 688var methodInfo = 694foreach (var method in methods) 714foreach (var method in methods) 732var method = typeof(DerivedController).GetMethod( 1176var methodInfo = typeInfo.GetMethod(nameof(MultipleRouteProviderOnActionController.Edit)); 1273var actionMethod = typeof(TypedResultsReturningActionsController).GetMethod(nameof(TypedResultsReturningActionsController.Get));
ApplicationModels\EndpointMetadataProviderTest.cs (7)
399public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 407public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 417public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 426public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 439public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 456public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 494public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
ApplicationModels\RouteTokenTransformerConventionTest.cs (1)
51private MethodInfo GetMethodInfo()
ControllerBaseTest.cs (1)
2160public void NonActionAttribute_IsOnEveryPublicNormalMethodFromControllerBase(MethodInfo method)
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (3)
46var actionMethod1 = controllerType1.GetMethod(nameof(HelloController.GetHello)); 56var actionMethod2 = controllerType2.GetMethod(nameof(WorldController.GetWorld)); 93var actionMethod1 = controllerType1.GetMethod(nameof(HelloController.GetInfo));
Infrastructure\ActionMethodExecutorTest.cs (1)
453var methodInfo = type.GetMethod(methodName, BindingFlags.Public | BindingFlags.Instance);
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
47var method = typeof(TestActions).GetMethod(nameof(TestActions.GetAction));
Infrastructure\ControllerActionInvokerTest.cs (1)
1655var method = typeof(TestController).GetTypeInfo().GetMethod(methodName);
Infrastructure\ParameterDefaultValuesTest.cs (2)
18var methodInfo = typeof(TestObject).GetMethod(methodName); 31var methodInfo = typeof(TestObject).GetMethod("DefaultValuesOfStructTypes");
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
163var method = typeof(MetadataClass).GetMethod(nameof(MetadataClass.IsLovely));
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
112var method = typeof(MetadataClass).GetMethod(nameof(MetadataClass.IsLovely));
ModelBinding\ParameterBinderTest.cs (3)
139var method = typeof(Person).GetMethod(nameof(Person.Equals), new[] { typeof(Person) }); 307var method = GetType().GetMethod(nameof(TestMethodWithoutAttributes), BindingFlags.NonPublic | BindingFlags.Instance); 362var method = GetType().GetMethod(nameof(TestMethodWithAttributes), BindingFlags.NonPublic | BindingFlags.Instance);
Routing\AttributeRoutingTest.cs (1)
114var actionMethod = controllerType.GetMethod("Index");
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
DataAnnotationsMetadataProviderTest.cs (4)
1387var method = type.GetMethod(nameof(NullableReferenceTypes.MethodWithDefault)); 1408var method = type.GetMethod(nameof(NullableReferenceTypes.MethodWithDefault)); 1652var method = type.GetMethod(nameof(NullableReferenceTypes.Method)); 1669var method = type.GetMethod(nameof(NullableReferenceTypes.Method));
DataAnnotationsModelValidatorTest.cs (1)
40var method = typeof(ModelValidationResultComparer).GetMethod(
NumericClientModelValidatorTest.cs (1)
76var method = typeof(TypeWithNumericProperty).GetMethod(nameof(TypeWithNumericProperty.IsLovely));
ValidatableObjectAdapterTest.cs (1)
21var method = typeof(SampleModel).GetMethod(nameof(SampleModel.IsLovely));
Microsoft.AspNetCore.Mvc.FunctionalTests (94)
AntiforgeryAuthTests.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AntiforgeryTests.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ApiBehaviorTest.cs (1)
23protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ApiExplorerTest.cs (1)
24protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ApplicationModelTest.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AsyncActionsTests.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AsyncDisposalTest.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AsyncEnumerableTestBase.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AuthMiddlewareAndFilterTestBase.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
AuthMiddlewareUsingRequireAuthTest.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
BasicTests.cs (1)
25protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ClientValidationOptionsTests.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
CompilationOptionsTests.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ComponentRenderingFunctionalTests.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ConsumesAttributeTestsBase.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ContentNegotiationTest.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ControllerEndpointFiltersTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ControllerFromServicesTests.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
CorsTestsBase.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
CustomValueProviderTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
DataAnnotationTests.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
DefaultValuesTest.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
DirectivesTest.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
DoNotRespectBrowserAcceptHeaderTests.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ErrorPageTests.cs (1)
29protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
FileResultTests.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
FiltersTest.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
FlushPointTest.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
FormFileUploadTest.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
GlobalAuthorizationFilterTestBase.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
HtmlGenerationTest.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
HtmlGenerationWithCultureTest.cs (1)
24protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
HtmlHelperOptionsTest.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
HttpActionResultTests.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
InputFormatterTests.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
InputObjectValidationTests.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
InputParentValidationTests.cs (1)
25protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
InputValidationTests.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
JsonInputFormatterTestBase.cs (1)
23protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
JsonOutputFormatterTestBase.cs (1)
24protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
JsonPatchInputFormatterTest.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
JsonResultWithNewtonsoftJsonTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
JsonResultWithSystemTextJsonTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
KeyedServicesTests.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
LinkGenerationTests.cs (1)
24protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
LinkGeneratorTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
LinkParserTest.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
MvcSandboxTest.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
NonNullableReferenceTypesTest.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
OutputFormatterTest.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
PageAsyncDisposalTest.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorBuildTest.cs (1)
24protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPageModelTest.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPagesNamespaceTest.cs (1)
18protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPagesTest.cs (1)
26protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPagesViewSearchTest.cs (1)
18protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPagesWithBasePathTest.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorPagesWithEndpointRoutingTest.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorRuntimeCompilationHostingStartupTest.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RazorViewLocationSpecificationTest.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ReadFromDisconnectedClientTest.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RemoteAttributeValidationTest.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RequestFormLimitsTest.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RequestServicesTestBase.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RequestSizeLimitTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RespectBrowserAcceptHeaderTests.cs (1)
23protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingAcrossPipelineBranchesTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingDynamicOrderTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingDynamicTest.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingFallbackTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingGroupsTest.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingGroupsWithMetadataTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingTestsBase.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
RoutingWithoutRazorPagesTestsBase.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
SerializableErrorTests.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
SimpleTests.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
SimpleWithWebApplicationBuilderExceptionTests.cs (1)
12protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
SimpleWithWebApplicationBuilderTests.cs (1)
23protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
StreamOutputFormatterTest.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TagHelperComponentTagHelperTest.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TagHelpersFromServicesTest.cs (1)
13protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TagHelpersTest.cs (1)
22protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TempDataInCookiesUsingCookieConsentTest.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TempDataPropertyTest.cs (1)
15protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
TempDataTestBase.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
UrlResolutionTest.cs (1)
16protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
VersioningTestsBase.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ViewComponentFromServicesTests.cs (1)
14protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
ViewEngineTests.cs (1)
19protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
XmlDataContractSerializerFormattersWrappingTest.cs (1)
20protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
XmlDataContractSerializerInputFormatterTest.cs (1)
18protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
XmlOutputFormatterTests.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
XmlSerializerFormattersWrappingTest.cs (1)
21protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
XmlSerializerInputFormatterTests.cs (1)
17protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
Microsoft.AspNetCore.Mvc.IntegrationTests (3)
ActionParametersIntegrationTest.cs (2)
958private static MethodInfo MyActionMethodInfo 983private static MethodInfo MyActionMethodInfo
NullableReferenceTypeIntegrationTest.cs (1)
166var method = GetType().GetMethod(nameof(NonNullableParameter), BindingFlags.NonPublic | BindingFlags.Instance);
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\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.RazorPages.Test (20)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (1)
254var handlerMethod = handlerTypeInfo.GetMethod(nameof(HandlerWithParameters.OnPost));
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (4)
775var expected = typeInfo.GetMethod(nameof(PageModelWithStaticHandler.OnGet), BindingFlags.Public | BindingFlags.Instance); 805var expected = typeInfo.GetMethod(nameof(PageModelWithAbstractMethod.OnGet), BindingFlags.Public | BindingFlags.Instance); 833var expected = typeInfo.GetMethod(nameof(PageWithNonHandlerMethod.OnGet), BindingFlags.Public | BindingFlags.Instance); 898var expected = typeInfo.GetMethod(nameof(PageWithHandlerParameters.OnPost));
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (8)
79var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 107var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 134var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 165var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 196var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 227var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 262var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 296var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic);
Infrastructure\ExecutorFactoryTest.cs (6)
56var methodInfo = typeof(TestPage).GetMethod(nameof(TestPage.ActionResultReturnHandlerWithParameters)); 124var methodInfo = typeof(TestPage).GetMethod(nameof(TestPage.GenericTaskHandler)); 145var methodInfo = typeof(TestPage).GetMethod(nameof(TestPage.TaskReturningConcreteSubtype)); 170var methodInfo = typeof(TestPageModel).GetMethod(methodName); 182private static object[] CreateArguments(MethodInfo methodInfo) 204private static HandlerParameterDescriptor[] CreateParameters(MethodInfo methodInfo)
Infrastructure\PageBinderFactoryTest.cs (1)
756var handlerMethodInfo = type.GetMethod(method);
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
215Assert.Equal(typeof(MethodInfo), excludeFilter.Type);
Microsoft.AspNetCore.Mvc.Testing (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25257.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (5)
103var factory = programType.GetMethod(name, DeclaredOnlyLookup); 113private static bool IsFactory<TReturn>(MethodInfo? factory) 181var buildMethod = builder.GetType().GetMethod("Build"); 199private readonly MethodInfo _entryPoint; 209public HostingListener(string[] args, MethodInfo entryPoint, TimeSpan waitTimeout, bool stopApplication, Action<object>? configure, Action<Exception?>? entrypointCompleted)
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.Mvc.ViewFeatures.Test (15)
ControllerTest.cs (1)
57public void NonActionAttribute_IsOnEveryPublicNormalMethodFromController(MethodInfo method)
ViewComponentResultTest.cs (14)
73var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 171var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 202var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 233var methodInfo = typeof(AsyncTextViewComponent).GetMethod(nameof(AsyncTextViewComponent.InvokeAsync)); 264var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 305var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 336var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 367var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 399var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 441var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 482var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 542var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 582var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke)); 621var methodInfo = typeof(TextViewComponent).GetMethod(nameof(TextViewComponent.Invoke));
Microsoft.AspNetCore.OpenApi (92)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (2)
98var methodInfo = metadata.OfType<MethodInfo>().SingleOrDefault();
Services\OpenApiGenerator.cs (7)
55/// <param name="methodInfo">The <see cref="MethodInfo"/> associated with the route handler of the endpoint.</param> 60MethodInfo methodInfo, 74private OpenApiOperation GetOperation(string httpMethod, MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern) 100private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointMetadataCollection metadata) 257private OpenApiRequestBody? GetOpenApiRequestBody(MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern, bool disableInferredBody) 327private HashSet<OpenApiTagReference> GetOperationTags(MethodInfo methodInfo, EndpointMetadataCollection metadata) 367private List<IOpenApiParameter> GetOpenApiParameters(MethodInfo methodInfo, RoutePattern pattern, bool disableInferredBody)
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\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
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\Shared\RoslynUtils\TypeHelper.cs (2)
36private static bool IsCompilerGeneratedMethod(MethodInfo method) 63internal static bool TryGetNonCompilerGeneratedMethodName(MethodInfo method, [NotNullWhen(true)] out string? originalName)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (5)
SnapshotTestHelper.cs (5)
294var factory = programType.GetMethod(name, DeclaredOnlyLookup); 304private static bool IsFactory<TReturn>(MethodInfo factory) 372var buildMethod = builder.GetType().GetMethod("Build"); 390private readonly MethodInfo _entryPoint; 400public HostingListener(string[] args, MethodInfo entryPoint, TimeSpan waitTimeout, bool stopApplication, Action<object> configure, Action<Exception> entrypointCompleted)
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
1031var methodInfo = action.Method;
Microsoft.AspNetCore.Routing (27)
Builder\RouteHandlerServices.cs (3)
39Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 69Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 71MethodInfo methodInfo)
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 (3)
37MethodInfo methodInfo) 63Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? inferMetadataFunc, 65MethodInfo methodInfo)
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\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\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.Routing.Tests (3)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (3)
489m => Assert.IsAssignableFrom<MethodInfo>(m), 553public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) 570public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder)
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
215foreach (var candidateMethod in methods)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http1\Http1ConnectionTestsBase.cs (1)
30protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
37protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
37protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
Microsoft.AspNetCore.Shared.Tests (69)
ObjectMethodExecutorTest.cs (2)
412var method = typeof(TestObject).GetMethod(methodName); 418var method = typeof(TestObject).GetMethod(methodName);
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\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
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\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))); 876private void InvokeStreamMethod(MethodInfo methodInfo, Type[] genericTypes, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource) 901private Task ReflectionSendStreamItems(MethodInfo methodInfo, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource)
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)
778foreach (var methodInfo in HubReflectionHelper.GetHubMethods(hubType)) 808private 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; 225private static Func<object, CancellationToken, IAsyncEnumerator<object?>> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) 237var genericMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); 254private static Func<object, CancellationToken, IAsyncEnumerator<object?>> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType) 273var genericAdapterMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); 301var 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\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\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (4)
31private static MethodInfo _fsharpAsyncStartAsTaskGenericMethod; 85var startAsTaskClosedMethod = _fsharpAsyncStartAsTaskGenericMethod 162var conversionMethod = 234foreach (var candidateMethodInfo in fsharpAsyncMethods)
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.SignalR.Tests (1)
TestFilters.cs (1)
231var methodInfo = typeof(BaseHub).GetMethod(nameof(BaseHub.BaseMethod));
Microsoft.AspNetCore.TestHost (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25257.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (5)
103var factory = programType.GetMethod(name, DeclaredOnlyLookup); 113private static bool IsFactory<TReturn>(MethodInfo? factory) 181var buildMethod = builder.GetType().GetMethod("Build"); 199private readonly MethodInfo _entryPoint; 209public HostingListener(string[] args, MethodInfo entryPoint, TimeSpan waitTimeout, bool stopApplication, Action<object>? configure, Action<Exception?>? entrypointCompleted)
Microsoft.Build (11)
Evaluation\Expander.cs (5)
2273MethodInfo itemFunctionInfo = typeof(IntrinsicItemFunctions<S>).GetMethod(functionName, BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.Static); 3621IEnumerable<MethodInfo> methods = _receiverType.GetMethods(_bindingFlags).Where(m => m.Name.Equals(_methodMethodName) && m.GetParameters().Length == args.Length); 3703private object GetMethodResult(object objectInstance, IEnumerable<MethodInfo> methods, object[] args, int index) 3710foreach (MethodInfo method in methods) 4323functionResult = ((MethodInfo)memberInfo).Invoke(objectInstance /* null if static method */, args);
LogMessagePacketBase.cs (4)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 412MethodInfo methodInfo = null; 524private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo)
Utilities\NuGetFrameworkWrapper.cs (2)
34private MethodInfo ParseMethod; 35private MethodInfo IsCompatibleMethod;
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TestUtilities\ErrorLoggerEngine.cs (2)
20private readonly MethodInfo _formatErrorMethod; 21private readonly MethodInfo _formatWarningMethod;
Microsoft.Build.Tasks.UnitTests (2)
Exec_Tests.cs (1)
551MethodInfo generateCommandLineCommandsMethod = execType.GetMethod("GenerateCommandLineCommands", BindingFlags.Instance | BindingFlags.NonPublic);
ResourceHandling\GenerateResource_Tests.cs (1)
4171public static MethodInfo GetPrivateMethod(object o, string methodName)
Microsoft.CodeAnalysis (12)
CodeGen\BasicBlock.cs (1)
648var method = visType.GetTypeInfo().GetDeclaredMethod("BasicBlockToString");
CodeGen\ILBuilder.cs (1)
1269var 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)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
InternalUtilities\UICultureUtilities.cs (3)
32var currentUICultureSetter = type.GetTypeInfo().GetDeclaredProperty(currentUICultureName)?.SetMethod; 71var currentThreadGetter = typeInfo.GetDeclaredProperty(currentThreadName)?.GetMethod; 78var currentUICultureSetter = typeInfo.GetDeclaredProperty(currentUICultureName)?.SetMethod;
PEWriter\PeWriter.cs (1)
316private static MethodInfo? s_calculateChecksumMethod;
Microsoft.CodeAnalysis.Analyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.CodeStyle (4)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
74var methodInfo = ((Delegate)continuationFunction!).GetMethodInfo();
Microsoft.CodeAnalysis.CSharp (2)
Emitter\Model\PEModuleBuilder.cs (2)
313foreach (var method in typeMethods) 1835var methodAdapter = privateImplClass.PrivateImplementationDetails.GetMethod(methodName);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (41)
CodeGen\CodeGenFunctionPointersTests.cs (26)
98var m = c.GetMethod("M"); 120var m = c.GetMethod("M"); 142var m = c.GetMethod("M"); 166var m = c.GetMethod("M"); 193var m = c.GetMethod("M"); 225var m = c.GetMethod("M"); 644var m = c.GetMethod("M"); 686var m = testClass.GetMethod("M"); 741var m = c.GetMethod("M"); 866var m = d.GetMethod("M"); 2548var m = c.GetMethod("M"); 5607var m = b.GetMethod("M"); 5720var method = a.GetMethod(methodName); 6294var baseM1 = @base.GetMethod("M1"); 6295var baseM2 = @base.GetMethod("M2"); 6296var baseM3 = @base.GetMethod("M3"); 6297var baseM4 = @base.GetMethod("M4"); 6302var derivedM1 = derived.GetMethod("M1"); 6303var derivedM2 = derived.GetMethod("M2"); 6304var derivedM3 = derived.GetMethod("M3"); 6305var derivedM4 = derived.GetMethod("M4"); 8065var m1 = c.GetMethod("M"); 8741var m1 = c.GetMethod("M1"); 10339var m = c.GetMethod("M"); 10407var m = c.GetMethod("M"); 10517var m = c.GetMethod("M");
CodeGen\CodeGenLocalFunctionTests.cs (15)
5235var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5241var localFn2 = cClass.GetMethod("<M>g__local2|0_1"); 5245var localFn3 = cClass.GetMethod("<M>g__local3|0_2"); 5249var localFn4 = cClass.GetMethod("<M>g__local4|0_3"); 5284var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5325var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5358var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5392var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5425var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5538var localFn1 = cClass.GetMethod("<Main>g__local1|0_0"); 5634var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5645var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5758var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5833var localFn1 = cClass.GetMethod("<M>g__local1|0_0"); 5964var localFn1 = cClass.GetMethod("<M>g__local1|0_0");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Attributes\AttributeTests.cs (2)
2882var invokeMethod = delegateType.GetMethod("Invoke"); 2897var ctor = delegateType.GetMethod(".ctor");
Attributes\AttributeTests_WellKnownAttributes.cs (2)
5073var useParamsMethod = type.GetMethod("UseParams"); 5077var noParamsMethod = type.GetMethod("NoParams");
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
276var m = c.DeclaringType.GetTypeInfo().GetDeclaredMethod("M");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
6188var localFn1 = program.GetMethod("<" + WellKnownMemberNames.TopLevelStatementsEntryPointMethodName + ">g__local1|0_0");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\GenericConstraintTests.cs (1)
116var method = type.GetMethod("I<C,System.Object>.M");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxTests.cs (2)
286foreach (var method in typeof(SyntaxFacts).GetMethods(BindingFlags.Public | BindingFlags.Static)) 304var method = typeof(SyntaxFacts).GetMethod(methodName, BindingFlags.Public | BindingFlags.Static);
Microsoft.CodeAnalysis.EditorFeatures (4)
Lightup\LightupHelpers.cs (4)
127var method = type.GetTypeInfo().GetDeclaredMethod(methodName); 183var method = type.GetTypeInfo().GetDeclaredMethod(methodName); 256var method = type.GetTypeInfo().GetDeclaredMethods(methodName).Single(method => method.GetParameters().Length == 0); 311var method = type.GetTypeInfo().GetDeclaredMethod(methodName);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Threading\StaTaskScheduler.cs (1)
30var getDefaultDomain = typeof(AppDomain).GetMethod("GetDefaultDomain", BindingFlags.NonPublic | BindingFlags.Static);
Threading\WpfTestCaseRunner.cs (1)
35protected override XunitTestRunner CreateTestRunner(ITest test, IMessageBus messageBus, Type testClass, object[] constructorArguments, MethodInfo testMethod, object[] testMethodArguments, string skipReason, IReadOnlyList<BeforeAfterTestAttribute> beforeAfterAttributes, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Threading\WpfTestRunner.cs (1)
42MethodInfo testMethod,
Threading\WpfTestSharedData.cs (1)
39public void ExecutingTest(MethodInfo testMethod)
Threading\WpfTheoryTestCaseRunner.cs (1)
35protected 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.CodeAnalysis.EditorFeatures.UnitTests (1)
Options\GlobalOptionsTests.cs (1)
137var getValueOrDefault = property.PropertyType.GetMethod("GetValueOrDefault", []);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (5)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (13)
Debugger\Engine\DkmClrValue.cs (1)
337var method = type.GetMethod(name, bindingFlags);
Debugger\MemberInfo\MethodInfoImpl.cs (2)
18internal readonly System.Reflection.MethodInfo Method; 20internal MethodInfoImpl(System.Reflection.MethodInfo method)
Debugger\MemberInfo\PropertyInfoImpl.cs (2)
112var method = this.Property.GetGetMethod(nonPublic); 123var setMethod = this.Property.GetSetMethod(nonPublic);
Debugger\MemberInfo\TypeImpl.cs (3)
223return new MethodInfoImpl((System.Reflection.MethodInfo)member); 310private static ExplicitInterfaceInfo MakeExplicitInterfaceInfo(System.Reflection.MethodInfo interfaceMethod, System.Reflection.MethodInfo implementingMethod)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
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 (6)
SemanticSearch\AbstractSemanticSearchService.cs (4)
176if (!TryGetFindMethod(queryAssembly, out var findMethod, out var queryKind, out var errorMessage, out var errorMessageArgs)) 251[NotNullWhen(true)] out MethodInfo? method, 274using var _ = ArrayBuilder<MethodInfo>.GetInstance(out var candidates); 277foreach (var candidate in program.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance))
SemanticSearch\QueryExecutionContext.cs (1)
26MethodInfo method,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
62var methodInfo = compilerAnalyzerType.GetMethod("GetSupportedErrorCodes", BindingFlags.Instance | BindingFlags.NonPublic)!;
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
74var methodInfo = ((Delegate)continuationFunction!).GetMethodInfo();
Microsoft.CodeAnalysis.LanguageServer (4)
Services\StarredCompletions\StarredCompletionsAssemblyHelper.cs (4)
109var createCompletionProviderMethodInfo = GetMethodInfo(starredCompletionsAssembly, CompletionHelperClassFullName, CreateCompletionProviderMethodName); 123private static MethodInfo GetMethodInfo(Assembly assembly, string className, string methodName) 130var createCompletionProviderMethodInto = completionHelperType?.GetMethod(methodName); 138private static async Task<CompletionProvider> CreateCompletionProviderAsync(MethodInfo createCompletionProviderMethodInfo, IServiceBroker serviceBroker, string modelBasePath, ILogger logger)
Microsoft.CodeAnalysis.LanguageServer.Protocol (21)
Protocol\Converters\SumConverter.cs (2)
130private static readonly MethodInfo expressionLambdaMethod = typeof(Expression) 141private static readonly MethodInfo jsonSerializerDeserializeMethod = typeof(JsonSerializer)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (2)
141var entryPoint = delegatingEntryPoint.GetEntryPoint(hasParameters); 202public abstract MethodInfo GetEntryPoint(bool hasParameter);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (4)
123foreach (var methodInfo in handlerType.GetRuntimeMethods()) 131bool MethodInfoMatches(MethodInfo methodInfo) 155static bool NameMatches(MethodInfo methodInfo, string name, string suffix) 162static bool TypesMatch(MethodInfo methodInfo, Type?[] types)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (2)
63private static readonly MethodInfo s_entryPoint = typeof(NewtonsoftDelegatingEntryPoint).GetMethod(nameof(NewtonsoftDelegatingEntryPoint.ExecuteRequestAsync), BindingFlags.NonPublic | BindingFlags.Instance)!; 65public override MethodInfo GetEntryPoint(bool hasParameter)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (8)
57private static readonly MethodInfo s_processQueueCoreAsync = typeof(RequestExecutionQueue<TRequestContext>) 76private readonly FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo)>>> _handlerInfoMap; 94private static FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>> BuildHandlerMap(AbstractHandlerProvider handlerProvider, AbstractTypeRefResolver typeRefResolver) 96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>(); 115var method = s_processQueueCoreAsync.MakeGenericMethod(requestType, responseType); 310MethodInfo methodInfo, 413private (RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo) GetHandlerForRequest(IQueueItem<TRequestContext> work, string language)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (3)
62private static readonly MethodInfo s_parameterlessEntryPoint = typeof(SystemTextJsonDelegatingEntryPoint).GetMethod(nameof(SystemTextJsonDelegatingEntryPoint.ExecuteRequest0Async), BindingFlags.NonPublic | BindingFlags.Instance)!; 63private static readonly MethodInfo s_entryPoint = typeof(SystemTextJsonDelegatingEntryPoint).GetMethod(nameof(SystemTextJsonDelegatingEntryPoint.ExecuteRequestAsync), BindingFlags.NonPublic | BindingFlags.Instance)!; 65public override MethodInfo GetEntryPoint(bool hasParameter)
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
DeclarePublicApiAnalyzer.cs (2)
282var getOptionsMethod = provider.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "GetOptions"); 289var tryGetValueMethod = options.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetValue");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Microsoft.CodeAnalysis.Scripting (11)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
385var getter = property.GetMethod; 391var setter = property.SetMethod;
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (7)
153var getter = property.GetMethod; 161var method = currentType.GetDeclaredMethod(memberName, Type.EmptyTypes); 199MethodInfo method; 205else if ((method = member as MethodInfo) != null) 214var getter = ((PropertyInfo)member).GetMethod; 246MethodInfo method; 253if ((method = member as MethodInfo) != null)
ScriptBuilder.cs (2)
161var runtimeEntryPoint = GetEntryPointRuntimeMethod(entryPoint, assembly); 189internal static MethodInfo GetEntryPointRuntimeMethod(IMethodSymbol entryPoint, Assembly assembly)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ObjectFormatterFixtures\Custom.cs (1)
61public static readonly MethodInfo Arrays = typeof(Signatures).GetMethod(nameof(ArrayParameters));
Microsoft.CodeAnalysis.Test.Utilities (8)
Assert\UseCultureAttribute.cs (2)
77public override void Before(MethodInfo methodUnderTest) 93public override void After(MethodInfo methodUnderTest)
Metadata\ILValidation.cs (2)
193private static MethodInfo s_peheaderSizeMethod; 240private static MethodInfo s_getContentToSignMethod;
Platform\CoreClr\TestExecutionLoadContext.cs (1)
67var entryPoint = mainAssembly.EntryPoint;
Platform\Custom\MetadataSignatureHelper.cs (3)
417private static void AppendMethodInfo(MethodInfo method, StringBuilder sb) 678foreach (var method in type.GetMethods(BINDING_FLAGS).OrderBy((member) => member.Name)) 730foreach (var method in type.GetMethods(BINDING_FLAGS))
Microsoft.CodeAnalysis.UnitTests (18)
AnalyzerAssemblyLoaderTests.cs (11)
119MethodInfo method, 221var member = type.GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance)!; 374var writeMethod = b.GetType().GetMethod("Write")!; 552var writeMethod = b.GetType().GetMethod("Write")!; 584var writeMethod = b.GetType().GetMethod("Write")!; 700var writeMethod = b.GetType().GetMethod("Write")!; 738var writeMethod = b.GetType().GetMethod("Write")!; 1148var eWrite = e.GetType().GetMethod("Write")!; 1530var writeMethod = b.GetType().GetMethod("Write")!; 1615var methodInfo = assembly 1638var methodInfo = assembly
Collections\ImmutableSegmentedListTest.cs (2)
802var createMethod = typeof(ImmutableSegmentedList).GetMethods().Where(m => m.Name == "Create" && m.GetParameters().Length == 0).Single().MakeGenericMethod(dummType!.AsType()); 805var addMethod = list.GetType().GetMethod("Add");
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
57foreach (var method in type.DeclaredMethods)
Collections\SegmentedArrayHelperTests.cs (4)
82var getSegmentSizeMethod = typeof(SegmentedArrayHelper).GetMethod(nameof(SegmentedArrayHelper.GetSegmentSize), BindingFlags.Static | BindingFlags.NonPublic).MakeGenericMethod(type); 90var getSegmentShiftMethod = typeof(SegmentedArrayHelper).GetMethod(nameof(SegmentedArrayHelper.GetSegmentShift), BindingFlags.Static | BindingFlags.NonPublic).MakeGenericMethod(type); 99var getOffsetMaskMethod = typeof(SegmentedArrayHelper).GetMethod(nameof(SegmentedArrayHelper.GetOffsetMask), BindingFlags.Static | BindingFlags.NonPublic).MakeGenericMethod(type); 106var unsafeSizeOfMethod = typeof(Unsafe).GetMethod(nameof(Unsafe.SizeOf)).MakeGenericMethod(type);
Microsoft.CodeAnalysis.Workspaces (4)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
74var methodInfo = ((Delegate)continuationFunction!).GetMethodInfo();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
Rpc\RpcServer.cs (1)
114var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance);
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (3)
97internal static MethodInfo? GetDeclaredMethod(this TypeInfo typeInfo, string name, params Type[] paramTypes) 107public static T? CreateDelegate<T>(this MethodInfo? methodInfo) 143public static T? Invoke<T>(this MethodInfo methodInfo, object obj, params object?[] args)
src\Compilers\Core\Portable\InternalUtilities\UICultureUtilities.cs (3)
32var currentUICultureSetter = type.GetTypeInfo().GetDeclaredProperty(currentUICultureName)?.SetMethod; 71var currentThreadGetter = typeInfo.GetDeclaredProperty(currentThreadName)?.GetMethod; 78var currentUICultureSetter = typeInfo.GetDeclaredProperty(currentUICultureName)?.SetMethod;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (1)
114var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
MEF\UseExportProviderAttribute.cs (2)
65public override void Before(MethodInfo? methodUnderTest) 87public override void After(MethodInfo? methodUnderTest)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Remote\ServiceDescriptorTests.cs (1)
116foreach (var method in interfaceType.GetMethods())
Microsoft.CodeAnalysis.XunitHook (1)
XunitDisposeHook.cs (1)
36var method = appDomainManagerType.GetMethod("Dispose");
Microsoft.CommonLanguageServerProtocol.Framework.Package (19)
AbstractLanguageServer.cs (2)
141var entryPoint = delegatingEntryPoint.GetEntryPoint(hasParameters); 202public abstract MethodInfo GetEntryPoint(bool hasParameter);
MethodHandlerDetails.cs (4)
123foreach (var methodInfo in handlerType.GetRuntimeMethods()) 131bool MethodInfoMatches(MethodInfo methodInfo) 155static bool NameMatches(MethodInfo methodInfo, string name, string suffix) 162static bool TypesMatch(MethodInfo methodInfo, Type?[] types)
NewtonsoftLanguageServer.cs (2)
63private static readonly MethodInfo s_entryPoint = typeof(NewtonsoftDelegatingEntryPoint).GetMethod(nameof(NewtonsoftDelegatingEntryPoint.ExecuteRequestAsync), BindingFlags.NonPublic | BindingFlags.Instance)!; 65public override MethodInfo GetEntryPoint(bool hasParameter)
RequestExecutionQueue.cs (8)
57private static readonly MethodInfo s_processQueueCoreAsync = typeof(RequestExecutionQueue<TRequestContext>) 76private readonly FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo)>>> _handlerInfoMap; 94private static FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>> BuildHandlerMap(AbstractHandlerProvider handlerProvider, AbstractTypeRefResolver typeRefResolver) 96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>(); 115var method = s_processQueueCoreAsync.MakeGenericMethod(requestType, responseType); 310MethodInfo methodInfo, 413private (RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo) GetHandlerForRequest(IQueueItem<TRequestContext> work, string language)
SystemTextJsonLanguageServer.cs (3)
62private static readonly MethodInfo s_parameterlessEntryPoint = typeof(SystemTextJsonDelegatingEntryPoint).GetMethod(nameof(SystemTextJsonDelegatingEntryPoint.ExecuteRequest0Async), BindingFlags.NonPublic | BindingFlags.Instance)!; 63private static readonly MethodInfo s_entryPoint = typeof(SystemTextJsonDelegatingEntryPoint).GetMethod(nameof(SystemTextJsonDelegatingEntryPoint.ExecuteRequestAsync), BindingFlags.NonPublic | BindingFlags.Instance)!; 65public override MethodInfo GetEntryPoint(bool hasParameter)
Microsoft.CSharp (33)
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\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.RemoteExecutor (3)
Program.cs (1)
42MethodInfo mi = null;
RemoteExecutor.cs (2)
407private static RemoteInvokeHandle Invoke(MethodInfo method, string[] args, 585private static MethodInfo GetMethodInfo(Delegate d)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (16)
HelperFactory.cs (16)
51foreach (var method in GetAllMethods(type)) 77foreach (var method in GetAllMethods(type)) 100private static IEnumerable<MethodInfo> GetAllMethods(Type type) 104foreach (var method in type.GetRuntimeMethods()) 112private static (string name, HandlebarsBlockHelper helper) CreateBlockHelperForMethod(MethodInfo method, object instance) 119private static (string name, HandlebarsHelper helper) CreateHelperForMethod(MethodInfo method, object instance) 126private static HandlebarsBlockHelper CreateBlockHelperFunctionForMethod(MethodInfo method, object instance) 173private static HandlebarsHelper CreateHelperFunctionForMethod(MethodInfo method, object instance) 207private static MethodInfo ObjectToString = typeof(object).GetMethod("ToString"); 209private static MethodInfo HandlebarsExtensionsWriteSafeString = typeof(HandlebarsExtensions).GetMethod( 213private static MethodInfo EnumerableSkip(Type member) => 216private static MethodInfo EnumerableToArray(Type member) => 219private static MethodInfo EnumerableSelect(Type input, Type output) => 227private static MethodInfo ConvertChangeType = typeof(Convert).GetMethod( 231private static MethodInfo HandlebarsUtilsIsTruthyOrNonEmpty = typeof(HandlebarsUtils).GetMethod("IsTruthyOrNonEmpty"); 247private static IEnumerable<Expression> GetParameterExpressions(MethodInfo method, ParameterExpression argumentsParameter, List<ProvidedParameter> providedParameters)
Microsoft.DotNet.XUnitExtensions (3)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (2)
38MethodInfo testMethodInfo = testMethod.Method.ToRuntimeMethod(); 155MethodInfo mi = ti.GetDeclaredMethod(name);
src\Microsoft.DotNet.XUnitExtensions.Shared\XunitParallelTheoryTestCaseRunner.cs (1)
95MethodInfo methodToRun = TestMethod;
Microsoft.DotNet.XUnitV3Extensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (2)
36MethodInfo testMethodInfo = testMethod.Method; 155MethodInfo mi = ti.GetDeclaredMethod(name);
Microsoft.Extensions.AI (25)
Functions\AIFunctionFactory.cs (22)
231/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 326public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 334/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 426public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null) 443/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> for 553MethodInfo method, 565public static ReflectionAIFunction Build(MethodInfo method, object? target, AIFunctionFactoryOptions options) 591MethodInfo method, 640public override MethodInfo UnderlyingMethod => FunctionDescriptor.Method; 705public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method, AIFunctionFactoryOptions options) 816public MethodInfo Method { get; } 823private static string GetFunctionName(MethodInfo method) 838static bool IsAsyncMethod(MethodInfo method) 1076MethodInfo taskResultGetter = GetMethodFromGenericMethodDefinition(returnType, _taskGetResult); 1099MethodInfo valueTaskAsTask = GetMethodFromGenericMethodDefinition(returnType, _valueTaskAsTask); 1100MethodInfo asTaskResultGetter = GetMethodFromGenericMethodDefinition(valueTaskAsTask.ReturnType, _taskGetResult); 1152private static readonly MethodInfo _taskGetResult = typeof(Task<>).GetProperty(nameof(Task<int>.Result), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!; 1153private static readonly MethodInfo _valueTaskAsTask = typeof(ValueTask<>).GetMethod(nameof(ValueTask<int>.AsTask), BindingFlags.Instance | BindingFlags.Public)!; 1155private static MethodInfo GetMethodFromGenericMethodDefinition(Type specializedType, MethodInfo genericMethodDefinition) 1159return (MethodInfo)specializedType.GetMemberWithSameMetadataDefinitionAs(genericMethodDefinition); 1167MethodInfo Method,
Functions\AIFunctionFactory.Utilities.cs (1)
39private static object? ReflectionInvoke(MethodInfo method, object? target, object?[]? arguments)
Functions\AIFunctionFactoryOptions.cs (2)
42/// The name to use for the function. The default value is a name derived from the method represented by the passed <see cref="Delegate"/> or <see cref="MethodInfo"/>. 48/// The description for the function. The default value is a description derived from the passed <see cref="Delegate"/> or <see cref="MethodInfo"/>, if possible
Microsoft.Extensions.AI.Abstractions (10)
Functions\AIFunction.cs (2)
42/// Gets the underlying <see cref="MethodInfo"/> that this <see cref="AIFunction"/> might be wrapping. 47public virtual MethodInfo? UnderlyingMethod => null;
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (8)
104case MethodInfo method: 105MethodInfo metaMethod = GetMethodMetadataDefinition(method); 135private static MethodInfo GetMethodMetadataDefinition(MethodInfo method) 142return (MethodInfo)GetMemberMetadataDefinition(method); 199MethodInfo? getter = propertyInfo.GetGetMethod(true); 200MethodInfo? setter = propertyInfo.GetSetMethod(true); 440if (property.GetGetMethod(true) is MethodInfo method)
Microsoft.Extensions.Configuration.Binder (5)
ConfigurationBinder.cs (5)
649MethodInfo? addMethod = dictionaryType.GetMethod("Add", DeclaredOnlyLookup); 721MethodInfo tryGetValue = dictionaryType.GetMethod("TryGetValue", DeclaredOnlyLookup)!; 771MethodInfo? addMethod = collectionType.GetMethod("Add", DeclaredOnlyLookup); 876MethodInfo? addMethod = type.GetMethod("Add", DeclaredOnlyLookup); 1063MethodInfo? setMethod = property.GetSetMethod(true);
Microsoft.Extensions.DependencyInjection (16)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
120static 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)
37private static readonly MethodInfo GetServiceInfo =
Microsoft.Extensions.Hosting.Testing.Tests (1)
HostTerminatorServiceTests.cs (1)
70var methodInfo = typeof(HostTerminatorService)
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.cs (1)
326System.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\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.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.LanguageServices (6)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (2)
66var extensionManager_GetEnabledExtensionsMethod = extensionManagerType.GetRuntimeMethod("GetEnabledExtensions", [typeof(string)]); 88var extensionType_GetContentMethod = extensionType.GetRuntimeMethod("GetContentLocation", [_typeIExtensionContent]);
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
103var methodInfo = method as MethodInfo;
Interactive\VsInteractiveWindowPackage.cs (2)
72var handlerSetter = type.GetDeclaredMethod("set_Handler"); 73var nonFatalHandlerSetter = type.GetDeclaredMethod("set_NonFatalHandler");
MSBuild (4)
LogMessagePacketBase.cs (4)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 412MethodInfo methodInfo = null; 524private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo)
MSBuildTaskHost (7)
LogMessagePacketBase.cs (7)
273private static readonly Dictionary<LoggingEventType, MethodInfo> s_readMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 412MethodInfo methodInfo = null; 481MethodInfo methodInfo = null; 524private static Delegate CreateDelegateRobust(Type type, Object firstArgument, MethodInfo methodInfo)
mscorlib (1)
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))]
PresentationBuildTasks (34)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1843if (desc.MemberInfo is MethodInfo mi) 1899MethodInfo mi = (MethodInfo)memberInfo; 2034MethodInfo methodInvoke = eventHandlerType.GetMethod("Invoke");
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (1)
4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (3)
3202else if (dynamicObject is MethodInfo methodInfo) 3515MethodInfo methodInfo = propertyMember as MethodInfo;
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\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlAttributeProperties.cs (2)
328internal static MethodInfo XmlSpaceSetter 345private static MethodInfo _xmlSpaceSetter = null;
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)
1474private 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 (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Shared (8)
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (8)
104case MethodInfo method: 105MethodInfo metaMethod = GetMethodMetadataDefinition(method); 135private static MethodInfo GetMethodMetadataDefinition(MethodInfo method) 142return (MethodInfo)GetMemberMetadataDefinition(method); 199MethodInfo? getter = propertyInfo.GetGetMethod(true); 200MethodInfo? setter = propertyInfo.GetSetMethod(true); 440if (property.GetGetMethod(true) is MethodInfo method)
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
37protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
37protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper)
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)
271var 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)
52MethodInfo method = type.GetMethod("Invoke")!; 79internal static string GetTypeIdentityFromMethod(MethodInfo method) 84internal 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)
155MethodInfo? 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)
1281MethodInfo? getMethod = providerType.GetMethod("Get" + provideAttr.PropertyName, new Type[] { receiverType }); 1285MethodInfo? setMethod = providerType.GetMethod("Set" + provideAttr.PropertyName, new Type[] { receiverType, getMethod.ReturnType }); 1378MethodInfo? getMethod = propertyInfo.GetGetMethod(nonPublic: false); 1379MethodInfo? 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.Linq.Expressions (499)
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)
70private static readonly CacheDict<Type, MethodInfo> s_thunks = new CacheDict<Type, MethodInfo>(256); 71private static readonly MethodInfo s_FuncInvoke = typeof(Func<object?[], object?>).GetMethod("Invoke")!; 72private static readonly MethodInfo s_ArrayEmpty = GetEmptyObjectArrayMethod(); 73private static readonly MethodInfo[] s_ActionThunks = GetActionThunks(); 74private static readonly MethodInfo[] s_FuncThunks = GetFuncThunks(); 107private static MethodInfo GetEmptyObjectArrayMethod() => ((Func<object[]>)Array.Empty<object>).GetMethodInfo(); 109private static MethodInfo[] GetActionThunks() 112return new MethodInfo[]{delHelpers.GetMethod("ActionThunk")!, 117private static MethodInfo[] GetFuncThunks() 120return new MethodInfo[]{delHelpers.GetMethod("FuncThunk")!, 128private static MethodInfo? GetCSharpThunk(Type returnType, bool hasReturnValue, ParameterInfo[] parameters) 161MethodInfo uninstantiatedMethod; 203if (!s_thunks.TryGetValue(delegateType, out MethodInfo? thunkMethod)) 205MethodInfo 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 (46)
61private static MethodInfo? s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle; 62public static MethodInfo MethodBase_GetMethodFromHandle_RuntimeMethodHandle => 65private static MethodInfo? s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle_RuntimeTypeHandle; 66public static MethodInfo MethodBase_GetMethodFromHandle_RuntimeMethodHandle_RuntimeTypeHandle => 69private static MethodInfo? s_MethodInfo_CreateDelegate_Type_Object; 70public static MethodInfo MethodInfo_CreateDelegate_Type_Object => 71s_MethodInfo_CreateDelegate_Type_Object ??= typeof(MethodInfo).GetMethod(nameof(MethodInfo.CreateDelegate), new[] { typeof(Type), typeof(object) })!; 73private static MethodInfo? s_String_op_Equality_String_String; 74public static MethodInfo String_op_Equality_String_String => 77private static MethodInfo? s_String_Equals_String_String; 78public static MethodInfo String_Equals_String_String => 81private static MethodInfo? s_DictionaryOfStringInt32_Add_String_Int32; 82public static MethodInfo DictionaryOfStringInt32_Add_String_Int32 => 89private static MethodInfo? s_Type_GetTypeFromHandle; 90public static MethodInfo Type_GetTypeFromHandle => 93private static MethodInfo? s_Object_GetType; 94public static MethodInfo Object_GetType => 97private static MethodInfo? s_Decimal_op_Implicit_Byte; 98public static MethodInfo Decimal_op_Implicit_Byte => 101private static MethodInfo? s_Decimal_op_Implicit_SByte; 102public static MethodInfo Decimal_op_Implicit_SByte => 105private static MethodInfo? s_Decimal_op_Implicit_Int16; 106public static MethodInfo Decimal_op_Implicit_Int16 => 109private static MethodInfo? s_Decimal_op_Implicit_UInt16; 110public static MethodInfo Decimal_op_Implicit_UInt16 => 113private static MethodInfo? s_Decimal_op_Implicit_Int32; 114public static MethodInfo Decimal_op_Implicit_Int32 => 117private static MethodInfo? s_Decimal_op_Implicit_UInt32; 118public static MethodInfo Decimal_op_Implicit_UInt32 => 121private static MethodInfo? s_Decimal_op_Implicit_Int64; 122public static MethodInfo Decimal_op_Implicit_Int64 => 125private static MethodInfo? s_Decimal_op_Implicit_UInt64; 126public static MethodInfo Decimal_op_Implicit_UInt64 => 129private static MethodInfo? s_Decimal_op_Implicit_Char; 130public static MethodInfo Decimal_op_Implicit_Char => 133private static MethodInfo? s_Math_Pow_Double_Double; 134public static MethodInfo Math_Pow_Double_Double => 150private static MethodInfo? s_RuntimeOps_CreateRuntimeVariables_ObjectArray_Int64Array; 151public static MethodInfo RuntimeOps_CreateRuntimeVariables_ObjectArray_Int64Array => 154private static MethodInfo? s_RuntimeOps_CreateRuntimeVariables; 155public static MethodInfo RuntimeOps_CreateRuntimeVariables => 158private static MethodInfo? s_RuntimeOps_MergeRuntimeVariables; 159public static MethodInfo RuntimeOps_MergeRuntimeVariables => 162private static MethodInfo? s_RuntimeOps_Quote; 163public static MethodInfo 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)
283MethodInfo? opFalse = TypeUtils.GetBooleanOperator(b.Method.DeclaringType!, "op_False"); 389MethodInfo? 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"); 1585MethodInfo? equality = String_op_Equality_String_String; 2139private void CompileMethodCallExpression(Expression @object, MethodInfo method, IArgumentProvider arguments) 2486MethodInfo method = pi.GetGetMethod(nonPublic: true)!; 2670MethodInfo compMethod = LambdaExpression.GetCompileMethod(node.Expression.Type); 2706MethodInfo add = initializer.AddMethod; 3248private readonly MethodInfo _indexer; 3252public 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)
339if (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)
58MethodInfo 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\libraries\Common\src\System\Net\CookieParser.cs (1)
538MethodInfo? method = typeof(Cookie).GetMethod("InternalSetName", BindingFlags.Instance | BindingFlags.NonPublic);
System.Net.Security (3)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (3)
115MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 116MethodInfo? sendAsyncMethod = httpClientType.GetMethod("SendAsync", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 122MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
System.Private.CoreLib (295)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
340MethodInfo methodInfo = type.GetMethod(methodName, bindingFlags) ??
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (3)
137MethodInfo entry = assembly.EntryPoint ?? 410MethodInfo? mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static); 424MethodInfo mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static) ??
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (1)
89MethodInfo? mi = typeDescriptorType?.GetMethod("ConvertFromInvariantString", BindingFlags.NonPublic | BindingFlags.Static);
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (1)
579if (candidates[i] is not MethodInfo methodInfo)
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (3)
55public static Delegate CreateDelegate(Type type, object? firstArgument, MethodInfo method) => CreateDelegate(type, firstArgument, method, throwOnBindFailure: true)!; 58public static Delegate CreateDelegate(Type type, MethodInfo method) => CreateDelegate(type, method, throwOnBindFailure: true)!; 156public MethodInfo Method => GetMethodImpl();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrame.cs (1)
211if (_method is MethodInfo methodInfo && methodInfo.IsGenericMethod)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (4)
269if (mb is MethodInfo mi && mi.IsGenericMethod) 451static MethodInfo[]? GetDeclaredMethods(Type type) => 454MethodInfo[]? methods = GetDeclaredMethods(parentType); 460foreach (MethodInfo candidateMethod in methods)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
3149MethodInfo[] methods = eventSourceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 3232MethodInfo method = methods[i]; 3602EventMetadata[] eventData, MethodInfo method, EventAttribute eventAttribute, 3696private static int GetHelperCallFirstArg(MethodInfo method) 3932MethodInfo? getInstanceMethod = metricsEventSourceType.GetMethod("GetInstance", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static, null, Type.EmptyTypes, null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
43MethodInfo? getterInfo = propertyInfo.GetGetMethod();
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
86public virtual MethodInfo? EntryPoint => throw NotImplemented.ByDesign;
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (1)
175MethodInfo? getAssemblyNameMethod = readerType.GetMethod(
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (1)
59public override MethodInfo? EntryPoint => null;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
330public override MethodInfo GetBaseDefinition() => this;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (5)
40public abstract void Emit(OpCode opcode, MethodInfo meth); 47public abstract void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes); 111MethodInfo mi = consoleType.GetMethod("WriteLine", s_parameterTypes)!; 131MethodInfo mi = typeof(IO.TextWriter).GetMethod("WriteLine", [cls]) ?? 163MethodInfo mi = typeof(IO.TextWriter).GetMethod("WriteLine", [cls]) ??
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\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\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\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
384protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 391public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (6)
142public void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration) 150protected abstract void DefineMethodOverrideCore(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration); 327public static MethodInfo GetMethod(Type type, MethodInfo method)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (2)
171protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 174public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { throw new NotSupportedException(); }
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\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\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (14)
229il.Emit(OpCodes.Call, (MethodInfo)method); 233il.Emit(OpCodes.Callvirt, (MethodInfo)method); 328private static MethodInfo? s_Span_get_Item; 329public static MethodInfo Span_get_Item() => 332private static MethodInfo? s_ThrowHelper_Throw_NullReference_InvokeNullRefReturned; 333public static MethodInfo ThrowHelper_Throw_NullReference_InvokeNullRefReturned() => 336private static MethodInfo? s_Object_GetRawData; 337public static MethodInfo Object_GetRawData() => 340private static MethodInfo? s_Pointer_Box; 341public static MethodInfo Pointer_Box() => 344private static MethodInfo? s_Type_GetTypeFromHandle; 345public static MethodInfo Type_GetTypeFromHandle() => 353private static MethodInfo? s_NextCallReturnAddress; 354public static MethodInfo NextCallReturnAddress() =>
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\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\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (2)
108protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 113public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
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\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\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (1)
76return ((MethodInfo)MemberImpl).ReturnParameter;
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\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\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (3)
127public sealed override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 142protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 145protected 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\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (1)
102internal static Type? TryResolveAgainstGenericMethod(this SignatureType signatureType, MethodInfo genericMethod)
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\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\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
105MethodInfo? binaryFormatterDeserialize = binaryFormatterType.GetMethod("Deserialize", [typeof(Stream)]); 124private static Func<object, Stream, object> CreateUntypedDelegate<TInstance>(MethodInfo method)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
522public static void Prelink(MethodInfo m) 535MethodInfo[] mi = c.GetMethods();
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (12)
561MethodInfo[]? finalists = null; 562MethodInfo? finalist = null; 567MethodInfo[] semiFinalists = GetMethods(this, name, bindingFlags)!; 571static MethodInfo[]? GetMethods(RuntimeType thisType, string name, BindingFlags bindingFlags) 572=> thisType.GetMember(name, MemberTypes.Method, bindingFlags) as MethodInfo[]; 574List<MethodInfo>? results = null; 578MethodInfo semiFinalist = semiFinalists[i]; 590results ??= new List<MethodInfo>(semiFinalists.Length) { finalist }; 615List<MethodInfo>? results = null; 619MethodInfo? semiFinalist = null; 642results ??= new List<MethodInfo>(semiFinalists.Length) { finalist }; 676object? result = ((MethodInfo)invokeMethod).Invoke(target, bindingFlags, binder, providedArgs, culture);
src\libraries\System.Private.CoreLib\src\System\Security\SecurityException.cs (1)
87public MethodInfo? Method { get; set; }
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (2)
172MethodInfo? initializeMethod = type.GetMethod(InitializeMethodName, 186MethodInfo? wrongSigMethod = type.GetMethod(InitializeMethodName,
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\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
149MethodInfo?[]? m = null; 436attr = ((MethodInfo)m).Attributes;
src\System\Attribute.CoreCLR.cs (2)
92MethodInfo? propAccessor = property.GetGetMethod(true) ?? property.GetSetMethod(true); 165MethodInfo? add = ev.GetAddMethod(true);
src\System\Delegate.CoreCLR.cs (9)
135if (_methodBase is MethodInfo && d._methodBase is MethodInfo) 159protected virtual MethodInfo GetMethodImpl() 161if (_methodBase is MethodInfo methodInfo) 211MethodInfo invoke = this.GetType().GetMethod("Invoke")!; 217_methodBase = (MethodInfo)RuntimeType.GetMethodBase(declaringType, method)!; 218return (MethodInfo)_methodBase; 296public static Delegate? CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure) 331public static Delegate? CreateDelegate(Type type, object? firstArgument, MethodInfo method, bool throwOnBindFailure)
src\System\Diagnostics\StackFrameHelper.cs (1)
117MethodInfo? symbolsMethodInfo = symbolsType.GetMethod("GetSourceLineInfo", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, parameterTypes, null);
src\System\MulticastDelegate.CoreCLR.cs (5)
196internal void StoreDynamicMethod(MethodInfo dynamicMethod) 497protected override MethodInfo GetMethodImpl() 518if (_methodBase is MethodInfo methodInfo) 534_methodBase = (MethodInfo)RuntimeType.GetMethodBase(declaringType, method)!; 535return (MethodInfo)_methodBase;
src\System\Reflection\Associates.cs (4)
21internal static bool IncludeAccessor(MethodInfo? associate, bool nonPublic) 120out MethodInfo[]? other, 137List<MethodInfo>? otherList = null; 192otherList ??= new List<MethodInfo>(cAssociates);
src\System\Reflection\Emit\DynamicILGenerator.cs (4)
55public override void Emit(OpCode opcode, MethodInfo meth) 247public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes) 396private int GetMemberRefToken(MethodInfo methodInfo, Type[]? optionalParameterTypes) 839internal override MethodInfo GetDynamicMethod() => m_method;
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (2)
106protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 116public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (2)
109protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 112public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { throw new NotSupportedException(); }
src\System\Reflection\Emit\RuntimeILGenerator.cs (5)
60internal MethodInfo m_methodBuilder; 81internal RuntimeILGenerator(MethodInfo methodBuilder) : this(methodBuilder, 64) 85internal RuntimeILGenerator(MethodInfo methodBuilder, int size) 488public override void Emit(OpCode opcode, MethodInfo meth) 605public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes)
src\System\Reflection\Emit\RuntimeLocalBuilder.cs (4)
11private readonly MethodInfo m_methodBuilder; 16internal RuntimeLocalBuilder(int localIndex, Type localType, MethodInfo methodBuilder) 18internal RuntimeLocalBuilder(int localIndex, Type localType, MethodInfo methodBuilder, bool isPinned) 28internal MethodInfo GetMethodBuilder() => m_methodBuilder;
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (6)
244if (method is MethodInfo mi) 450public override MethodInfo GetBaseDefinition() 462MethodInfo rmi = m_containingType.GetMethod(m_strName, m_parameterTypes!)!; 474MethodInfo rmi = m_containingType.GetMethod(m_strName, m_parameterTypes!)!; 504public override MethodInfo GetGenericMethodDefinition() { if (!IsGenericMethod) throw new InvalidOperationException(); return this; } 512public override MethodInfo MakeGenericMethod(params Type[] typeArguments)
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (13)
329MethodInfo? masmi = method as MethodInfo; 395MethodInfo? masmi = methodBase as MethodInfo; 471ParameterInfo? returnParameter = method is MethodInfo mi ? mi.ReturnParameter : null; 716public override MethodInfo[] GetMethods(BindingFlags bindingFlags) 722protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 943public override int GetMethodMetadataToken(MethodInfo method) 955private int GetMethodTokenNoLock(MethodInfo method, bool getGenericTypeDefinition) 1060MethodInfo? methodInfo = method as MethodInfo; 1068MethodInfo methodInfoUnbound = methodInfo; 1151protected override MethodInfo GetArrayMethodCore(Type arrayClass, string methodName, CallingConventions callingConvention,
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (5)
131public override MethodInfo[] GetAccessors(bool nonPublic) 136public override MethodInfo? GetGetMethod(bool nonPublic) 146public override MethodInfo? GetSetMethod(bool nonPublic) 202private MethodInfo? m_getMethod; 203private MethodInfo? m_setMethod;
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (4)
681protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 698public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 1066protected override void DefineMethodOverrideCore(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
src\System\Reflection\Emit\SymbolMethod.cs (1)
110public override MethodInfo GetBaseDefinition()
src\System\Reflection\RuntimeAssembly.cs (2)
173public override MethodInfo? EntryPoint 184return (MethodInfo?)RuntimeType.GetMethodBase(methodHandle);
src\System\Reflection\RuntimeEventInfo.cs (9)
22private readonly MethodInfo[]? m_otherMethod; 135public override MethodInfo[] GetOtherMethods(bool nonPublic) 137List<MethodInfo> ret = new List<MethodInfo>(); 140return Array.Empty<MethodInfo>(); 144if (Associates.IncludeAccessor((MethodInfo)m_otherMethod[i], nonPublic)) 151public override MethodInfo? GetAddMethod(bool nonPublic) 159public override MethodInfo? GetRemoveMethod(bool nonPublic) 167public override MethodInfo? GetRaiseMethod(bool nonPublic)
src\System\Reflection\RuntimeExceptionHandlingClause.cs (1)
59_methodBody._methodBase is MethodInfo ? _methodBody._methodBase.GetGenericArguments() : null);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (7)
324public override MethodInfo GetBaseDefinition() 347return (MethodInfo)RuntimeType.GetMethodBase(baseDeclaringType, baseMethodHandle)!; 397public override MethodInfo MakeGenericMethod(params Type[] methodInstantiation) 430MethodInfo? ret; 435RuntimeMethodHandle.GetStubIfNeeded(new RuntimeMethodHandleInternal(m_handle), m_declaringType, methodInstantionRuntimeType)) as MethodInfo; 452public override MethodInfo GetGenericMethodDefinition() 457return (RuntimeType.GetMethodBase(m_declaringType, RuntimeMethodHandle.StripMethodInstantiation(this)) as MethodInfo)!;
src\System\Reflection\RuntimeModule.cs (4)
322protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 329internal MethodInfo? GetMethodInternal(string name, BindingFlags bindingAttr, Binder? binder, 471public override MethodInfo[] GetMethods(BindingFlags bindingFlags) 474return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeParameterInfo.cs (1)
199internal RuntimeParameterInfo(MethodInfo owner, string? name, Type parameterType, int position)
src\System\Reflection\RuntimePropertyInfo.cs (4)
23private readonly MethodInfo[]? m_otherMethod; 228public override MethodInfo[] GetAccessors(bool nonPublic) 230List<MethodInfo> accessorList = new List<MethodInfo>();
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (1)
215private static void PrelinkCore(MethodInfo m)
src\System\RuntimeHandles.cs (1)
2209internal abstract MethodInfo GetDynamicMethod();
src\System\RuntimeType.CoreCLR.cs (21)
1310MethodInfo? associateMethod = propertyInfo.GetGetMethod() ?? propertyInfo.GetSetMethod(); 1635internal MethodInfo GetGenericMethodInfo(RuntimeMethodHandleInternal genericMethod) 2207MethodInfo? methodInfo = memberInfo as MethodInfo; 2498private ListBuilder<MethodInfo> GetMethodCandidates( 2506ListBuilder<MethodInfo> candidates = new ListBuilder<MethodInfo>(cache.Length); 2637public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 2682ListBuilder<MethodInfo> methods = GetMethodCandidates(null, GenericParameterCountAny, bindingAttr, CallingConventions.Any, null, false); 2736im.InterfaceMethods = new MethodInfo[ifaceVirtualMethodCount]; 2737im.TargetMethods = new MethodInfo[ifaceVirtualMethodCount]; 2746im.InterfaceMethods[i] = (MethodInfo)ifaceMethodBase; 2778protected override MethodInfo? GetMethodImpl( 2786protected override MethodInfo? GetMethodImpl( 2793private MethodInfo? GetMethodImplCommon( 2797ListBuilder<MethodInfo> candidates = GetMethodCandidates(name, genericParameterCount, bindingAttr, callConv, types, false); 2804MethodInfo firstCandidate = candidates[0]; 2814MethodInfo methodInfo = candidates[j]; 2820return System.DefaultBinder.FindMostDerivedNewSlotMeth(candidates.ToArray(), candidates.Count) as MethodInfo; 2825return binder.SelectMethod(bindingAttr, candidates.ToArray(), types, modifiers) as MethodInfo; 3032ListBuilder<MethodInfo> methods = default;
System.Private.DataContractSerialization (320)
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; 593private MethodInfo? _onSerializing, _onSerialized; 594private MethodInfo? _onDeserializing, _onDeserialized; 595private MethodInfo? _extensionDataSetMethod; 832MethodInfo? getMethod = property.GetMethod; 835MethodInfo? setMethod = property.SetMethod; 896MethodInfo? getMethod = property.GetGetMethod(); 900MethodInfo? setMethod = property.SetMethod; 1058private static bool IsMethodOverriding(MethodInfo method) 1072MethodInfo[] methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 1075MethodInfo method = methods[i]; 1101private bool IsValidExtensionDataSetMethod(MethodInfo method, ParameterInfo[] parameters) 1118private static bool IsValidCallback(MethodInfo method, ParameterInfo[] parameters, Type attributeType, MethodInfo? currentCallback, ref Type? prevAttributeType) 1161internal MethodInfo? OnSerializing 1170internal MethodInfo? OnSerialized 1179internal MethodInfo? OnDeserializing 1188internal MethodInfo? OnDeserialized 1197internal 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) 123MethodInfo signature = GetInvokeMethod(delegateType); 167internal MethodInfo CurrentMethod 283LocalBuilder enumerator, MethodInfo getCurrentMethod) 297internal void EndForEach(MethodInfo moveNextMethod) 416internal static void VerifyParameterCount(MethodInfo methodInfo, int expectedCount) 422internal void Call(object? thisObj, MethodInfo methodInfo) 429internal void Call(object? thisObj, MethodInfo methodInfo, object? param1) 437internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2) 446internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3) 456internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4) 467internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4, object? param5) 479internal void Call(object? thisObj, MethodInfo methodInfo, object? param1, object? param2, object? param3, object? param4, object? param5, object? param6) 492internal void Call(MethodInfo methodInfo) 589MethodInfo? getMethod = property.GetMethod; 594else if (memberInfo is MethodInfo method) 620MethodInfo? setMethod = property.SetMethod; 625else if (memberInfo is MethodInfo method) 1104private void LoadThis(object? thisObj, MethodInfo methodInfo) 1113private void LoadParam(object? arg, int oneBasedArgIndex, MethodInfo methodInfo) 1248private 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)
51internal MethodInfo? ParseMethod => _helper.ParseMethod; 326private MethodInfo? _parseMethod; 1044internal MethodInfo? ParseMethod 1050MethodInfo? method = UnderlyingType.GetMethod(Globals.ParseMethodName, BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string) }); 1984MethodInfo? method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes); 2172internal static bool MethodRequiresMemberAccess(MethodInfo? method) 2208if (member is MethodInfo method)
System\Runtime\Serialization\DataMember.cs (2)
257MethodInfo? getMethod = property.GetMethod; 282MethodInfo? setMethod = property.SetMethod;
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (50)
17private static MethodInfo? s_boxPointer; 25private static MethodInfo? s_getItemContractMethod; 27private static MethodInfo? s_getJsonDataContractMethod; 29private static MethodInfo? s_getJsonMemberIndexMethod; 31private static MethodInfo? s_getRevisedItemContractMethod; 33private static MethodInfo? s_getUninitializedObjectMethod; 35private static MethodInfo? s_ienumeratorGetCurrentMethod; 37private static MethodInfo? s_ienumeratorMoveNextMethod; 39private static MethodInfo? s_isStartElementMethod0; 41private static MethodInfo? s_isStartElementMethod2; 47private static MethodInfo? s_moveToContentMethod; 51private static MethodInfo? s_onDeserializationMethod; 53private static MethodInfo? s_readJsonValueMethod; 59private static MethodInfo? s_throwDuplicateMemberExceptionMethod; 61private static MethodInfo? s_throwMissingRequiredMembersMethod; 65private static MethodInfo? s_unboxPointer; 71private static MethodInfo? s_writeAttributeStringMethod; 73private static MethodInfo? s_writeEndElementMethod; 75private static MethodInfo? s_writeJsonISerializableMethod; 77private static MethodInfo? s_writeJsonNameWithMappingMethod; 79private static MethodInfo? s_writeJsonValueMethod; 81private static MethodInfo? s_writeStartElementMethod; 83private static MethodInfo? s_writeStartElementStringMethod; 85private static MethodInfo? s_parseEnumMethod; 87private static MethodInfo? s_getJsonMemberNameMethod; 89public static MethodInfo BoxPointer 122public static MethodInfo GetCurrentMethod 134public static MethodInfo GetItemContractMethod 147public static MethodInfo GetJsonDataContractMethod 160public static MethodInfo GetJsonMemberIndexMethod 173public static MethodInfo GetRevisedItemContractMethod 186public static MethodInfo GetUninitializedObjectMethod 200public static MethodInfo IsStartElementMethod0 212public static MethodInfo IsStartElementMethod2 248public static MethodInfo MoveNextMethod 260public static MethodInfo MoveToContentMethod 284public static MethodInfo OnDeserializationMethod 297public static MethodInfo ReadJsonValueMethod 323public static MethodInfo ThrowDuplicateMemberExceptionMethod 335public static MethodInfo ThrowMissingRequiredMembersMethod 359public static MethodInfo UnboxPointer 395public static MethodInfo WriteAttributeStringMethod 407public static MethodInfo WriteEndElementMethod 419public static MethodInfo WriteJsonISerializableMethod 432public static MethodInfo WriteJsonNameWithMappingMethod 444public static MethodInfo WriteJsonValueMethod 457public static MethodInfo WriteStartElementMethod 470public static MethodInfo WriteStartElementStringMethod 483public static MethodInfo ParseEnumMethod 496public 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)
632MethodInfo? 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 (132)
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 74private static MethodInfo? s_boxPointer; 75internal static MethodInfo BoxPointer => s_boxPointer ??= typeof(Pointer).GetMethod("Box")!; 91private static MethodInfo? s_ienumeratorMoveNextMethod; 92internal static MethodInfo MoveNextMethod 105private static MethodInfo? s_ienumeratorGetCurrentMethod; 106internal static MethodInfo GetCurrentMethod 119private static MethodInfo? s_getItemContractMethod; 120internal static MethodInfo GetItemContractMethod 134private static MethodInfo? s_isStartElementMethod2; 135internal static MethodInfo IsStartElementMethod2 148private static MethodInfo? s_isStartElementMethod0; 149internal static MethodInfo IsStartElementMethod0 162private static MethodInfo? s_getUninitializedObjectMethod; 163internal static MethodInfo GetUninitializedObjectMethod 177private static MethodInfo? s_onDeserializationMethod; 178internal static MethodInfo OnDeserializationMethod 191private static MethodInfo? s_unboxPointer; 192internal static MethodInfo UnboxPointer => s_unboxPointer ??= typeof(Pointer).GetMethod("Unbox")!; 230private static MethodInfo? s_getStreamingContextMethod; 231internal static MethodInfo GetStreamingContextMethod 244private static MethodInfo? s_getCollectionMemberMethod; 245internal static MethodInfo GetCollectionMemberMethod 258private static MethodInfo? s_storeCollectionMemberInfoMethod; 259internal static MethodInfo StoreCollectionMemberInfoMethod 272private static MethodInfo? s_resetCollectionMemberInfoMethod; 273internal static MethodInfo ResetCollectionMemberInfoMethod 286private static MethodInfo? s_storeIsGetOnlyCollectionMethod; 287internal static MethodInfo StoreIsGetOnlyCollectionMethod 300private static MethodInfo? s_resetIsGetOnlyCollection; 301internal static MethodInfo ResetIsGetOnlyCollectionMethod 314private static MethodInfo? s_throwNullValueReturnedForGetOnlyCollectionExceptionMethod; 315internal static MethodInfo ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod 328private static MethodInfo? s_throwArrayExceededSizeExceptionMethod; 329internal static MethodInfo ThrowArrayExceededSizeExceptionMethod 342private static MethodInfo? s_incrementItemCountMethod; 343internal static MethodInfo IncrementItemCountMethod 356private static MethodInfo? s_internalDeserializeMethod; 357internal static MethodInfo InternalDeserializeMethod 371private static MethodInfo? s_moveToNextElementMethod; 372internal static MethodInfo MoveToNextElementMethod 385private static MethodInfo? s_getMemberIndexMethod; 386internal static MethodInfo GetMemberIndexMethod 400private static MethodInfo? s_getMemberIndexWithRequiredMembersMethod; 401internal static MethodInfo GetMemberIndexWithRequiredMembersMethod 415private static MethodInfo? s_throwRequiredMemberMissingExceptionMethod; 416internal static MethodInfo ThrowRequiredMemberMissingExceptionMethod 429private static MethodInfo? s_skipUnknownElementMethod; 430internal static MethodInfo SkipUnknownElementMethod 443private static MethodInfo? s_readIfNullOrRefMethod; 444internal static MethodInfo ReadIfNullOrRefMethod 458private static MethodInfo? s_readAttributesMethod; 459internal static MethodInfo ReadAttributesMethod 472private static MethodInfo? s_resetAttributesMethod; 473internal static MethodInfo ResetAttributesMethod 486private static MethodInfo? s_getObjectIdMethod; 487internal static MethodInfo GetObjectIdMethod 500private static MethodInfo? s_getArraySizeMethod; 501internal static MethodInfo GetArraySizeMethod 514private static MethodInfo? s_addNewObjectMethod; 515internal static MethodInfo AddNewObjectMethod 528private static MethodInfo? s_addNewObjectWithIdMethod; 529internal static MethodInfo AddNewObjectWithIdMethod 542private static MethodInfo? s_replaceDeserializedObjectMethod; 543internal static MethodInfo ReplaceDeserializedObjectMethod 556private static MethodInfo? s_getExistingObjectMethod; 557internal static MethodInfo GetExistingObjectMethod 571private static MethodInfo? s_getRealObjectMethod; 572internal static MethodInfo GetRealObjectMethod 585private static MethodInfo? s_ensureArraySizeMethod; 586internal static MethodInfo EnsureArraySizeMethod 599private static MethodInfo? s_trimArraySizeMethod; 600internal static MethodInfo TrimArraySizeMethod 613private static MethodInfo? s_checkEndOfArrayMethod; 614internal static MethodInfo CheckEndOfArrayMethod 627private static MethodInfo? s_getArrayLengthMethod; 628internal static MethodInfo GetArrayLengthMethod 641private static MethodInfo? s_readSerializationInfoMethod; 642internal static MethodInfo ReadSerializationInfoMethod 656private static MethodInfo? s_createUnexpectedStateExceptionMethod; 657internal static MethodInfo CreateUnexpectedStateExceptionMethod 670private static MethodInfo? s_internalSerializeReferenceMethod; 671internal static MethodInfo InternalSerializeReferenceMethod 685private static MethodInfo? s_internalSerializeMethod; 686internal static MethodInfo InternalSerializeMethod 700private static MethodInfo? s_writeNullMethod; 701internal static MethodInfo WriteNullMethod 715private static MethodInfo? s_incrementArrayCountMethod; 716internal static MethodInfo IncrementArrayCountMethod 729private static MethodInfo? s_incrementCollectionCountMethod; 730internal static MethodInfo IncrementCollectionCountMethod 743private static MethodInfo? s_incrementCollectionCountGenericMethod; 744internal static MethodInfo IncrementCollectionCountGenericMethod 757private static MethodInfo? s_getDefaultValueMethod; 758internal static MethodInfo GetDefaultValueMethod 779private static MethodInfo? s_getNullableValueMethod; 780internal static MethodInfo GetNullableValueMethod 793private static MethodInfo? s_throwRequiredMemberMustBeEmittedMethod; 794internal static MethodInfo ThrowRequiredMemberMustBeEmittedMethod 807private static MethodInfo? s_getHasValueMethod; 808internal static MethodInfo GetHasValueMethod 821private static MethodInfo? s_writeISerializableMethod; 822internal static MethodInfo WriteISerializableMethod 836private static MethodInfo? s_writeExtensionDataMethod; 837internal static MethodInfo WriteExtensionDataMethod 843private static MethodInfo? s_writeXmlValueMethod; 844internal static MethodInfo WriteXmlValueMethod 858private static MethodInfo? s_readXmlValueMethod; 859internal static MethodInfo ReadXmlValueMethod 915private static MethodInfo? s_extensionDataSetExplicitMethodInfo; 916internal static MethodInfo ExtensionDataSetExplicitMethodInfo => s_extensionDataSetExplicitMethodInfo ??= typeof(IExtensibleDataObject).GetMethod(Globals.ExtensionDataSetMethod)!; 962private static MethodInfo? s_getDateTimeOffsetMethod; 963internal static MethodInfo GetDateTimeOffsetMethod 976private static MethodInfo? s_getDateTimeOffsetAdapterMethod; 977internal static MethodInfo GetDateTimeOffsetAdapterMethod 990private static MethodInfo? s_getMemoryStreamMethod; 991internal static MethodInfo GetMemoryStreamMethod 1004private static MethodInfo? s_getMemoryStreamAdapterMethod; 1005internal static MethodInfo GetMemoryStreamAdapterMethod 1018private static MethodInfo? s_getTypeHandleMethod; 1019internal static MethodInfo GetTypeHandleMethod 1032private static MethodInfo? s_getTypeMethod; 1033internal static MethodInfo GetTypeMethod 1046private static MethodInfo? s_throwInvalidDataContractExceptionMethod; 1047internal 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.Windows.Core (12)
System\Private\Windows\BinaryFormat\SerializationEvents.cs (12)
16private readonly List<MethodInfo>? _onDeserializingMethods; 17private readonly List<MethodInfo>? _onDeserializedMethods; 22List<MethodInfo>? onDeserializingMethods, 23List<MethodInfo>? onDeserializedMethods) 37List<MethodInfo>? onDeserializingMethods = GetMethodsWithAttribute(typeof(OnDeserializingAttribute), type); 38List<MethodInfo>? onDeserializedMethods = GetMethodsWithAttribute(typeof(OnDeserializedAttribute), type); 45private static List<MethodInfo>? GetMethodsWithAttribute( 50List<MethodInfo>? attributedMethods = null; 56MethodInfo[] methods = baseType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 57foreach (MethodInfo method in methods) 92private static Action<StreamingContext>? AddOnDelegate(object obj, List<MethodInfo>? methods) 98foreach (MethodInfo method in methods)
System.Private.Windows.Core.TestUtilities (6)
TestAccessor.cs (3)
65MethodInfo? invokeMethodInfo = type.GetMethod("Invoke"); 72MethodInfo? methodInfo = s_type.GetMethod( 98MethodInfo? methodInfo = null;
XUnit\CommonMemberDataAttribute.cs (1)
25protected override object[]? ConvertDataItem(MethodInfo testMethod, object? item)
XUnit\UseCultureAttribute.cs (2)
72public override unsafe void Before(MethodInfo methodUnderTest) 96public override void After(MethodInfo methodUnderTest)
System.Private.Xml (626)
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)
30internal MethodInfo? writeMethod; 31internal MethodInfo? readMethod; 527private static MethodInfo GetMethodFromType( 530MethodInfo? method = type.GetMethod(methodName);
System\Xml\Serialization\Mappings.cs (4)
903private MethodInfo? _checkShouldPersistMethodInfo; 951internal MethodInfo? CheckShouldPersistMethodInfo 1069private readonly MethodInfo? _getSchemaMethod; 1082internal 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 (7)
582MethodInfo? addMethod = targetCollectionType.GetMethod("Add"); 646MethodInfo getSetMemberValueDelegateWithTypeGenericMi = typeof(ReflectionXmlSerializationReaderHelper).GetMethod("GetSetMemberValueDelegateWithType", BindingFlags.Static | BindingFlags.Public)!; 647MethodInfo getSetMemberValueDelegateWithTypeMi = getSetMemberValueDelegateWithTypeGenericMi.MakeGenericMethod(o.GetType(), memberType); 1217MethodInfo? method = typeof(XmlSerializationReader).GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, new Type[] { typeof(string) }); 1673var addMethod = mapping.TypeDesc.Type!.GetMethod("Add"); 1735MethodInfo? specifiedMethodInfo = o!.GetType().GetMethod($"set_{specifiedMemberName}"); 2118var setMethod = propInfo.GetSetMethod(true);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
665MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!; 697MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!;
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)
1274MethodInfo? enumerator = type.GetMethod("GetEnumerator", Type.EmptyTypes); 1282enumerator = member as MethodInfo; 1311MethodInfo? addMethod = type.GetMethod("Add", new Type[] { currentType }); 1357MethodInfo getMethod = defaultProp.GetMethod!; 1373MethodInfo? 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)
924System.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 (130)
231MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 236MethodInfo XmlReader_get_NameTable = typeof(XmlReader).GetMethod( 241MethodInfo XmlNameTable_Add = typeof(XmlNameTable).GetMethod( 283MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 288MethodInfo XmlReader_IsStartElement = typeof(XmlReader).GetMethod( 329MethodInfo method = typeof(XmlSerializationReader).GetMethod( 399MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 404MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 501MethodInfo XmlSerializationReader_set_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 519MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod( 534MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 544MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 559MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 588MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 648MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 653MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 697MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 702MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 713MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 718MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 747MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 752MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 763MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 768MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 800MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 812MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 817MethodInfo XmlReader_method = typeof(XmlReader).GetMethod( 829MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 841MethodInfo ToXXX; 870MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 875MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod( 886MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 891MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 983MethodInfo Hashtable_Add = typeof(Hashtable).GetMethod( 1045MethodInfo XmlSerializationReader_ToEnum = typeof(XmlSerializationReader).GetMethod( 1088MethodInfo String_op_Equality = typeof(string).GetMethod( 1109MethodInfo XmlSerializationReader_CreateUnknownConstantException = typeof(XmlSerializationReader).GetMethod( 1181MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1186MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 1206MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 1211MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 1225MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 1290MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 1348MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod( 1353MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 1392MethodInfo XmlSerializationReader_ReadTypedNull = typeof(XmlSerializationReader).GetMethod( 1440MethodInfo XmlSerializationReader_ReadTypedPrimitive = typeof(XmlSerializationReader).GetMethod( 1458MethodInfo XmlSerializationReader_ReadTypedPrimitive = typeof(XmlSerializationReader).GetMethod( 1471MethodInfo XmlSerializationReader_CreateUnknownTypeException = typeof(XmlSerializationReader).GetMethod( 1498MethodInfo XmlSerializationReader_CreateAbstractTypeException = typeof(XmlSerializationReader).GetMethod( 1513MethodInfo XmlSerializationReader_set_DecodeName = typeof(XmlSerializationReader).GetMethod( 1612MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1617MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod( 1627MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 1636MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 1650MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 1666MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 1679MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 1700MethodInfo XmlQualifiedName_get_Name = typeof(XmlQualifiedName).GetMethod( 1705MethodInfo XmlQualifiedName_get_Namespace = typeof(XmlQualifiedName).GetMethod( 1743MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1748MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod( 1753MethodInfo XmlReader_get_NamespaceURI = typeof(XmlReader).GetMethod( 1808MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 1813MethodInfo XmlReader_MoveToNextAttribute = typeof(XmlReader).GetMethod( 1867MethodInfo XmlSerializationReader_IsXmlnsAttribute = typeof(XmlSerializationReader).GetMethod( 1872MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod( 1877MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod( 1882MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 1909MethodInfo Add = xmlnsMember.Mapping.TypeDesc.Type!.GetMethod( 1914MethodInfo String_get_Length = typeof(string).GetMethod( 1942MethodInfo XmlSerializationReader_IsXmlnsAttribute = typeof(XmlSerializationReader).GetMethod( 1947MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod( 1963MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod( 1968MethodInfo XmlDocument_ReadNode = typeof(XmlDocument).GetMethod( 1980MethodInfo XmlSerializationReader_ParseWsdlArrayType = typeof(XmlSerializationReader).GetMethod( 2012MethodInfo elseCallMethod = typeof(XmlSerializationReader).GetMethod( 2071MethodInfo String_Split = typeof(string).GetMethod( 2076MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2081MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod( 2169MethodInfo XmlSerializationReader_CreateReadOnlyCollectionException = typeof(XmlSerializationReader).GetMethod( 2235MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 2240MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2267MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2272MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 2323MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2328MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 2333MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod( 2338MethodInfo XmlDocument_CreateTextNode = typeof(XmlDocument).GetMethod( 2367MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2372MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod( 2382MethodInfo XmlSerializationReader_CollapseWhitespace = typeof(XmlSerializationReader).GetMethod( 2395MethodInfo XmlSerializationReader_ReadString = typeof(XmlSerializationReader).GetMethod( 2507MethodInfo XmlSerializationReader_get_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 2536MethodInfo XmlSerializationReader_set_IsReturnValue = typeof(XmlSerializationReader).GetMethod( 2636MethodInfo XmlSerializationReader_ShrinkArray = typeof(XmlSerializationReader).GetMethod( 2718MethodInfo XmlSerializationReader_EnsureArrayIndex = typeof(XmlSerializationReader).GetMethod( 2820MethodInfo Add = localA.LocalType.GetMethod( 2849MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 2885MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 2890MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 2906MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 2916MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod( 2928MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 2939MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod( 2999MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod( 3022MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3027MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 3036MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3053MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3058MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod( 3068MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3092MethodInfo XmlSerializationReader_ReadElementQualifiedName = typeof(XmlSerializationReader).GetMethod( 3133MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3138MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod( 3180MethodInfo XmlSerializationReader_ReadXmlXXX = typeof(XmlSerializationReader).GetMethod( 3198MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod( 3223MethodInfo XmlSerializationReader_ReadSerializable = typeof(XmlSerializationReader).GetMethod( 3294MethodInfo XmlSerializationReader_ReadSerializable = typeof(XmlSerializationReader).GetMethod( 3313MethodInfo XmlSerializationReader_CreateBadDerivationException = typeof(XmlSerializationReader).GetMethod( 3331MethodInfo XmlSerializationReader_CreateMissingIXmlSerializableType = typeof(XmlSerializationReader).GetMethod( 3351MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3356MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod( 3376MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod( 3381MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod( 3447MethodInfo XmlSerializationReader_CreateInaccessibleConstructorException = typeof(XmlSerializationReader).GetMethod( 3458MethodInfo XmlSerializationReader_CreateCtorHasSecurityException = typeof(XmlSerializationReader).GetMethod( 3510MethodInfo XmlSerializationReader_UnknownNode1 = typeof(XmlSerializationReader).GetMethod( 3515MethodInfo XmlSerializationReader_UnknownNode2 = typeof(XmlSerializationReader).GetMethod( 3598MethodInfo XmlSerializationReader_CreateUnknownNodeException = typeof(XmlSerializationReader).GetMethod(
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1803_writer.Write($"static {typeof(MethodInfo).FullName} {methodVariable} = {typeVariable}.GetMethod(");
System\Xml\Serialization\XmlSerializationWriterILGen.cs (76)
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( 1483MethodInfo getEnumeratorMethod; 1527MethodInfo IEnumerator_MoveNext = typeof(IEnumerator).GetMethod( 1711MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1716MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1724MethodInfo String_op_Equality = typeof(string).GetMethod( 1747MethodInfo XmlSerializationWriter_CreateChoiceIdentifierValueException = typeof(XmlSerializationWriter).GetMethod( 1774MethodInfo XmlSerializationWriter_CreateUnknownAnyElementException = typeof(XmlSerializationWriter).GetMethod( 1781MethodInfo XmlNode_get_Name = typeof(XmlNode).GetMethod( 1786MethodInfo XmlNode_get_NamespaceURI = typeof(XmlNode).GetMethod( 1832MethodInfo XmlSerializationWriter_CreateUnknownTypeException = typeof(XmlSerializationWriter).GetMethod( 1863MethodInfo XmlSerializationWriter_WriteValue = typeof(XmlSerializationWriter).GetMethod( 1875MethodInfo WriteTo = source.Type!.GetMethod( 1880MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod( 1904MethodInfo Nullable_get_HasValue = element.Mapping.TypeDesc.Type!.GetMethod( 2045MethodInfo XmlSerializationWriter_CreateInvalidAnyTypeException = typeof(XmlSerializationWriter).GetMethod( 2066MethodInfo XmlSerializationWriter_func = typeof(XmlSerializationWriter).GetMethod( 2095MethodInfo String_get_Length = typeof(string).GetMethod( 2137MethodInfo op_Inequality = valueType.GetMethod( 2167MethodInfo XmlSerializationWriter_CreateMismatchChoiceException = typeof(XmlSerializationWriter).GetMethod( 2194MethodInfo XmlSerializationWriter_WriteNamespaceDeclarations = typeof(XmlSerializationWriter).GetMethod( 2395MethodInfo XName_op_Implicit = xName.GetMethod( 2420MethodInfo getTypeInfoMehod = typeof(IntrospectionExtensions).GetMethod( 2429MethodInfo getDeclaredConstructors = typeof(TypeInfo).GetMethod("get_DeclaredConstructors")!; 2430MethodInfo getEnumerator = typeof(IEnumerable<>).MakeGenericType(typeof(ConstructorInfo)).GetMethod("GetEnumerator")!; 2437MethodInfo enumeratorCurrent = typeof(IEnumerator).GetMethod("get_Current")!; 2445MethodInfo constructorIsStatic = typeof(ConstructorInfo).GetMethod("get_IsStatic")!; 2449MethodInfo constructorGetParameters = typeof(ConstructorInfo).GetMethod("GetParameters")!; 2457MethodInfo constructorInvoke = typeof(ConstructorInfo).GetMethod("Invoke", new Type[] { typeof(object[]) })!; 2465MethodInfo IEnumeratorMoveNext = typeof(IEnumerator).GetMethod( 2474MethodInfo 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)
142public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 145MethodInfo[] methods = base.GetMethods(bindingAttr); 155List<MethodInfo> results = new List<MethodInfo>(methods); 184protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) 186MethodInfo? method = base.GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); 220List<MethodInfo> matchingMethods = new List<MethodInfo>(); 229MethodInfo? accessor = getPropertyGetter ? newDeclaredProperty.GetGetMethod() : newDeclaredProperty.GetSetMethod(); 250MethodInfo? accessor = getPropertyGetter ? inheritedProperty.GetGetMethod() : inheritedProperty.GetSetMethod(); 268MethodInfo match = matchingMethods[0]; 281return (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)
25protected 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; } 259private readonly List<MethodInfo> _methodInfos; 271_fields.Add(tb.DefineField("_methodInfos", typeof(MethodInfo[]), FieldAttributes.Private)); 273_methodInfos = new List<MethodInfo>(); 322var propertyMap = new Dictionary<MethodInfo, PropertyAccessorInfo>(); 332var eventMap = new Dictionary<MethodInfo, EventAccessorInfo>(); 344foreach (MethodInfo mi in iface.GetRuntimeMethods()) 411private MethodBuilder AddMethodImpl(MethodInfo mi, int methodInfoIndex) 479LocalBuilder methodInfoLocal = il.DeclareLocal(typeof(MethodInfo)); 765public MethodInfo? InterfaceGetMethod { get; } 766public MethodInfo? InterfaceSetMethod { get; } 770public PropertyAccessorInfo(MethodInfo? interfaceGetMethod, MethodInfo? interfaceSetMethod) 779public MethodInfo? InterfaceAddMethod { get; } 780public MethodInfo? InterfaceRemoveMethod { get; } 781public MethodInfo? InterfaceRaiseMethod { get; } 786public EventAccessorInfo(MethodInfo? interfaceAddMethod, MethodInfo? interfaceRemoveMethod, MethodInfo? interfaceRaiseMethod)
System.Reflection.Emit (79)
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\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
384protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 391public 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)
273public override MethodInfo GetBaseDefinition() => this; 281public override MethodInfo GetGenericMethodDefinition() => !IsGenericMethod ? throw new InvalidOperationException() : this; 322public override MethodInfo MakeGenericMethod(params Type[] typeArguments) =>
System\Reflection\Emit\ModuleBuilderImpl.cs (20)
216foreach (List<(MethodInfo ifaceMethod, MethodInfo targetMethod)> mapList in typeBuilder._methodOverrides.Values) 218foreach ((MethodInfo ifaceMethod, MethodInfo targetMethod) pair in mapList) 618if (pair.Key is KeyValuePair<MethodInfo, Type[]> pair2) 752case MethodInfo method: 763method = (MethodInfo)GetOriginalMemberIfConstructedType(method); 778private EntityHandle GetMethodReference(MethodInfo methodInfo, Type[] optionalParameterTypes) 780MethodInfo method = (MethodInfo)GetOriginalMemberIfConstructedType(methodInfo); 782KeyValuePair<MethodInfo, BlobBuilder> pair = new(method, signature); 793private 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)
42internal Dictionary<Type, List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>>? _methodOverrides; 314protected override void DefineMethodOverrideCore(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration) 325if (_methodOverrides.TryGetValue(baseType, out List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>? im)) 336im = new List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>(); 689internal static BindingFlags GetBindingFlags(MethodInfo method) 784private MethodInfo[] GetMethods(string name, BindingFlags bindingAttr) 788MethodInfo[] candidates = GetMethods(bindingAttr); 789List<MethodInfo> methods = new List<MethodInfo>(); 790foreach (MethodInfo method in candidates) 802public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 806List<MethodInfo> methods = new List<MethodInfo>(); 824protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, 829MethodInfo? found = null; 992MethodInfo? getMethod = property.GetMethod; 993MethodInfo? setMethod = property.SetMethod; 1180MethodInfo[] methods = []; 1265MethodInfo[] interfaceMethods = interfaceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); 1270InterfaceMethods = new MethodInfo[interfaceMethods.Length], 1271TargetMethods = new MethodInfo[interfaceMethods.Length] 1276MethodInfo interfaceMethod = interfaceMethods[i]; 1277MethodInfo? targetMethod = GetMethodImpl(interfaceMethod.Name, GetBindingFlags(interfaceMethod), null, interfaceMethod.CallingConvention, GetParameterTypes(interfaceMethod.GetParameters()), null); 1340MethodInfo[] methods = GetMethods(bindingAttr);
System.Reflection.MetadataLoadContext (101)
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 (7)
28MethodInfo? accessorMethod = GetAccessorMethod(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) =>
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)
166public 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)
61public sealed override MethodInfo? GetAddMethod(bool nonPublic) => GetRoAddMethod()?.FilterAccessor(nonPublic); 62public sealed override MethodInfo? GetRemoveMethod(bool nonPublic) => GetRoRemoveMethod()?.FilterAccessor(nonPublic); 63public sealed override MethodInfo? GetRaiseMethod(bool nonPublic) => GetRoRaiseMethod()?.FilterAccessor(nonPublic); 73public abstract override MethodInfo[] GetOtherMethods(bool nonPublic);
System\Reflection\TypeLoading\General\Helpers.cs (2)
81public 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)
100public abstract override MethodInfo GetGenericMethodDefinition(); 111public abstract override MethodInfo MakeGenericMethod(params Type[] typeArguments); 116public 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)
94public sealed override MethodInfo? GetGetMethod(bool nonPublic) => GetRoGetMethod()?.FilterAccessor(nonPublic); 95public sealed override MethodInfo? GetSetMethod(bool nonPublic) => GetRoSetMethod()?.FilterAccessor(nonPublic); 109public sealed override MethodInfo[] GetAccessors(bool nonPublic) 111MethodInfo? getter = GetGetMethod(nonPublic); 112MethodInfo? setter = GetSetMethod(nonPublic); 120MethodInfo[] 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)
233internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => SpecializeMethods(filter, reflectedType, this); 240internal 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)
193internal 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)
381internal abstract IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType); 388internal MethodInfo? InternalGetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
System.Reflection.TypeExtensions (19)
System\Reflection\TypeExtensions.cs (19)
206public static MethodInfo? GetMethod( 216public static MethodInfo? GetMethod( 227public static MethodInfo? GetMethod( 238public static MethodInfo[] GetMethods( 247public static MethodInfo[] GetMethods( 389public static MethodInfo? GetAddMethod(this EventInfo eventInfo) 397public static MethodInfo? GetAddMethod(this EventInfo eventInfo, bool nonPublic) 405public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo) 413public static MethodInfo? GetRaiseMethod(this EventInfo eventInfo, bool nonPublic) 421public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo) 429public static MethodInfo? GetRemoveMethod(this EventInfo eventInfo, bool nonPublic) 505public static MethodInfo GetBaseDefinition(this MethodInfo method) 537public static MethodInfo[] GetAccessors(this PropertyInfo property) 545public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic) 553public static MethodInfo? GetGetMethod(this PropertyInfo property) 561public static MethodInfo? GetGetMethod(this PropertyInfo property, bool nonPublic) 569public static MethodInfo? GetSetMethod(this PropertyInfo property) 577public 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)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
480[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.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 (4)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (3)
115MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 116MethodInfo? sendAsyncMethod = httpClientType.GetMethod("SendAsync", new Type[] { httpRequestMessageType, typeof(CancellationToken) }); 122MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
System\Security\Cryptography\XmlKeyHelper.cs (1)
265private static readonly MethodInfo s_getElementsMethod;
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.Tests (1)
Security\SecurityUtilsTest.cs (1)
20MethodInfo method = t.GetMethod("FixNetworkCredential", BindingFlags.NonPublic | BindingFlags.Static,
System.Text.Json (29)
System\ReflectionExtensions.cs (2)
123or MethodInfo { IsGenericMethod: true, IsGenericMethodDefinition: false }) 160if (member is MethodInfo { IsGenericMethod: true, IsGenericMethodDefinition: false } method)
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)
417MethodInfo? getMethod = propertyInfo.GetMethod; 423MethodInfo? setMethod = propertyInfo.SetMethod;
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (9)
47private readonly MethodInfo? _sourceConstructFlagsGetter; 55private readonly MethodInfo? _fsharpListCtor; 56private readonly MethodInfo? _fsharpSetCtor; 57private readonly MethodInfo? _fsharpMapCtor; 150MethodInfo valueGetter = EnsureMemberExists(typeof(TFSharpOption).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance), "Microsoft.FSharp.Core.FSharpOption<T>.get_Value()"); 159MethodInfo methodInfo = EnsureMemberExists(typeof(TFSharpOption).GetMethod("Some", BindingFlags.Public | BindingFlags.Static), "Microsoft.FSharp.Core.FSharpOption<T>.Some(T value)"); 169MethodInfo valueGetter = EnsureMemberExists(typeof(TFSharpValueOption).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance), "Microsoft.FSharp.Core.FSharpValueOption<T>.get_Value()"); 178MethodInfo methodInfo = EnsureMemberExists(typeof(TFSharpOption).GetMethod("Some", BindingFlags.Public | BindingFlags.Static), "Microsoft.FSharp.Core.FSharpValueOption<T>.ValueSome(T value)"); 230private static TDelegate CreateDelegate<TDelegate>(MethodInfo methodInfo) where TDelegate : Delegate
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (5)
163MethodInfo realMethod = (collectionType.GetMethod("Push") ?? collectionType.GetMethod("Enqueue"))!; 188MethodInfo realMethod = collectionType.GetImmutableEnumerableCreateRangeMethod(elementType); 212MethodInfo realMethod = collectionType.GetImmutableDictionaryCreateRangeMethod(keyType, valueType); 235MethodInfo? realMethod = propertyInfo.GetMethod; 281MethodInfo? realMethod = propertyInfo.SetMethod;
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (5)
121MethodInfo addMethod = (collectionType.GetMethod("Push") ?? collectionType.GetMethod("Enqueue"))!; 131MethodInfo createRange = typeof(TCollection).GetImmutableEnumerableCreateRangeMethod(typeof(TElement)); 138MethodInfo createRange = typeof(TCollection).GetImmutableDictionaryCreateRangeMethod(typeof(TKey), typeof(TValue)); 145MethodInfo getMethodInfo = propertyInfo.GetMethod!; 155MethodInfo setMethodInfo = propertyInfo.SetMethod!;
System.Text.RegularExpressions (80)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
202MethodInfo addMethod = typeof(Hashtable).GetMethod(nameof(Hashtable.Add), BindingFlags.Public | BindingFlags.Instance)!;
System\Text\RegularExpressions\RegexCompiler.cs (79)
32private static MethodInfo CaptureMethod => field ??= RegexRunnerMethod("Capture"); 33private static MethodInfo TransferCaptureMethod => field ??= RegexRunnerMethod("TransferCapture"); 34private static MethodInfo UncaptureMethod => field ??= RegexRunnerMethod("Uncapture"); 35private static MethodInfo IsMatchedMethod => field ??= RegexRunnerMethod("IsMatched"); 36private static MethodInfo MatchLengthMethod => field ??= RegexRunnerMethod("MatchLength"); 37private static MethodInfo MatchIndexMethod => field ??= RegexRunnerMethod("MatchIndex"); 38private static MethodInfo IsBoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsBoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 39private static MethodInfo IsWordCharMethod => field ??= RegexRunnerMethod("IsWordChar"); 40private static MethodInfo IsECMABoundaryMethod => field ??= typeof(RegexRunner).GetMethod("IsECMABoundary", BindingFlags.NonPublic | BindingFlags.Static, [typeof(ReadOnlySpan<char>), typeof(int)])!; 41private static MethodInfo CrawlposMethod => field ??= RegexRunnerMethod("Crawlpos"); 42private static MethodInfo CharInClassMethod => field ??= RegexRunnerMethod("CharInClass"); 43private static MethodInfo CheckTimeoutMethod => field ??= RegexRunnerMethod("CheckTimeout"); 45private static MethodInfo RegexCaseEquivalencesTryFindCaseEquivalencesForCharWithIBehaviorMethod => field ??= typeof(RegexCaseEquivalences).GetMethod("TryFindCaseEquivalencesForCharWithIBehavior", BindingFlags.Static | BindingFlags.Public)!; 46private static MethodInfo CharIsDigitMethod => field ??= typeof(char).GetMethod("IsDigit", [typeof(char)])!; 47private static MethodInfo CharIsWhiteSpaceMethod => field ??= typeof(char).GetMethod("IsWhiteSpace", [typeof(char)])!; 48private static MethodInfo CharIsControlMethod => field ??= typeof(char).GetMethod("IsControl", [typeof(char)])!; 49private static MethodInfo CharIsLetterMethod => field ??= typeof(char).GetMethod("IsLetter", [typeof(char)])!; 50private static MethodInfo CharIsAsciiDigitMethod => field ??= typeof(char).GetMethod("IsAsciiDigit", [typeof(char)])!; 51private static MethodInfo CharIsAsciiLetterMethod => field ??= typeof(char).GetMethod("IsAsciiLetter", [typeof(char)])!; 52private static MethodInfo CharIsAsciiLetterLowerMethod => field ??= typeof(char).GetMethod("IsAsciiLetterLower", [typeof(char)])!; 53private static MethodInfo CharIsAsciiLetterUpperMethod => field ??= typeof(char).GetMethod("IsAsciiLetterUpper", [typeof(char)])!; 54private static MethodInfo CharIsAsciiLetterOrDigitMethod => field ??= typeof(char).GetMethod("IsAsciiLetterOrDigit", [typeof(char)])!; 55private static MethodInfo CharIsAsciiHexDigitMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigit", [typeof(char)])!; 56private static MethodInfo CharIsAsciiHexDigitLowerMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigitLower", [typeof(char)])!; 57private static MethodInfo CharIsAsciiHexDigitUpperMethod => field ??= typeof(char).GetMethod("IsAsciiHexDigitUpper", [typeof(char)])!; 58private static MethodInfo CharIsLetterOrDigitMethod => field ??= typeof(char).GetMethod("IsLetterOrDigit", [typeof(char)])!; 59private static MethodInfo CharIsLowerMethod => field ??= typeof(char).GetMethod("IsLower", [typeof(char)])!; 60private static MethodInfo CharIsUpperMethod => field ??= typeof(char).GetMethod("IsUpper", [typeof(char)])!; 61private static MethodInfo CharIsNumberMethod => field ??= typeof(char).GetMethod("IsNumber", [typeof(char)])!; 62private static MethodInfo CharIsPunctuationMethod => field ??= typeof(char).GetMethod("IsPunctuation", [typeof(char)])!; 63private static MethodInfo CharIsSeparatorMethod => field ??= typeof(char).GetMethod("IsSeparator", [typeof(char)])!; 64private static MethodInfo CharIsSymbolMethod => field ??= typeof(char).GetMethod("IsSymbol", [typeof(char)])!; 65private static MethodInfo CharGetUnicodeInfoMethod => field ??= typeof(char).GetMethod("GetUnicodeCategory", [typeof(char)])!; 66private static MethodInfo SpanGetItemMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("get_Item", [typeof(int)])!; 67private static MethodInfo SpanGetLengthMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("get_Length")!; 68private static MethodInfo SpanIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 69private static MethodInfo SpanIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 70private static MethodInfo SpanIndexOfSpanStringComparisonMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!; 71private static MethodInfo SpanIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 72private 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)); 73private static MethodInfo SpanIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 74private static MethodInfo SpanIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 75private static MethodInfo SpanIndexOfAnySearchValuesStringMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<char>), typeof(SearchValues<string>)])!; 76private static MethodInfo SpanIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 77private static MethodInfo SpanIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 78private 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)); 79private static MethodInfo SpanIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 80private static MethodInfo SpanIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 81private static MethodInfo SpanIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 82private static MethodInfo SpanIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 83private static MethodInfo SpanLastIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 84private static MethodInfo SpanLastIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 85private 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)); 86private static MethodInfo SpanLastIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 87private static MethodInfo SpanLastIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 88private static MethodInfo SpanLastIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 89private static MethodInfo SpanLastIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 90private static MethodInfo SpanLastIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 91private 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)); 92private static MethodInfo SpanLastIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 93private static MethodInfo SpanLastIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 94private static MethodInfo SpanLastIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 95private static MethodInfo SpanLastIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 96private static MethodInfo SpanSliceIntMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("Slice", [typeof(int)])!; 97private static MethodInfo SpanSliceIntIntMethod => field ??= typeof(ReadOnlySpan<char>).GetMethod("Slice", [typeof(int), typeof(int)])!; 98private static MethodInfo SpanStartsWithSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 99private static MethodInfo SpanStartsWithSpanComparisonMethod => field ??= typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!; 100private static MethodInfo StringAsSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("AsSpan", [typeof(string)])!; 101private static MethodInfo StringGetCharsMethod => field ??= typeof(string).GetMethod("get_Chars", [typeof(int)])!; 102private static MethodInfo ArrayResizeMethod => field ??= typeof(Array).GetMethod("Resize")!.MakeGenericMethod(typeof(int)); 103private static MethodInfo MathMinIntIntMethod => field ??= typeof(Math).GetMethod("Min", [typeof(int), typeof(int)])!; 104private static MethodInfo MemoryMarshalGetArrayDataReferenceSearchValuesMethod => field ??= typeof(MemoryMarshal).GetMethod("GetArrayDataReference", [Type.MakeGenericMethodParameter(0).MakeArrayType()])!.MakeGenericMethod(typeof(SearchValues<char>))!; 105private static MethodInfo UnsafeAsMethod => field ??= typeof(Unsafe).GetMethod("As", [typeof(object)])!; 131private static MethodInfo RegexRunnerMethod(string methname) => typeof(RegexRunner).GetMethod(methname, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)!; 256protected void Callvirt(MethodInfo mt) => _ilg!.Emit(OpCodes.Callvirt, mt); 259protected void Call(MethodInfo mt) => _ilg!.Emit(OpCodes.Call, mt); 5343protected void EmitScan(RegexOptions options, MethodInfo tryFindNextStartingPositionMethod, MethodInfo tryMatchAtCurrentPositionMethod) 6217static 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)
1204MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => 1208MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethod(name, bindingAttr); 1211MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) => typeof(IDesignerHost).GetMethods(bindingAttr);
System\ComponentModel\Design\InheritanceService.cs (2)
169else if (member is MethodInfo mi) 243else 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.Windows.Forms.Design.Tests (1)
EnsureEditorsTests.cs (1)
171MethodInfo method = reflectType.GetMethod(methodName);
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
726if (member is PropertyInfo property && property.GetGetMethod() is MethodInfo getter && getter.GetParameters() is var parameters && parameters.Length > 0)
System.Windows.Forms.Tests (5)
System\Windows\Forms\BindingContextTests.cs (2)
976MethodInfo m = oldManager.Bindings.GetType().GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance); 1004MethodInfo m = oldManager.Bindings.GetType().GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance);
System\Windows\Forms\ComponentModel\Com2Interop\Com2PropertyDescriptorTests.cs (1)
14private static readonly MethodInfo s_miVersionInfo = s_typeCom2PropertyDescriptor.GetMethod("TrimNewline", BindingFlags.Static | BindingFlags.NonPublic);
System\Windows\Forms\ListBindingHelperTests.cs (2)
878public override MethodInfo[] GetMethods(BindingFlags bindingAttr) 922protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
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;
System.Xaml.Tests (71)
Common\CustomMethodInfo.cs (4)
12protected MethodInfo DelegatingMethod { get; } 14public CustomMethodInfo(MethodInfo delegatingMethod) 25public Optional<MethodInfo> GetBaseDefinitionResult { get; set; } 26public override MethodInfo GetBaseDefinition() => GetBaseDefinitionResult.Or(DelegatingMethod.GetBaseDefinition);
System\Xaml\Schema\XamlMemberInvokerTests.cs (16)
34MethodInfo getter = typeof(TestClass).GetMethod(nameof(TestClass.StaticGetter))!; 35MethodInfo setter = typeof(TestClass).GetMethod(nameof(TestClass.StaticSetter))!; 81MethodInfo getter = typeof(TestClass).GetMethod(nameof(TestClass.StaticGetter))!; 82MethodInfo setter = typeof(TestClass).GetMethod(nameof(TestClass.StaticSetter))!; 98MethodInfo setter = typeof(TestClass).GetMethod(nameof(TestClass.StaticSetter))!; 126MethodInfo getter = typeof(TestClass).GetMethod(nameof(TestClass.StaticGetter))!; 127MethodInfo setter = typeof(TestClass).GetMethod(nameof(TestClass.StaticSetter))!; 144MethodInfo getter = typeof(TestClass).GetMethod(nameof(TestClass.StaticGetter))!; 179MethodInfo getter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticGetter))!; 180MethodInfo setter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticSetter))!; 194MethodInfo getter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticGetter))!; 195MethodInfo setter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticSetter))!; 209MethodInfo getter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticGetter))!; 210MethodInfo setter = typeof(SerializeClass).GetMethod(nameof(SerializeClass.StaticSetter))!; 278public CustomTargetType(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext) : base(attachablePropertyName, getter, setter, schemaContext)
System\Xaml\Schema\XamlTypeInvokerTests.cs (2)
378public void GetAddMethod_Invoke_ReturnsExpected(XamlTypeInvoker invoker, XamlType contentType, MethodInfo expected) 491public void GetEnumeratorMethod_Invoke_ReturnsExpected(XamlTypeInvoker invoker, MethodInfo expected)
System\Xaml\XamlBackgroundReaderTests.cs (2)
248MethodInfo nextMethod = typeof(XamlBackgroundReader).GetMethod("Next", BindingFlags.Instance | BindingFlags.NonPublic)!; 272MethodInfo addLineInfoMethod = typeof(XamlBackgroundReader).GetMethod("AddLineInfo", BindingFlags.Instance | BindingFlags.NonPublic)!;
System\Xaml\XamlDirectiveTests.cs (2)
317public MethodInfo LookupUnderlyingGetterEntry() => LookupUnderlyingGetter(); 321public MethodInfo LookupUnderlyingSetterEntry() => LookupUnderlyingSetter();
System\Xaml\XamlMemberTests.cs (16)
168public void Ctor_String_MethodInfo_MethodInfo_XamlSchemaContext(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext) 191public void Ctor_String_MethodInfo_MethodInfo_XamlSchemaContext_XamlMemberInvoker(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) 214MethodInfo getter = typeof(AccessorClass).GetMethod(nameof(AccessorClass.GetMethod))!; 232MethodInfo getter = typeof(AccessorClass).GetMethod(getterName)!; 242MethodInfo setter = typeof(AccessorClass).GetMethod(setterName)!; 255public void Ctor_String_MethodInfo_XamlSchemaContext(string attachablePropertyName, MethodInfo adder, XamlSchemaContext schemaContext) 276public void Ctor_String_MethodInfo_XamlSchemaContext_XamlMemberInvoker(string attachablePropertyName, MethodInfo adder, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) 299MethodInfo adder = typeof(AccessorClass).GetMethod(nameof(AccessorClass.SetMethod))!; 316MethodInfo adder = typeof(AccessorClass).GetMethod(adderName)!; 1897public void LookupUnderlyingGetter_Invoke_ReturnsExpected(SubXamlMember member, MethodInfo expected) 2031public void LookupUnderlyingSetter_Invoke_ReturnsExpected(SubXamlMember member, MethodInfo expected) 2390public override MethodInfo[] GetAccessors(bool nonPublic) 2405public override MethodInfo? GetGetMethod(bool nonPublic) 2415public override MethodInfo? GetSetMethod(bool nonPublic)
System\Xaml\XamlMemberTests.Mocks.cs (18)
24public SubXamlMember(string attachablePropertyName, MethodInfo? getter, MethodInfo? setter, XamlSchemaContext schemaContext) : base(attachablePropertyName, getter, setter, schemaContext) { } 26public SubXamlMember(string attachablePropertyName, MethodInfo? getter, MethodInfo? setter, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(attachablePropertyName, getter, setter, schemaContext, invoker) { } 32public SubXamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext) : base(attachableEventName, adder, schemaContext) { } 34public SubXamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(attachableEventName, adder, schemaContext, invoker) { } 66public MethodInfo LookupUnderlyingGetterEntry() => LookupUnderlyingGetter(); 70public MethodInfo LookupUnderlyingSetterEntry() => LookupUnderlyingSetter(); 83public CustomXamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext) : base(attachablePropertyName, getter, setter, schemaContext) { } 85public CustomXamlMember(string attachablePropertyName, MethodInfo getter, MethodInfo setter, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(attachablePropertyName, getter, setter, schemaContext, invoker) { } 91public CustomXamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext) : base(attachableEventName, adder, schemaContext) { } 93public CustomXamlMember(string attachableEventName, MethodInfo adder, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(attachableEventName, adder, schemaContext, invoker) { } 185public Optional<MethodInfo?> LookupUnderlyingGetterResult { get; set; } 186protected override MethodInfo LookupUnderlyingGetter() 197public Optional<MethodInfo?> LookupUnderlyingSetterResult { get; set; } 198protected override MethodInfo LookupUnderlyingSetter()
System\Xaml\XamlNodeListTests.cs (4)
578MethodInfo dispose = writer.GetType().GetMethod("Dispose", BindingFlags.Instance | BindingFlags.NonPublic)!; 638MethodInfo addMethod = typeof(XamlNodeList).GetMethod("Add", BindingFlags.Instance | BindingFlags.NonPublic)!; 658MethodInfo addLineInfoMethod = typeof(XamlNodeList).GetMethod("AddLineInfo", BindingFlags.Instance | BindingFlags.NonPublic)!; 677MethodInfo indexMethod = typeof(XamlNodeList).GetMethod("Index", BindingFlags.Instance | BindingFlags.NonPublic)!;
System\Xaml\XamlNodeQueueTests.cs (1)
490MethodInfo dispose = writer.GetType().GetMethod("Dispose", BindingFlags.Instance | BindingFlags.NonPublic)!;
System\Xaml\XamlTypeTests.cs (6)
938private static MethodInfo GetUnderlyingGetter(XamlMember member) 940MethodInfo underlyingGetter = member.GetType().GetMethod("LookupUnderlyingGetter", BindingFlags.Instance | BindingFlags.NonPublic)!; 941return (MethodInfo)underlyingGetter.Invoke(member, Array.Empty<object>())!; 944private static MethodInfo GetUnderlyingSetter(XamlMember member) 946MethodInfo underlyingSetter = member.GetType().GetMethod("LookupUnderlyingSetter", BindingFlags.Instance | BindingFlags.NonPublic)!; 947return (MethodInfo)underlyingSetter.Invoke(member, Array.Empty<object>())!;
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (2)
17public override void Before(MethodInfo methodUnderTest) 25public override void After(MethodInfo methodUnderTest)
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (2)
17public override void Before(MethodInfo methodUnderTest) 25public override void After(MethodInfo methodUnderTest)
Templates.Mvc.Tests (2)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (2)
17public override void Before(MethodInfo methodUnderTest) 25public override void After(MethodInfo methodUnderTest)
Templates.Tests (2)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (2)
17public override void Before(MethodInfo methodUnderTest) 25public override void After(MethodInfo methodUnderTest)
Test.Utilities (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
Text.Analyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
212var syntaxTreeOptionsProviderTryGetDiagnosticValueMethod = syntaxTreeOptionsProvider?.GetType().GetRuntimeMethods().FirstOrDefault(m => m.Name == "TryGetDiagnosticValue");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\IFunctionPointerInvocationOperationWrapper.cs (1)
35var targetMethod = typeof(OperationExtensions).GetTypeInfo().GetDeclaredMethod("GetFunctionPointerSignature");
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
109var methodInfo = type.GetTypeInfo().GetDeclaredMethods("With" + propertyName) 155if (!TryGetMethod<T, TValue>(type, methodName, out var method)) 239private static bool TryGetMethod<T, TReturn>([NotNullWhen(true)] Type? type, string methodName, [NotNullWhen(true)] out MethodInfo? methodInfo)
VisualBasicRuntimeTest (1)
Program.cs (1)
148MethodInfo showMethod = dialogType.GetMethod("ShowProgressDialog");
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
1093MethodInfo methodInfo = typeof(SWF.Control).GetMethod("OnParentRightToLeftChanged", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EventArgs) }, null);
xunit.assert (5)
Sdk\ArgumentFormatter.cs (1)
277 var toString = type.GetRuntimeMethod("ToString", EmptyTypes);
Sdk\CollectionTracker.cs (1)
70 static readonly MethodInfo openGenericCompareTypedSetsMethod =
Sdk\CollectionTrackerExtensions.cs (3)
42 static readonly MethodInfo? asTrackerOpenGeneric = typeof(CollectionTrackerExtensions).GetRuntimeMethods().FirstOrDefault(m => m.Name == nameof(AsTracker) && m.IsGenericMethod); 46 static readonly ConcurrentDictionary<Type, MethodInfo> cacheOfAsTrackerByType = new ConcurrentDictionary<Type, MethodInfo>();