4 types derived from MethodBase
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInfo.cs (1)
10public abstract partial class ConstructorInfo : MethodBase
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInfo.cs (1)
9public abstract partial class MethodInfo : MethodBase
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInfo.Internal.cs (1)
6public abstract partial class MethodInfo : MethodBase
src\System\Reflection\ConstructorInfo.CoreCLR.cs (1)
6public abstract partial class ConstructorInfo : MethodBase
434 references to MethodBase
dotnet-svcutil-lib (22)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
1452private void LoadParam(object arg, int oneBasedArgIndex, MethodBase methodInfo)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (6)
1019private static MethodBase FilterMethodBases(MethodBase[] methodBases, Type[] parameterTypes, string methodName) 1032var constructorInfo = FilterMethodBases(constructorInfos.Cast<MethodBase>().ToArray(), parameterTypes, ".ctor"); 1039var methodInfo = FilterMethodBases(methodInfos.Cast<MethodBase>().ToArray(), parameterTypes, methodName);
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
183public static RuntimeMethodHandle MethodHandle(this MethodBase mb)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MethodCall.cs (2)
19public MethodCall(MethodBase methodBase, object[] args) : this(args) 25public MethodBase MethodBase { get; private set; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (9)
56MethodBase method = methodCall.MethodBase; 379MethodBase targetMethod = methodCall.MethodBase; 409public bool TryGetMethodData(MethodBase method, out MethodData methodData) 428private static int FindMethod(MethodData[] methodDatas, MethodBase methodToFind) 432MethodBase method = methodDatas[i].MethodBase; 482private MethodBase _methodBase; 486public MethodData(MethodBase methodBase, MethodType methodType) 491public MethodData(MethodBase methodBase, MethodType methodType, ProxyOperationRuntime operation) 498public MethodBase MethodBase
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\IClientOperationSelector.cs (1)
14string SelectOperation(MethodBase method, object[] parameters);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
182internal ProxyOperationRuntime GetOperation(MethodBase methodBase, object[] args, out bool canCacheResult)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
77public string SelectOperation(MethodBase method, object[] parameters)
illink (3)
ILLink.RoslynAnalyzer (3)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (3)
43 /// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.RuntimeMethodHandle)"/></item> 44 /// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.RuntimeMethodHandle, System.RuntimeTypeHandle)"/></item> 49 /// <see cref="System.Reflection.MethodBase.MethodHandle"/>
Microsoft.AspNetCore.Diagnostics (4)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (4)
46var method = frame.GetMethod(); 75internal static MethodDisplayInfo? GetMethodDisplayString(MethodBase? method) 152private static bool ShowInStackTrace(MethodBase method) 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType)
Microsoft.AspNetCore.Hosting (4)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (4)
46var method = frame.GetMethod(); 75internal static MethodDisplayInfo? GetMethodDisplayString(MethodBase? method) 152private static bool ShowInStackTrace(MethodBase method) 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType)
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ParameterDefaultValues.cs (1)
12public static object?[] GetParameterDefaultValues(MethodBase methodInfo)
Microsoft.AspNetCore.Server.IIS (4)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (4)
46var method = frame.GetMethod(); 75internal static MethodDisplayInfo? GetMethodDisplayString(MethodBase? method) 152private static bool ShowInStackTrace(MethodBase method) 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType)
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (4)
46var method = frame.GetMethod(); 75internal static MethodDisplayInfo? GetMethodDisplayString(MethodBase? method) 152private static bool ShowInStackTrace(MethodBase method) 196private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type? declaringType)
Microsoft.Build (6)
Evaluation\Expander.cs (6)
5529MethodBase memberInfo; 5544IEnumerable<MethodBase> members; 5557members = foundMembers.Cast<MethodBase>(); 5564foreach (MethodBase member in members) 5639MethodBase? method = member as MethodBase;
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis (3)
InternalSpecialType.cs (2)
45/// Indicates that the type is <see cref="System.Reflection.MethodBase"/> from the COR library. 48/// Check for this special type cannot be used to find the "canonical" definition of <see cref="System.Reflection.MethodBase"/>
InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
197var method = frame?.GetMethod();
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (2)
208var method = stackFrame.GetMethod(); 242var method = frame?.GetMethod();
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommonMemberFilter.cs (1)
20var method = frame.GetMethod();
Hosting\ObjectFormatter\CommonObjectFormatter.cs (2)
85var method = frame.GetMethod(); 112protected internal virtual string FormatMethodSignature(MethodBase method)
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (1)
68where T : MethodBase
Microsoft.CSharp (15)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (11)
79private static bool AreParametersEquivalent(this MethodBase method1, MethodBase method2) 99private static bool IsEquivalentTo(this ParameterInfo pi1, ParameterInfo pi2, MethodBase method1, MethodBase method2) 141Debug.Assert(!(member1 is MethodBase) || 142!((MethodBase)member1).IsGenericMethod || 143(((MethodBase)member1).IsGenericMethodDefinition && ((MethodBase)member2).IsGenericMethodDefinition)); 229if (!(member is MethodBase)) 234MethodBase method = (MethodBase)member;
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (4)
128private static void AddParameterConversions(MethodBase method) 746MethodBase methodBase = t.DeclaringMethod; 1335private static MethodSymbol AddMethodToSymbolTable(MethodBase member, AggregateSymbol callingAggregate, MethodKindEnum kind) 1611bool isVarArg = associatedInfo is MethodBase mb && (mb.CallingConvention & CallingConventions.VarArgs) != 0;
Microsoft.DotNet.Build.Tasks.Workloads (1)
EmbeddedTemplates.cs (1)
66string ns = MethodBase.GetCurrentMethod().DeclaringType.Namespace;
Microsoft.DotNet.XUnitExtensions.Tests (6)
ConditionalAttributeTests.cs (6)
32var method = System.Reflection.MethodBase.GetCurrentMethod(); 42var method = System.Reflection.MethodBase.GetCurrentMethod(); 53var method = System.Reflection.MethodBase.GetCurrentMethod();
Microsoft.Extensions.AI.Abstractions (2)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (2)
272var genericMethod = (MethodBase)GetGenericMemberDefinition(parameter.Member);
Microsoft.VisualBasic.Core (93)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (2)
648Dim current As MethodBase = item.AsMethod 781Dim current As MethodBase = currentMethod.AsMethod
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (13)
549Dim match As MethodBase() = Nothing 588match = New MethodBase(iNext - 1) {} 591match(i) = CType(members(i), MethodBase) 616Dim method As MethodBase 798Dim match As MethodBase() = Nothing 840match = New MethodBase(iNext - 1) {} 843match(i) = CType(members(i), MethodBase) 863Dim method As MethodBase 994Dim method As MethodBase 1005method = CType(member, MethodBase) 1066ByVal method As MethodBase, 1283Dim Method As MethodBase = TryCast(Member, MethodBase)
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (1)
1480Friend Shared Function GetCallTarget(ByVal targetProcedure As Method, ByVal flags As BindingFlags) As MethodBase
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (15)
123ByVal leftProcedure As MethodBase, 126ByVal rightProcedure As MethodBase, 269Dim leftProcedure As MethodBase = leftMember.AsMethod 270Dim rightProcedure As MethodBase = rightMember.AsMethod 501Dim newCandidateMethod As MethodBase = TryCast(newCandidate, MethodBase) 547IsRawGeneric(TryCast(newCandidate, MethodBase)) Then 557Dim existingCandidate As MethodBase 704DirectCast(newCandidate, MethodBase), 762Dim currentMethod As MethodBase = DirectCast(candidate, MethodBase) 988ByVal targetProcedure As MethodBase, 1113ByVal targetProcedure As MethodBase, 2158Dim leftMethod As MethodBase 2159Dim rightMethod As MethodBase
Microsoft\VisualBasic\CompilerServices\Symbols.vb (20)
172Friend Shared Function IsUserDefinedOperator(ByVal method As MethodBase) As Boolean 176Friend Shared Function IsNarrowingConversionOperator(ByVal method As MethodBase) As Boolean 180Friend Shared Function MapToUserDefinedOperator(ByVal method As MethodBase) As UserDefinedOperator 489Friend Shared Function IsGeneric(ByVal method As MethodBase) As Boolean 495Dim method As MethodBase = TryCast(member, MethodBase) 501Friend Shared Function IsInstantiatedGeneric(ByVal Method As MethodBase) As Boolean 506Friend Shared Function IsRawGeneric(ByVal method As MethodBase) As Boolean 511Dim method As MethodBase = TryCast(member, MethodBase) 538Friend Shared Function IndexIn(ByVal possibleGenericParameter As Type, ByVal genericMethodDef As MethodBase) As Integer 552Friend Shared Function RefersToGenericParameter(ByVal referringType As Type, ByVal method As MethodBase) As Boolean 625Friend Shared Function AreGenericMethodDefsEqual(ByVal method1 As MethodBase, ByVal method2 As MethodBase) As Boolean 636Friend Shared Function IsShadows(ByVal method As MethodBase) As Boolean 1260Dim callTarget As MethodBase = GetCallTarget(targetProcedure, flags) 1305Private _rawItem As MethodBase 'The unsubstituted raw generic method. 1338ByVal method As MethodBase, 1493Friend Function AsMethod() As MethodBase 1495Return TryCast(_item, MethodBase)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
541Friend Shared Function MethodToString(ByVal method As Reflection.MethodBase) As String 713Return MethodToString(DirectCast(member, MethodBase))
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)
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
95private static string FormatFrame(MethodBase method, Type declaringType) 171private static void FormatParameters(StringBuilder stringBuilder, MethodBase method)
Watson\FaultReporter.cs (2)
208var method = stackFrame.GetMethod(); 242var method = frame?.GetMethod();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
473[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodBase))]
netstandard (1)
netstandard.cs (1)
1441[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodBase))]
Shared (3)
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (3)
77NullableAttributeStateParser parser = parameterInfo.Member is MethodBase method && IsPrivateOrInternalMethodAndAnnotationDisabled(method) 120private static ParameterInfo? GetMetaParameter(MethodBase metaMethod, ParameterInfo parameter) 227private bool IsPrivateOrInternalMethodAndAnnotationDisabled(MethodBase method)
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\Dynamic\Utils\TypeExtensions.cs (5)
13private static readonly CacheDict<MethodBase, ParameterInfo[]> s_paramInfoCache = new CacheDict<MethodBase, ParameterInfo[]>(75); 65public static Type GetReturnType(this MethodBase mi) => mi.IsConstructor ? mi.DeclaringType! : ((MethodInfo)mi).ReturnType; 68internal static ParameterInfo[] GetParametersCached(this MethodBase method) 70CacheDict<MethodBase, ParameterInfo[]> pic = s_paramInfoCache;
System\Linq\Expressions\Common\CachedReflectionInfo.cs (4)
63s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(RuntimeMethodHandle) })!; 67s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle_RuntimeTypeHandle ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(RuntimeMethodHandle), typeof(RuntimeTypeHandle) })!;
System\Linq\Expressions\Compiler\ILGen.cs (5)
19internal static void Emit(this ILGenerator il, OpCode opcode, MethodBase methodBase) 373return value is MethodBase mb && ShouldLdtoken(mb); 438if (value is MethodBase mb && ShouldLdtoken(mb)) 452if (type != typeof(MethodBase)) 470internal static bool ShouldLdtoken(MethodBase mb)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (2)
503private List<WriteBack>? EmitArguments(MethodBase method, IArgumentProvider args) 513private List<WriteBack>? EmitArguments(MethodBase method, IArgumentProvider args, int skipParameters)
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (1)
331internal void MarkRefArgs(MethodBase method, int startIndex)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
1070private static void RequireNoRefArgs(MethodBase? method)
System\Linq\Expressions\Interpreter\InterpretedFrame.cs (1)
127public static bool IsInterpretedFrame(MethodBase method)
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\Runtime\CompilerServices\CallSiteHelpers.cs (4)
17/// Checks if a <see cref="MethodBase"/> is internally used by DLR and should not 20/// <param name="mb">The input <see cref="MethodBase"/></param> 22/// True if the input <see cref="MethodBase"/> is internally used by DLR and should not 25public static bool IsInternalFrame(MethodBase mb)
System\Runtime\CompilerServices\DebugInfoGenerator.cs (1)
35internal virtual void MarkSequencePoint(LambdaExpression method, MethodBase methodBase, ILGenerator ilg, DebugInfoExpression sequencePoint)
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\libraries\System.Private.CoreLib\src\System\Diagnostics\DiagnosticMethodInfo.cs (4)
11/// provided by <see cref="MethodBase"/> but it's meant for logging and tracing purposes. 16private readonly MethodBase _method; 18private DiagnosticMethodInfo(MethodBase method) => _method = method; 76MethodBase? method = frame.GetMethod();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrame.cs (2)
19private MethodBase? _method; 142public virtual MethodBase? GetMethod()
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (3)
228MethodBase? mb = sf?.GetMethod(); 375private static bool ShowInStackTrace(MethodBase mb) 435private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type declaringType)
src\libraries\System.Private.CoreLib\src\System\Reflection\Binder.cs (4)
12public abstract MethodBase BindToMethod(BindingFlags bindingAttr, MethodBase[] match, ref object?[] args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? names, out object? state); 15public abstract MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
9using static System.Reflection.MethodBase;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
251public override MethodBase? DeclaringMethod => null;
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (4)
19public static unsafe InvokeFunc_Obj4Args CreateInvokeDelegate_Obj4Args(MethodBase method, bool backwardsCompat) 86public static unsafe InvokeFunc_ObjSpanArgs CreateInvokeDelegate_ObjSpanArgs(MethodBase method, bool backwardsCompat) 143public static unsafe InvokeFunc_RefArgs CreateInvokeDelegate_RefArgs(MethodBase method, bool backwardsCompat) 208private static void EmitCallAndReturnHandling(ILGenerator il, MethodBase method, bool emitNew, bool backwardsCompat)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (4)
69public static bool operator ==(MethodBase? left, MethodBase? right) 87public static bool operator !=(MethodBase? left, MethodBase? right) => !(left == right);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.Constructor.cs (1)
8using static System.Reflection.MethodBase;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (3)
11using static System.Reflection.MethodBase; 26private readonly MethodBase _method; 30private MethodBaseInvoker(MethodBase method, RuntimeType[] argumentTypes)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (7)
10using static System.Reflection.MethodBase; 16/// Invokes the method reflected by the provided <see cref="MethodBase"/>. 19/// Used for better performance than <seealso cref="MethodBase.Invoke"/> when compatibility with that method 21/// Unlike <see cref="MethodBase.Invoke"/>, the invoke methods do not look up default values for arguments when 36private readonly MethodBase _method; 51public static MethodInvoker Create(MethodBase method) 80private MethodInvoker(MethodBase method, RuntimeType[] argumentTypes)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (5)
7using static System.Reflection.MethodBase; 88internal static void ValidateInvokeTarget(object? target, MethodBase method) 107MethodBase method, 136MethodBase method, 165MethodBase method,
src\libraries\System.Private.CoreLib\src\System\Reflection\Module.cs (2)
127public MethodBase? ResolveMethod(int metadataToken) => ResolveMethod(metadataToken, null, null); 129public virtual MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; }
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (3)
76NullableAttributeStateParser parser = parameterInfo.Member is MethodBase method && IsPrivateOrInternalMethodAndAnnotationDisabled(method) 119private static ParameterInfo? GetMetaParameter(MethodBase metaMethod, ParameterInfo parameter) 231private bool IsPrivateOrInternalMethodAndAnnotationDisabled(MethodBase method)
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (1)
82args = ((MethodBase)MemberImpl).GetParametersAsSpan();
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodBody.cs (1)
14internal MethodBase _methodBase;
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
94public sealed override MethodBase DeclaringMethod => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
652MethodBase? invokeMethod = null;
src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
44public virtual MethodBase? DeclaringMethod => null;
src\System\Diagnostics\StackFrame.CoreCLR.cs (1)
69internal static MethodBase? GetMethodFromNativeIP(IntPtr ip)
src\System\Diagnostics\StackFrameHelper.cs (1)
155public MethodBase? GetMethodBase(int i)
src\System\Diagnostics\StackTrace.CoreCLR.cs (1)
28MethodBase? mb = StackF.GetMethodBase(i);
src\System\Exception.CoreCLR.cs (3)
61private MethodBase? GetExceptionMethodFromStackTrace() 76public MethodBase? TargetSite 149private MethodBase? _exceptionMethod; // Needed for serialization.
src\System\Reflection\Emit\DynamicILGenerator.cs (1)
1015MethodBase m = RuntimeType.GetMethodBase(methodReal)!;
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (1)
194public override MethodBase? DeclaringMethod => m_type.DeclaringMethod;
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
169private int GetMethodToken(MethodBase method, Type[]? optionalParameterTypes, bool useMethodDef)
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
242internal static Type? GetMethodBaseReturnType(MethodBase? method)
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (8)
304private int GetMemberRefToken(MethodBase method, Type[]? optionalParameterTypes) 333MethodBase methDef = GetGenericMethodBaseDefinition(method); 392private static MethodBase GetGenericMethodBaseDefinition(MethodBase methodBase) 396MethodBase methDef; 437internal SignatureHelper GetMemberRefSignature(MethodBase? method, int cGenericParameters) 661public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) 1057internal int GetMethodTokenInternal(MethodBase method, Type[]? optionalParameterTypes, bool useMethodDef)
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
1061public override MethodBase? DeclaringMethod => m_declMeth;
src\System\Reflection\MethodBase.CoreCLR.cs (4)
15public static MethodBase? GetMethodFromHandle(RuntimeMethodHandle handle) 20MethodBase? m = RuntimeType.GetMethodBase(handle.GetMethodInfo()); 31public static MethodBase? GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType) 44public static MethodBase? GetCurrentMethod()
src\System\Reflection\RuntimeModule.cs (1)
74public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments)
src\System\Reflection\RuntimeParameterInfo.cs (5)
121private readonly MethodBase? m_originalMember; 125internal MethodBase DefiningMethod 129MethodBase? result = m_originalMember ?? MemberImpl as MethodBase; 163m_originalMember = accessor.MemberImpl as MethodBase;
src\System\Reflection\RuntimePropertyInfo.cs (2)
118var sbName = new ValueStringBuilder(MethodBase.MethodNameBufferSize); 128MethodBase.AppendParameters(ref sbName, arguments, Signature.CallingConvention);
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\Xml\Xsl\IlGen\GenerateHelper.cs (2)
479private MethodBase? _methInfo; 521public void MethodBegin(MethodBase methInfo, ISourceLineInfo? sourceInfo, bool initWriters)
System\Xml\Xsl\IlGen\XmlILModule.cs (1)
185public static ILGenerator DefineMethodBody(MethodBase methInfo)
System.Reflection (1)
System.Reflection.cs (1)
24[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodBase))]
System.Reflection.Context (8)
System\Reflection\Context\CustomReflectionContext.Projector.cs (2)
127public override MethodBase? ProjectMethodBase(MethodBase? value)
System\Reflection\Context\Delegation\DelegatingModule.cs (1)
149public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
52public override MethodBase? DeclaringMethod
System\Reflection\Context\Projection\ProjectingModule.cs (1)
95public override MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments)
System\Reflection\Context\Projection\ProjectingType.cs (1)
39public override MethodBase? DeclaringMethod
System\Reflection\Context\Projection\Projector.cs (2)
60public abstract MethodBase? ProjectMethodBase(MethodBase? value);
System.Reflection.Emit (2)
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (1)
87public override MethodBase? DeclaringMethod => _type.DeclaringMethod;
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
812private MemberInfo GetOriginalMemberIfConstructedType(MethodBase methodBase)
System.Reflection.MetadataLoadContext (36)
System\CoreRtBridge.cs (1)
60internal static ParameterInfo[] GetParametersNoCopy(this MethodBase m)
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\Reflection\Runtime\BindingFlagSupport\Shared.cs (1)
23public static bool QualifiesBasedOnParameterCount(this MethodBase methodBase, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (1)
85MethodBase IRoMethodBase.MethodBase => this;
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (1)
180public static T ResolveMethod<T>(this MethodDefinitionHandle handle, EcmaModule module, in TypeContext typeContext) where T : MethodBase
System\Reflection\TypeLoading\MethodBase\IRoMethodBase.cs (1)
10MethodBase MethodBase { get; }
System\Reflection\TypeLoading\Methods\RoMethod.cs (1)
129MethodBase IRoMethodBase.MethodBase => this;
System\Reflection\TypeLoading\Modules\RoModule.cs (1)
88public sealed override MethodBase ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) => throw new NotSupportedException(SR.NotSupported_ResolvingTokens);
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
68results = (type == (MemberTypes.Method | MemberTypes.Constructor)) ? new MethodBase[numMatches] : new MemberInfo[numMatches];
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericMethodParameterType.cs (1)
25public sealed override MethodBase DeclaringMethod => GetRoDeclaringMethod();
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericParameterType.cs (1)
69public abstract override MethodBase? DeclaringMethod { get; }
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericTypeParameterType.cs (1)
28public sealed override MethodBase? DeclaringMethod => null;
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
103public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
230public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (1)
172public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoHasElementType.cs (1)
51public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoModifiedType.cs (1)
150public override MethodBase? DeclaringMethod => throw new NotSupportedException(SR.NotSupported_ModifiedType);
System\Reflection\TypeLoading\Types\RoStubType.cs (1)
45public sealed override MethodBase DeclaringMethod => throw null!;
System\Reflection\TypeLoading\Types\RoType.cs (1)
145public abstract override MethodBase? DeclaringMethod { get; }
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
475[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodBase))]
System.Security.Cryptography (4)
System\Security\Cryptography\CryptoConfig.cs (4)
436MethodBase[] cons = retvalType.GetConstructors(ConstructorDefault); 444List<MethodBase> candidates = new List<MethodBase>(); 447MethodBase con = cons[i];
System.ServiceModel.Primitives (14)
Extensions\ReflectionExtensions.cs (1)
222public static RuntimeMethodHandle MethodHandle(this MethodBase mb)
System\ServiceModel\Channels\MethodCall.cs (2)
24public MethodCall(MethodBase methodBase, object[] args) : this(args) 31public MethodBase MethodBase { get; private set; }
System\ServiceModel\Channels\ServiceChannelProxy.cs (8)
56MethodBase method = methodCall.MethodBase; 397MethodBase targetMethod = methodCall.MethodBase; 427public bool TryGetMethodData(MethodBase method, out MethodData methodData) 446private static int FindMethod(MethodData[] methodDatas, MethodBase methodToFind) 450MethodBase method = methodDatas[i].MethodBase; 502public MethodData(MethodBase methodBase, MethodType methodType) 507public MethodData(MethodBase methodBase, MethodType methodType, ProxyOperationRuntime operation) 514public MethodBase MethodBase { get; }
System\ServiceModel\Dispatcher\IClientOperationSelector.cs (1)
13string SelectOperation(MethodBase method, object[] parameters);
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
167internal ProxyOperationRuntime GetOperation(MethodBase methodBase, object[] args, out bool canCacheResult)
System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
82public string SelectOperation(MethodBase method, object[] parameters)
System.Text.Json (3)
System\ReflectionExtensions.cs (2)
125var genericMethod = (MethodBase)parameter.Member.GetGenericMemberDefinition()!;
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
100if (parameterInfo is null && MatchingProperty.DeclaringTypeInfo.ConstructorAttributeProvider is MethodBase ctorInfo)
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
1947if (descriptor.MemberInfo is MethodBase mi)
System.Windows.Forms.Primitives.TestUtilities (1)
Metafiles\EmfValidateHelper.cs (1)
17/// The name of the calling method. Use <see cref="MethodBase.GetCurrentMethod()"/> and property <see cref="MemberInfo.Name"/>.
System.Xaml (13)
System\Xaml\Runtime\ClrObjectRuntime.cs (5)
122MethodBase[] methods = members as MethodBase[]; 125methods = new MethodBase[members.Length]; 134protected MethodBase BindToMethod(BindingFlags bindingFlags, MethodBase[] candidates, object[] args)
System\Xaml\Runtime\DynamicMethodRuntime.cs (4)
62Dictionary<MethodBase, FactoryDelegate> _factoryDelegates; 91private Dictionary<MethodBase, FactoryDelegate> FactoryDelegates 97_factoryDelegates = new Dictionary<MethodBase, FactoryDelegate>(); 346private LocalBuilder[] LoadArguments(ILGenerator ilGenerator, MethodBase method)
System\Xaml\Schema\TypeReflector.cs (1)
157internal static bool IsPublicOrInternal(MethodBase method)
System\Xaml\XamlObjectReader.cs (2)
1217MethodBase method = memberInfo as MethodBase;
System\Xaml\XamlType.cs (1)
637MethodBase result = Type.DefaultBinder.SelectMethod(ConstructorBindingFlags, ctorArray, paramTypes, null);
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
353MethodBase mb = sf.GetMethod();