2using System.Diagnostics;
4using System.Reflection;
27 base(context, module, type, underlyingMethodBase)
29 _underlyingMethodBase = underlyingMethodBase ??
throw new ArgumentNullException(nameof(underlyingMethodBase));
39 if (parameter is
null)
40 throw new ArgumentNullException(nameof(parameter));
42 Debug.Assert(parameter.Member == _underlyingMethodBase);
44 if (_parametersSource ==
null)
45 Interlocked.CompareExchange(
ref _parametersSource, _underlyingMethodBase.GetParameters().OrderBy(i => i.Position).ToArray(),
null);
46 if (_parameters ==
null)
50 var idx = parameter.Position;
51 Debug.Assert(idx >= -1);
52 Debug.Assert(idx < _parametersSource.Length);
55 if (idx >= 0 && _parameters.Length < idx)
56 throw new IndexOutOfRangeException();
59 ref var rec =
ref _returnParameter;
61 rec =
ref _parameters[idx];
67 throw new InvalidOperationException();
75 internal MethodBase UnderlyingMethodBase => _underlyingMethodBase;
78 public MethodAttributes
Attributes => _underlyingMethodBase.Attributes;
87 public bool IsAbstract => _underlyingMethodBase.IsAbstract;
90 public bool IsAssembly => _underlyingMethodBase.IsAssembly;
96 public bool IsFamily => _underlyingMethodBase.IsFamily;
105 public bool IsFinal => _underlyingMethodBase.IsFinal;
117 public bool IsPrivate => _underlyingMethodBase.IsPrivate;
120 public bool IsPublic => _underlyingMethodBase.IsPublic;
123 public bool IsStatic => _underlyingMethodBase.IsStatic;
126 public bool IsVirtual => _underlyingMethodBase.IsVirtual;
137 return ResolveTypeSymbols(_underlyingMethodBase.GetGenericArguments());
143 return _underlyingMethodBase.GetMethodImplementationFlags();
149 return ResolveParameterSymbols(_underlyingMethodBase.GetParameters());
System.Threading.Interlocked Interlocked
IKVM.Reflection.ParameterInfo ParameterInfo
IKVM.Reflection.MethodBase MethodBase
System.Runtime.InteropServices.CallingConvention CallingConvention
Obtains information about the attributes of a member and provides access to member metadata.
bool ContainsGenericParameters
Gets a value indicating whether the generic method contains unassigned generic type parameters.
bool IsConstructor
Gets a value indicating whether the method is a constructor.
bool IsPrivate
Gets a value indicating whether this member is private.
bool IsHideBySig
Gets a value indicating whether only a member of the same kind with exactly the same signature is hid...
bool IsFamilyOrAssembly
Gets a value indicating whether the potential visibility of this method or constructor is described b...
bool IsFamily
Gets a value indicating whether the visibility of this method or constructor is described by Family; ...
bool IsSpecialName
Gets a value indicating whether this method has a special name.
bool IsStatic
Gets a value indicating whether the method is static.
MethodAttributes Attributes
Gets the attributes associated with this method.
ReflectionMethodBaseSymbol(ReflectionSymbolContext context, ReflectionModuleSymbol module, ReflectionTypeSymbol? type, MethodBase underlyingMethodBase)
Initializes a new instance.
bool IsAbstract
Gets a value indicating whether the method is abstract.
bool IsPublic
Gets a value indicating whether this is a public method.
ITypeSymbol[] GetGenericArguments()
Returns an array of ITypeSymbol objects that represent the type arguments of a generic method or the ...
bool IsVirtual
Gets a value indicating whether the method is virtual.
bool IsGenericMethod
Gets a value indicating whether the method is generic.
bool IsFinal
Gets a value indicating whether this method is final.
IParameterSymbol[] GetParameters()
When overridden in a derived class, gets the parameters of the specified method or constructor.
bool IsFamilyAndAssembly
Gets a value indicating whether the visibility of this method or constructor is described by FamANDAs...
MethodImplAttributes GetMethodImplementationFlags()
When overridden in a derived class, returns the MethodImplAttributes flags.
bool IsGenericMethodDefinition
Gets a value indicating whether the method is a generic method definition.
bool IsAssembly
Gets a value indicating whether the potential visibility of this method or constructor is described b...
MethodImplAttributes MethodImplementationFlags
Gets the MethodImplAttributes flags that specify the attributes of a method implementation.
Implementation of IModuleSymbol derived from System.Reflection.
Holds references to symbols derived from System.Reflection.
ReflectionSymbolContext Context
Gets the associated ReflectionSymbolContext.
Provides information about methods and constructors.
Discovers the attributes of a parameter and provides access to parameter metadata.
Represents type declarations: class types, interface types, array types, value types,...