4 types derived from MethodBase
System.Private.CoreLib (4)
434 references to MethodBase
dotnet-svcutil-lib (22)
illink (3)
ILLink.RoslynAnalyzer (3)
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Hosting (4)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Server.IIS (4)
Microsoft.AspNetCore.Shared.Tests (4)
Microsoft.Build (6)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.Scripting (3)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CSharp (15)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.XUnitExtensions.Tests (6)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.VisualBasic.Core (93)
Microsoft\VisualBasic\CompilerServices\Utils.vb (22)
153Public Function IsEquivalentTo(mi1 As MethodBase, mi2 As MethodBase) As Boolean
222Private Function IsEquivalentTo(pi1 As ParameterInfo, pi2 As ParameterInfo, method1 As MethodBase, method2 As MethodBase) As Boolean
261Debug.Assert(Not (TypeOf member1 Is MethodBase) OrElse
262Not DirectCast(member1, MethodBase).IsGenericMethod OrElse
263(DirectCast(member1, MethodBase).IsGenericMethodDefinition AndAlso DirectCast(member2, MethodBase).IsGenericMethodDefinition))
328If Not (TypeOf member Is MethodBase) Then
332Dim method As MethodBase = DirectCast(member, MethodBase)
346Private s_MemberEquivalence As Func(Of MethodBase, MethodBase, Boolean) =
350Dim MemberInfo As Type = GetType(MethodBase)
357Dim memberEquivalence As Func(Of MethodBase, MethodBase, Boolean) = Expression.Lambda(Of Func(Of MethodBase, MethodBase, Boolean))(
375Dim fallbackMemberEquivalence As Func(Of MethodBase, MethodBase, Boolean) = Function(m1param, m2param) m1param.IsEquivalentTo(m2param)
384Public Function HasSameMetadataDefinitionAs(mi1 As MethodBase, mi2 As MethodBase) As Boolean
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (18)
145Public Overrides Function BindToMethod(ByVal bindingAttr As BindingFlags, ByVal match() As MethodBase, ByRef args() As Object, ByVal modifiers() As ParameterModifier, ByVal culture As CultureInfo, ByVal names() As String, ByRef ObjState As Object) As MethodBase
150Dim SelectedMatch As MethodBase
151Dim ThisMethod As MethodBase
175Return DirectCast(m_CachedMember, MethodBase)
1065Dim TmpMatch As MethodBase
1256Private Function GetMostSpecific(ByVal match0 As MethodBase, ByVal ThisMethod As MethodBase, ByVal ArgIndexes() As Integer, ByVal ParamOrder As Object(), ByVal IsPropertySet As Boolean, ByVal ParamArrayIndex0 As Integer, ByVal ParamArrayIndex1 As Integer, ByVal args As Object()) As Integer
1514Private Function MethodsDifferOnlyByReturnType(ByVal match1 As MethodBase, ByVal match2 As MethodBase) As Boolean
1593Public Overrides Function SelectMethod(ByVal bindingAttr As BindingFlags, ByVal match() As MethodBase, ByVal types() As Type, ByVal modifiers() As ParameterModifier) As MethodBase
1993Dim p As MethodBase()
1994Dim invokeMethod As MethodBase
2057ByVal invokeAttr As BindingFlags) As MethodBase()
2060Dim mb As MethodBase()
2234mb = New MethodBase(NewSize - 1) {}
2238mb(TargetIndex) = CType(mi(Index), MethodBase)
Microsoft.VisualStudio.LanguageServices (4)
mscorlib (1)
netstandard (1)
Shared (3)
System.Linq.Expressions (33)
System\Dynamic\Utils\ExpressionUtils.cs (4)
100public static void ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ref ReadOnlyCollection<Expression> arguments, string? methodParamName)
134public static void ValidateArgumentCount(MethodBase method, ExpressionType nodeKind, int count, ParameterInfo[] pis)
154public static Expression ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arguments, ParameterInfo pi, string? methodParamName, string argumentParamName, int index = -1)
235internal static ParameterInfo[] GetParametersForValidation(MethodBase method, ExpressionType nodeKind)
System\Linq\Expressions\MethodCallExpression.cs (5)
1269private static void ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ref ReadOnlyCollection<Expression> arguments, string methodParamName)
1274private static ParameterInfo[] GetParametersForValidation(MethodBase method, ExpressionType nodeKind)
1279private static void ValidateArgumentCount(MethodBase method, ExpressionType nodeKind, int count, ParameterInfo[] pis)
1284private static Expression ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arg, ParameterInfo pi, string methodParamName, string argumentParamName)
1347private static bool IsCompatible(MethodBase m, Expression[] arguments)
System.Private.CoreLib (121)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (21)
31public sealed override MethodBase BindToMethod(
32BindingFlags bindingAttr, MethodBase[] match, ref object?[] args,
38MethodBase?[] candidates = (MethodBase[])match.Clone();
386MethodBase bestMatch = candidates[currentMin]!;
540public sealed override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers)
558MethodBase[] candidates = (MethodBase[])match.Clone();
626MethodBase bestMatch = candidates[currentMin];
791public static MethodBase? ExactBinding(MethodBase[] match, Type[] types)
795MethodBase[] aExactMatches = new MethodBase[match.Length];
1014private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type? paramArrayType1,
1015MethodBase m2, int[] paramOrder2, Type? paramArrayType2,
1097public static bool CompareMethodSig(MethodBase m1, MethodBase m2)
1129internal static MethodBase? FindMostDerivedNewSlotMeth(MethodBase[] match, int cMatches)
1132MethodBase? methWithDeepestHierarchy = null;
src\System\RuntimeType.CoreCLR.cs (20)
214internal MethodBase AddMethod(RuntimeType declaringType, RuntimeMethodHandleInternal method, CacheType cacheType)
283return (MethodBase)(object)list[0];
1756internal MethodBase GetMethod(RuntimeType declaringType, RuntimeMethodHandleInternal method)
1762internal MethodBase GetConstructor(RuntimeType declaringType, RuntimeMethodHandleInternal constructor)
1782internal static MethodBase? GetMethodBase(RuntimeModule scope, int typeMetadataToken)
1787internal static MethodBase? GetMethodBase(IRuntimeMethodInfo methodHandle)
1792internal static MethodBase? GetMethodBase(RuntimeType? reflectedType, IRuntimeMethodInfo methodHandle)
1794MethodBase? retval = GetMethodBase(reflectedType, methodHandle.Value);
1802internal static MethodBase? GetMethodBase(RuntimeType? reflectedType, RuntimeMethodHandleInternal methodHandle)
1834MethodBase[] methodBases = (reflectedType.GetMember(
1836BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) as MethodBase[])!;
1911MethodBase retval;
2270MethodBase methodBase, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes)
2760MethodBase ifaceMethodBase = GetMethodBase(ifaceRtType, ifaceRtMethodHandle)!;
2776MethodBase? rtTypeMethodBase = GetMethodBase(reflectedType, classRtMethodHandle);
3112new MethodBase[totalCount] : new MemberInfo[totalCount];
3263public override MethodBase? DeclaringMethod
3886MethodBase[] cons = new MethodBase[candidates.Count];
3917MethodBase? invokeMethod;
System.Private.Xml (3)
System.Reflection (1)
System.Reflection.Context (8)
System.Reflection.Emit (2)
System.Reflection.MetadataLoadContext (36)
System\Reflection\DefaultBinder.cs (18)
37public sealed override MethodBase BindToMethod(
38BindingFlags bindingAttr, MethodBase[] match, ref object?[] args,
47public sealed override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers)
65MethodBase[] candidates = (MethodBase[])match.Clone();
140MethodBase bestMatch = candidates[currentMin];
274public static MethodBase? ExactBinding(MethodBase[] match, Type[] types)
281MethodBase[] aExactMatches = new MethodBase[match.Length];
504private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type? paramArrayType1,
505MethodBase m2, int[] paramOrder2, Type? paramArrayType2,
564public static bool CompareMethodSig(MethodBase m1, MethodBase m2)
596internal static MethodBase? FindMostDerivedNewSlotMeth(MethodBase[] match, int cMatches)
599MethodBase? methWithDeepestHierarchy = null;
System.Runtime (1)
System.Security.Cryptography (4)
System.ServiceModel.Primitives (14)
System.Text.Json (3)
System.Windows.Forms.Design (1)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Xaml (13)
UIAutomationClient (1)