12 types derived from MethodSymbol
Microsoft.CodeAnalysis.CSharp (12)
Symbols\ErrorMethodSymbol.cs (1)
14internal sealed class ErrorMethodSymbol : MethodSymbol
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
18internal sealed class FunctionPointerMethodSymbol : MethodSymbol
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
26internal sealed class PEMethodSymbol : MethodSymbol
Symbols\ReducedExtensionMethodSymbol.cs (1)
22internal sealed class ReducedExtensionMethodSymbol : MethodSymbol
Symbols\SignatureOnlyMethodSymbol.cs (1)
19internal sealed class SignatureOnlyMethodSymbol : MethodSymbol
Symbols\Source\SourceMethodSymbol.cs (1)
17internal abstract partial class SourceMethodSymbol : MethodSymbol
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
20internal abstract class SynthesizedEntryPointSymbol : MethodSymbol
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
21internal abstract class SynthesizedGlobalMethodSymbol : MethodSymbol, ISynthesizedGlobalMethodSymbol
Symbols\Synthesized\SynthesizedInstanceMethodSymbol.cs (1)
17internal abstract class SynthesizedInstanceMethodSymbol : MethodSymbol
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
15internal sealed class SynthesizedIntrinsicOperatorSymbol : MethodSymbol
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
12internal sealed class SynthesizedStaticConstructor : MethodSymbol
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
21internal abstract class WrappedMethodSymbol : MethodSymbol
3112 references to MethodSymbol
Microsoft.CodeAnalysis.CSharp (2993)
Binder\Binder.cs (4)
449return ((MethodSymbol)containingMember).IsScriptInitializer; 490internal virtual MethodSymbol? ParamsCollectionConstructorInProgress => null; 653symbol = ((MethodSymbol)symbol).ConstructedFrom; 752internal static void ReportDiagnosticsIfUnmanagedCallersOnly(BindingDiagnosticBag diagnostics, MethodSymbol symbol, SyntaxNodeOrToken syntax, bool isDelegateConversion)
Binder\Binder.ValueChecks.cs (40)
35/// This is the primary <see cref="MethodSymbol" /> used in ref safety analysis. 42internal MethodSymbol? Method { get; } 49internal MethodSymbol? SetMethod { get; } 56private MethodInfo(Symbol symbol, MethodSymbol? method, MethodSymbol? setMethod) 63internal static MethodInfo Create(MethodSymbol method) 387var accessorForDefaultArguments = useSetAccessor 837if (!isValueType || (RequiresAssignableVariable(valueKind) && (this.ContainingMemberOrLambda as MethodSymbol)?.IsEffectivelyReadOnly == true)) 886var getItemOrSliceHelper = (MethodSymbol)Compilation.GetWellKnownTypeMember(elementAccess.GetItemOrSliceHelper); 1153if (RequiresAssignableVariable(valueKind) && !backingField.ContainingType.IsReferenceType && (this.ContainingMemberOrLambda as MethodSymbol)?.IsEffectivelyReadOnly == true) 1426MethodSymbol containingMethod = (MethodSymbol)containing; 1448if (!(ContainingMemberOrLambda is MethodSymbol method)) 1632MethodSymbol methodSymbol, 1724var setMethod = propertySymbol.GetOwnOrInheritedSetMethod(); 1793var getMethod = propertySymbol.GetOwnOrInheritedGetMethod(); 1842bool reportUseSite(MethodSymbol accessor) 1884if (!(containingMember is MethodSymbol method)) 2293var method = methodInfo.Method; 2403static EscapeArgument getReceiverCore(MethodSymbol? method, BoundExpression receiver) 2505case MethodSymbol method: 2993Debug.Assert(underlyingParameter.ContainingSymbol is MethodSymbol); 3379var thisParam = ((MethodSymbol)_symbol).ThisParameter; 3422var methodSymbol = call.Method; 3505var methodSymbol = call.Method; 3705var thisParam = ((MethodSymbol)_symbol).ThisParameter; 3739var methodSymbol = call.Method; 3822var methodSymbol = call.Method; 4049var thisParam = ((MethodSymbol)_symbol).ThisParameter; 4259var constructorSymbol = objectCreation.Constructor; 4356var operatorMethod = conversion.Conversion.Method; 4538var constructMethod = expr.CollectionBuilderMethod; 4746var thisParam = ((MethodSymbol)_symbol).ThisParameter; 4851var methodSymbol = call.Method; 4939var methodSymbol = call.Method; 5006var constructorSymbol = objectCreation.Constructor; 5140var operatorMethod = conversion.Conversion.Method; 5493ImmutableArray<MethodSymbol>.Empty); 5533ImmutableArray<MethodSymbol>.Empty);
Binder\Binder_Attributes.cs (7)
187MethodSymbol? attributeConstructor = null; 214binder.CheckAndCoerceArguments<MethodSymbol>(node, memberResolutionResult, analyzedArguments.ConstructorArguments, diagnostics, receiver: null, invokedAsExtensionMethod: false, out argsToParamsOpt); 285var attributeConstructor = boundAttribute.Constructor; 534var setMethod = propertySymbol.GetOwnOrInheritedSetMethod(); 639var getMethod = propertySymbol.GetMethod; 640var setMethod = propertySymbol.SetMethod; 697MethodSymbol attributeConstructor,
Binder\Binder_Await.cs (9)
59out MethodSymbol? getResult, 107var containingMethod = this.ContainingMemberOrLambda as MethodSymbol; 170var method = (MethodSymbol)containingMemberOrLambda; 257out MethodSymbol? getResult, 348var getAwaiterMethod = call.Method; 435private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall) 477private static bool HasOptionalParameters(MethodSymbol method)
Binder\Binder_Constraints.cs (1)
465MethodSymbol method => (TypeSymbol)method.ContainingSymbol,
Binder\Binder_Conversions.cs (47)
413if (conversion.Method is MethodSymbol method && method.IsStatic) 529MethodSymbol? castUpMethod = TryFindCastUpMethod(sourceForCastUp, destination.OriginalDefinition); 556static void reportUseSiteOrMissing(MethodSymbol? method, object containingType, string methodName, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 574internal static MethodSymbol? TryFindImplicitOperatorFromArray(TypeSymbol type) 584internal static MethodSymbol? TryFindImplicitOperatorFromSpan(TypeSymbol spanType, TypeSymbol readonlySpanType) 594private static MethodSymbol? TryFindImplicitOperator<TArg>(TypeSymbol type, TArg arg, 595Func<TArg, MethodSymbol, bool> predicate) 624internal static MethodSymbol? TryFindCastUpMethod(TypeSymbol source, TypeSymbol destination) 652internal static MethodSymbol? TryFindAsSpanCharMethod(CSharpCompilation compilation, TypeSymbol readOnlySpanType) 658MethodSymbol? result = null; 686private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate) 689MethodSymbol? result = null; 692if (member is MethodSymbol method && predicate(arg, method)) 820var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out MethodSymbol? constructor, out bool isExpanded); 837MethodSymbol? collectionBuilderMethod = null; 886HasParamsCollectionTypeInProgress(namedType, out NamedTypeSymbol? inProgress, out MethodSymbol? inProgressConstructor)) 1032internal MethodSymbol? GetAndValidateCollectionBuilderMethod( 1038MethodSymbol? collectionBuilderMethod; 1076internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, MethodSymbol? constructor, BindingDiagnosticBag diagnostics) 1106internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false) 1142out MemberResolutionResult<MethodSymbol> memberResolutionResult, 1176MemberResolutionResult<MethodSymbol> memberResolutionResult, 1217out MethodSymbol? constructor) 1238internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics) 1280out ImmutableArray<MethodSymbol> addMethods) 1298out ImmutableArray<MethodSymbol> addMethods) 1339out ImmutableArray<MethodSymbol> addMethods) 1354out ImmutableArray<MethodSymbol> addMethods) 1432resolution.MethodGroup, diagnostics: diagnostics, out var addMethod); 1447static ImmutableArray<MethodSymbol> filterOutBadGenericMethods( 1449ImmutableArray<MemberResolutionResult<MethodSymbol>> finalApplicableCandidates, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1452var resultBuilder = ArrayBuilder<MethodSymbol>.GetInstance(finalApplicableCandidates.Length); 1469MethodSymbol? constructed = null; 1555OverloadResolutionResult<MethodSymbol> result, 1559out MethodSymbol? addMethod) 1832private MethodSymbol? GetCollectionBuilderMethod( 1856if (candidate is not MethodSymbol { IsStatic: true } method) 1882MethodSymbol methodWithTargetTypeParameters; // builder method substituted with type parameters from target type 2261private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 2263MethodSymbol? delegateMethod; 2578private bool MemberGroupFinalValidation(BoundExpression? receiverOpt, MethodSymbol methodSymbol, SyntaxNode node, BindingDiagnosticBag diagnostics, bool invokedAsExtensionMethod) 2657Debug.Assert(memberSymbol is not MethodSymbol { MethodKind: not MethodKind.Constructor } || 2662if (receiverOpt != null || memberSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor }) 2809internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 2815MethodSymbol delegateOrFuncPtrMethod = delegateType switch 2999MethodSymbol selectedMethod = conversion.Method;
Binder\Binder_Crefs.cs (9)
303symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 442ImmutableArray<MethodSymbol> instanceConstructors = constructorType.InstanceConstructors; 561MethodSymbol signature = ((FunctionPointerTypeSymbol)type).Signature; 649if (((MethodSymbol)s).Arity == 0) 667s.Kind != SymbolKind.Method || ((MethodSymbol)s).Arity == 0); 775MethodSymbol candidateMethod = (MethodSymbol)candidate; 799explicitInterfaceImplementations: ImmutableArray<MethodSymbol>.Empty); 917symbol = ((MethodSymbol)symbol).Construct(typeArgumentsWithAnnotations.ToImmutableAndFree());
Binder\Binder_Deconstruct.cs (1)
683var deconstructMethod = ((BoundCall)result).Method;
Binder\Binder_Expressions.cs (95)
1312MethodSymbol method = this.ContainingMember() as MethodSymbol; 1453case MethodSymbol { AssociatedSymbol: SourcePropertySymbol property }: 1460if (contextualAttributeBinder is { AttributeTarget: MethodSymbol { AssociatedSymbol: SourcePropertySymbol property } }) 1937var containingMethod = this.ContainingMemberOrLambda as MethodSymbol; 2082(this.ContainingMember() is MethodSymbol { MethodKind: MethodKind.Constructor } containingMember && (object)containingMember != primaryCtor)) && // We are in a non-primary instance constructor 2116bool capture = (this.ContainingMember() is MethodSymbol containingMethod && (object)primaryCtor != containingMethod); 2137this.ContainingMemberOrLambda is MethodSymbol { MethodKind: MethodKind.AnonymousFunction or MethodKind.LocalFunction } && 2593MethodSymbol symbolOpt = GetWellKnownTypeMember(WellKnownMember.System_Index__ctor, diagnostics, syntax: node) as MethodSymbol; 2603MethodSymbol symbolOpt = null; 2628symbolOpt = (MethodSymbol)GetWellKnownTypeMember( 2637symbolOpt = (MethodSymbol)GetWellKnownTypeMember( 2758ImmutableArray<MethodSymbol> originalUserDefinedConversions = conversion.OriginalUserDefinedConversions; 3248&& ((MethodSymbol)containingSymbol).IsAsync 4724MethodSymbol constructor, 4748MethodSymbol constructor, 4884MemberResolutionResult<MethodSymbol> memberResolutionResult; 4885ImmutableArray<MethodSymbol> candidateConstructors; 4910MethodSymbol constructor, 4918MemberResolutionResult<MethodSymbol> memberResolutionResult, 4919ImmutableArray<MethodSymbol> candidateConstructors, 4929this.CheckAndCoerceArguments<MethodSymbol>(nonNullSyntax, memberResolutionResult, analyzedArguments, diagnostics, receiver: null, invokedAsExtensionMethod: false, out argsToParamsOpt); 4938MethodSymbol resultMember = memberResolutionResult.Member; 5055static void validateRecordCopyConstructor(MethodSymbol constructor, NamedTypeSymbol baseType, MethodSymbol resultMember, Location errorLocation, BindingDiagnosticBag diagnostics) 5106internal static bool IsUserDefinedRecordCopyConstructor(MethodSymbol constructor) 6082private static ImmutableSegmentedDictionary<string, Symbol> GetMembersRequiringInitialization(MethodSymbol constructor) 6094MethodSymbol constructor, 6429applicableMethods: ImmutableArray<MethodSymbol>.Empty, 6553internal ImmutableArray<MethodSymbol> FilterInaccessibleConstructors(ImmutableArray<MethodSymbol> constructors, bool allowProtectedConstructorsOfBaseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 6555ArrayBuilder<MethodSymbol> builder = null; 6559MethodSymbol constructor = constructors[i]; 6565builder = ArrayBuilder<MethodSymbol>.GetInstance(); 6578private bool IsConstructorAccessible(MethodSymbol constructor, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool allowProtectedConstructorsOfBaseType = false) 6648OverloadResolutionResult<MethodSymbol> overloadResolutionResult = OverloadResolutionResult<MethodSymbol>.GetInstance(); 6649ImmutableArray<MethodSymbol> accessibleConstructors = GetAccessibleConstructorsForOverloadResolution(type, ref useSiteInfo); 6698out MemberResolutionResult<MethodSymbol> memberResolutionResult, 6699out ImmutableArray<MethodSymbol> candidateConstructors, 6718MemberResolutionResult<MethodSymbol> memberResolutionResult, 6719ImmutableArray<MethodSymbol> candidateConstructors, 6738this.CheckAndCoerceArguments<MethodSymbol>(node, memberResolutionResult, analyzedArguments, diagnostics, receiver: null, invokedAsExtensionMethod: false, out argToParams); 6745var method = memberResolutionResult.Member; 6802MemberResolutionResult<MethodSymbol> memberResolutionResult, 6803ImmutableArray<MethodSymbol> candidateConstructors, 6819this.CheckAndCoerceArguments<MethodSymbol>(node, memberResolutionResult, analyzedArguments, diagnostics, receiver: null, invokedAsExtensionMethod: false, argsToParamsOpt: out _); 7102out MemberResolutionResult<MethodSymbol> memberResolutionResult, 7103out ImmutableArray<MethodSymbol> candidateConstructors, 7109ImmutableArray<MethodSymbol> allInstanceConstructors; 7113OverloadResolutionResult<MethodSymbol> result = OverloadResolutionResult<MethodSymbol>.GetInstance(); 7134OverloadResolutionResult<MethodSymbol> inaccessibleResult = OverloadResolutionResult<MethodSymbol>.GetInstance(); 7152default(MemberResolutionResult<MethodSymbol>); // Invalid results are not interesting - we have enough info in candidateConstructors. 7223private ImmutableArray<MethodSymbol> GetAccessibleConstructorsForOverloadResolution(NamedTypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 7225ImmutableArray<MethodSymbol> allInstanceConstructors; 7229private ImmutableArray<MethodSymbol> GetAccessibleConstructorsForOverloadResolution(NamedTypeSymbol type, bool allowProtectedConstructorsOfBaseType, out ImmutableArray<MethodSymbol> allInstanceConstructors, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 7980lookupResult.Symbols.All(s => s.Kind == SymbolKind.Method) ? lookupResult.Symbols.SelectAsArray(s_toMethodSymbolFunc) : ImmutableArray<MethodSymbol>.Empty, 8129var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 8132var m = s as MethodSymbol; 8402var overloadResolutionResult = OverloadResolutionResult<MethodSymbol>.GetInstance(); 9247else if (convertedIndex is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } && 10059var substring = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_String__Substring, diagnostics, syntax); 10090candidate is MethodSymbol method && 10107void makeCall(SyntaxNode syntax, BoundExpression receiver, MethodSymbol method, 10130internal static bool MethodHasValidSliceSignature(MethodSymbol method) 10197property.GetOwnOrInheritedGetMethod()?.OriginalDefinition is MethodSymbol getMethod && 10396var method = node.LookupSymbolOpt as MethodSymbol; 10434var result = OverloadResolutionResult<MethodSymbol>.GetInstance(); 10463var method = GetUniqueSignatureFromMethodGroup(node, out bool useParams); 10480private MethodSymbol? GetUniqueSignatureFromMethodGroup_CSharp10(BoundMethodGroup node, out bool useParams) 10482MethodSymbol? method = null; 10483var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10484foreach (var m in node.Methods) 10592static bool isCandidateUnique(ref MethodSymbol? method, MethodSymbol candidate) 10616private MethodSymbol? GetUniqueSignatureFromMethodGroup(BoundMethodGroup node, out bool useParams) 10624MethodSymbol? foundMethod = null; 10628var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10629foreach (var memberMethod in node.Methods) 10652var substituted = typeArguments.IsDefaultOrEmpty ? memberMethod : memberMethod.Construct(typeArguments); 10693var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: methodGroup.Methods.Count); 10750static bool isCandidateUnique(ref MethodSymbol? foundMethod, MethodSymbol candidate) 10765bool satisfiesConstraintChecks(MethodSymbol method) 10792MethodSymbol methodSymbol, 10912MethodSymbol invoke = possibleDelegateType.DelegateInvokeMethod(); 11034return symbol is MethodSymbol method &&
Binder\Binder_Invocation.cs (34)
41private static ImmutableArray<MethodSymbol> GetOriginalMethods(OverloadResolutionResult<MethodSymbol> overloadResolutionResult) 51return ImmutableArray<MethodSymbol>.Empty; 54var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 348result = BindDynamicInvocation(node, boundExpression, analyzedArguments, ImmutableArray<MethodSymbol>.Empty, diagnostics, queryClause); 394ImmutableArray<MethodSymbol> applicableMethods, 633var overloadResolutionResult = OverloadResolutionResult<MethodSymbol>.GetInstance(); 664private static bool HasApplicableConditionalMethod(ImmutableArray<MemberResolutionResult<MethodSymbol>> finalApplicableCandidates) 724ImmutableArray<MethodSymbol> originalMethods; 846private void ReportDynamicInvocationWarnings(SyntaxNode syntax, BoundMethodGroup methodGroup, BindingDiagnosticBag diagnostics, ImmutableArray<MemberResolutionResult<MethodSymbol>> finalApplicableCandidates) 886MemberResolutionResult<MethodSymbol> methodResolutionResult, 887MethodSymbol singleCandidate) 942MemberResolutionResult<MethodSymbol> methodResolutionResult) 944MethodSymbol singleCandidate = methodResolutionResult.LeastOverriddenMember; 951var resultWithSingleCandidate = OverloadResolutionResult<MethodSymbol>.GetInstance(); 998(typeArgumentsOpt.IsDefault || ((MethodSymbol)(object)result.Member).CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, syntax.Location, candidateDiagnostics)))) 1102OverloadResolutionResult<MethodSymbol> result, 1186var method = methodResult.Member; 1323var method = property.GetMethod ?? property.SetMethod; 1334internal ThreeState ReceiverIsSubjectToCloning(BoundExpression? receiver, MethodSymbol method) 1393if (GetWellKnownTypeMember(Compilation, WellKnownMember.System_Runtime_InteropServices_UnknownWrapper__ctor, diagnostics, syntax: syntax) is MethodSymbol methodSymbol) 1402if (GetWellKnownTypeMember(Compilation, WellKnownMember.System_Runtime_InteropServices_DispatchWrapper__ctor, diagnostics, syntax: syntax) is MethodSymbol methodSymbol) 1780internal bool CheckImplicitThisCopyInReadOnlyMember(BoundExpression receiver, MethodSymbol method, BindingDiagnosticBag diagnostics) 1786ContainingMemberOrLambda is MethodSymbol containingMethod && 1916ImmutableArray<MethodSymbol> methods, 1923MethodSymbol method; 1927var constructedMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 1928foreach (var m in methods) 1956private static bool IsUnboundGeneric(MethodSymbol method) 1966private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, ImmutableArray<MethodSymbol> methods) 1969foreach (var m in methods) 2174MethodSymbol method = new ErrorMethodSymbol(methodContainer, returnType, string.Empty); 2179var originalMethods = (expr.Kind == BoundKind.MethodGroup) ? ((BoundMethodGroup)expr).Methods : ImmutableArray<MethodSymbol>.Empty; 2381BuildArgumentsForErrorRecovery(analyzedArguments, StaticCast<MethodSymbol>.From(methods)),
Binder\Binder_Lookup.cs (6)
462var methods = ArrayBuilder<MethodSymbol>.GetInstance(); 754ArrayBuilder<MethodSymbol> methods, 1544MethodSymbol method1; 1545MethodSymbol method2; 1795MethodSymbol method = (MethodSymbol)symbol;
Binder\Binder_Operators.cs (27)
122ImmutableArray<MethodSymbol> originalUserDefinedOperators; 284MethodSymbol method = isAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod; 388MethodSymbol userDefinedOperator = null; 578ImmutableArray<MethodSymbol> originalUserDefinedOperators; 699out LookupResultKind resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators, 964ImmutableArray<MethodSymbol> originalUserDefinedOperators; 990MethodSymbol trueOperator = null, falseOperator = null; 1051private bool IsValidDynamicCondition(BoundExpression left, bool isNegative, BindingDiagnosticBag diagnostics, out MethodSymbol userDefinedOperator) 1103out MethodSymbol trueOperator, 1104out MethodSymbol falseOperator) 1158MethodSymbol definition; 1266private bool HasApplicableBooleanOperator(NamedTypeSymbol containingType, string name, TypeSymbol argumentType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out MethodSymbol @operator) 1268var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 1319out ImmutableArray<MethodSymbol> originalUserDefinedOperators) 1324originalUserDefinedOperators = default(ImmutableArray<MethodSymbol>); 1337var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 1340MethodSymbol method = analysisResult.Signature.Method; 1363originalUserDefinedOperators = ImmutableArray<MethodSymbol>.Empty; 1377private void ReportObsoleteAndFeatureAvailabilityDiagnostics(MethodSymbol operatorMethod, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 1419out ImmutableArray<MethodSymbol> originalUserDefinedOperators) 1430var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 1433MethodSymbol method = analysisResult.Signature.Method; 1472originalUserDefinedOperators = ImmutableArray<MethodSymbol>.Empty; 2308originalUserDefinedOperatorsOpt: default(ImmutableArray<MethodSymbol>), 2314ImmutableArray<MethodSymbol> originalUserDefinedOperators; 2385private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics) 2773ImmutableArray<MethodSymbol> originalUserDefinedOperators;
Binder\Binder_Patterns.cs (16)
976MethodSymbol? deconstructMethod = null; 1005ShouldUseITupleForRecursivePattern(node, declType, diagnostics, out var iTupleType, out var iTupleGetLength, out var iTupleGetItem)) 1048private MethodSymbol? BindDeconstructSubpatterns( 1057var deconstructMethod = deconstruct.ExpressionSymbol as MethodSymbol; 1200[NotNullWhen(true)] out MethodSymbol? iTupleGetLength, 1201[NotNullWhen(true)] out MethodSymbol? iTupleGetItem) 1238[NotNullWhen(true)] out MethodSymbol? iTupleGetLength, 1239[NotNullWhen(true)] out MethodSymbol? iTupleGetItem) 1269iTupleGetLength = (MethodSymbol?)Compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_ITuple__get_Length); 1270iTupleGetItem = (MethodSymbol?)Compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_ITuple__get_Item); 1376MethodSymbol? deconstructMethod = null; 1401ShouldUseITuple(node, strippedInputType, diagnostics, out var iTupleType, out var iTupleGetLength, out var iTupleGetItem)) 1414deconstructMethod = deconstruct.ExpressionSymbol as MethodSymbol;
Binder\Binder_Statements.cs (38)
219var method = (MethodSymbol)this.ContainingMemberOrLambda; 482new SourceLabelSymbol((MethodSymbol)ContainingMemberOrLambda, node.Identifier); 637private bool ImplicitReturnIsOkay(MethodSymbol method) 748/// Checks for a Dispose method on <paramref name="expr"/> and returns its <see cref="MethodSymbol"/> if found. 753/// <returns>The <see cref="MethodSymbol"/> of the Dispose method if one is found, otherwise null.</returns> 754internal MethodSymbol TryFindDisposePatternMethod(BoundExpression expr, SyntaxNode syntaxNode, bool hasAwait, BindingDiagnosticBag diagnostics, out bool isExpanded) 764out var disposeMethod, 1243MethodSymbol fixedPatternMethod = null; 1320private MethodSymbol GetFixedPatternMethodOpt(BoundExpression initializer, BindingDiagnosticBag additionalDiagnostics) 1329var result = PerformPatternMethodLookup(initializer, methodName, initializer.Syntax, additionalDiagnostics, out var patternMethodSymbol, out bool isExpanded); 1357MethodSymbol patternMethodOpt, 1797return (member as MethodSymbol)?.MethodKind == (isStatic ? 2270ImmutableArray<MethodSymbol> originalUserDefinedConversions = conversion.OriginalUserDefinedConversions; 2706var best = this.UnaryOperatorOverloadResolution(UnaryOperatorKind.True, expr, node, diagnostics, out LookupResultKind resultKind, out ImmutableArray<MethodSymbol> originalUserDefinedOperators); 2932protected static bool IsInAsyncMethod(MethodSymbol method) 2939return IsInAsyncMethod(this.ContainingMemberOrLambda as MethodSymbol); 2945return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningTask(this.Compilation); 2951return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningGenericTask(this.Compilation); 2959var method = (MethodSymbol)symbol; 2968var symbol = this.ContainingMemberOrLambda as MethodSymbol; 3523var inferringLambda = this.ContainingMemberOrLambda is MethodSymbol method && (object)method.ReturnType == LambdaSymbol.ReturnTypeIsBeingInferred; 3706BoundExpression initializerInvocation = GetBinder(initializer).BindConstructorInitializer(initializer.ArgumentList, (MethodSymbol)this.ContainingMember(), diagnostics); 3727if (isInstanceConstructor(out MethodSymbol constructorSymbol) && 3758bool isInstanceConstructor(out MethodSymbol constructorSymbol) 3760if (this.ContainingMember() is MethodSymbol { IsStatic: false } method) 3772BoundExpression initializerInvocation = GetBinder(initializer).BindConstructorInitializer(initializer.ArgumentList, (MethodSymbol)this.ContainingMember(), diagnostics); 3784initializerInvocation = BindImplicitConstructorInitializer((MethodSymbol)this.ContainingMember(), diagnostics, Compilation); 3792var constructorInitializer = new BoundExpressionStatement(ctorSyntax, initializerInvocation) { WasCompilerGenerated = ((MethodSymbol)ContainingMember()).IsImplicitlyDeclared }; 3805MethodSymbol constructor, BindingDiagnosticBag diagnostics, CSharpCompilation compilation) 3912internal static BoundCall? GenerateBaseParameterlessConstructorInitializer(MethodSymbol constructor, BindingDiagnosticBag diagnostics) 3915MethodSymbol? baseConstructor = null; 3919foreach (MethodSymbol ctor in baseType.InstanceConstructors) 3981MethodSymbol? baseConstructor = SynthesizedRecordCopyCtor.FindCopyConstructor(baseType, containingType, ref useSiteInfo); 4095SyntaxNode syntaxNode, BindingDiagnosticBag diagnostics, out MethodSymbol result, out bool isExpanded) 4157var patternMethodSymbol = call.Method;
Binder\Binder_Symbols.cs (4)
1546var method = (MethodSymbol)symbol; 1565private static readonly Func<Symbol, MethodSymbol> s_toMethodSymbolFunc = s => (MethodSymbol)s;
Binder\Binder_TupleOperators.cs (1)
159ImmutableArray<MethodSymbol> originalUserDefinedOperators;
Binder\Binder_WithExpression.cs (1)
29MethodSymbol? cloneMethod = null;
Binder\BinderFactory.BinderFactoryVisitor.cs (7)
282MethodSymbol accessor = null; 347MethodSymbol method = GetMethodSymbol(parent, resultBinder); 418var accessor = propertySymbol.GetMethod; 614MethodSymbol method => (Symbol)method.PartialImplementationPart, 1243MethodSymbol method = GetMethodSymbol(baseMethodDeclSyntax, outerBinder); 1290MethodSymbol invokeMethod = delegateType.DelegateInvokeMethod; 1337MethodSymbol method = GetMethodSymbol(methodDeclSyntax, outerBinder);
Binder\DecisionDagBuilder.cs (1)
532MethodSymbol method = recursive.DeconstructMethod;
Binder\EmbeddedStatementBinder.cs (2)
56var containingMethod = (MethodSymbol)this.ContainingMemberOrLambda;
Binder\ExecutableCodeBinder.cs (1)
103public static void ValidateIteratorMethod(CSharpCompilation compilation, MethodSymbol iterator, BindingDiagnosticBag diagnostics)
Binder\ForEachEnumeratorInfo.cs (3)
29public readonly MethodSymbol CurrentPropertyGetter; 57MethodSymbol currentPropertyGetter, 105public MethodSymbol CurrentPropertyGetter;
Binder\ForEachLoopBinder.cs (35)
89(MethodSymbol)this.ContainingMemberOrLambda, 234MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo?.Method; 482ImmutableArray<MethodSymbol> originalUserDefinedConversions = elementConversionClassification.OriginalUserDefinedConversions; 708MethodSymbol nullableValueGetter = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value, diagnostics, exprSyntax); 1036MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.Method; 1079MethodSymbol getEnumeratorMethod; 1084getEnumeratorMethod = (MethodSymbol)GetWellKnownTypeMember(Compilation, WellKnownMember.System_Collections_Generic_IAsyncEnumerable_T__GetAsyncEnumerator, 1100getEnumeratorMethod = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IEnumerable_T__GetEnumerator, diagnostics, errorLocationSyntax); 1103MethodSymbol moveNextMethod = null; 1106MethodSymbol specificGetEnumeratorMethod = getEnumeratorMethod.AsMember(collectionType); 1117MethodSymbol currentPropertyGetter; 1122MethodSymbol moveNextAsync = (MethodSymbol)GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_IAsyncEnumerator_T__MoveNextAsync, 1130currentPropertyGetter = (MethodSymbol)GetWellKnownTypeMember(Compilation, WellKnownMember.System_Collections_Generic_IAsyncEnumerator_T__get_Current, diagnostics, errorLocationSyntax.Location, isOptional: false); 1134currentPropertyGetter = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IEnumerator_T__get_Current, diagnostics, errorLocationSyntax); 1146moveNextMethod = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__MoveNext, diagnostics, errorLocationSyntax); 1161builder.CurrentPropertyGetter = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__get_Current, diagnostics, errorLocationSyntax); 1198MethodSymbol patternDisposeMethod = TryFindDisposePatternMethod(receiver, syntax, isAsync, patternDiagnostics, out bool expanded); 1301builder.CurrentPropertyGetter = (MethodSymbol)GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__get_Current, diagnostics, syntax); 1378ArrayBuilder<MethodSymbol> candidateMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 1393MethodSymbol method = (MethodSymbol)member; 1404candidateMethods.Add((MethodSymbol)member); 1419private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1423var overloadResolutionResult = OverloadResolutionResult<MethodSymbol>.GetInstance(); 1438MethodSymbol result = null; 1517var result = overloadResolutionResult.ValidResult.Member; 1596MethodSymbol getEnumeratorMethod = builder.GetEnumeratorInfo.Method; 1655MethodSymbol currentPropertyGetterCandidate = ((PropertySymbol)lookupSymbol).GetOwnOrInheritedGetMethod(); 1698private bool IsInvalidMoveNextMethod(MethodSymbol moveNextMethodCandidate, bool isAsync) 1898var resolvedMember = (MethodSymbol)GetSpecialTypeMember(member, diagnostics, syntax); 1906private MethodArgumentInfo BindDefaultArguments(MethodSymbol method, BoundExpression extensionReceiverOpt, bool expanded, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
Binder\InContainerBinder.cs (1)
76ArrayBuilder<MethodSymbol> methods,
Binder\InMethodBinder.cs (5)
25private readonly MethodSymbol _methodSymbol; 30/// This map is used by <see cref="MethodCompiler.BindMethodBody(MethodSymbol, TypeCompilationState, BindingDiagnosticBag, bool, BoundNode?, bool, out ImportChain?, out bool, out bool, out MethodBodySemanticModel.InitialState)"/> 40public InMethodBinder(MethodSymbol owner, Binder enclosing) 272if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction) 300if (((MethodSymbol)newSymbol).MethodKind == MethodKind.LocalFunction)
Binder\InSubmissionClassBinder.cs (1)
35ArrayBuilder<MethodSymbol> methods,
Binder\LocalBinderFactory.cs (4)
297=> target.Kind == SymbolKind.Method ? new WithMethodTypeParametersBinder((MethodSymbol)target, enclosing) : null; 312MethodSymbol methodSymbol => methodSymbol.Parameters, 329case MethodSymbol method: 343case MethodSymbol method:
Binder\LocalScopeBinder.cs (3)
355var containingMethod = (MethodSymbol)this.ContainingMemberOrLambda; 362internal static void BuildLabels(MethodSymbol containingMethod, StatementSyntax statement, ref ArrayBuilder<LabelSymbol> labels)
Binder\LockBinder.cs (5)
79var enterScopeMethod = TryFindPublicVoidParameterlessMethod(lockType, WellKnownMemberNames.EnterScopeMethodName); 94var disposeMethod = TryFindPublicVoidParameterlessMethod(scopeType, WellKnownMemberNames.DisposeMethodName); 110private static MethodSymbol? TryFindPublicVoidParameterlessMethod(TypeSymbol type, string name) 113MethodSymbol? result = null; 116if (member is MethodSymbol
Binder\MethodArgumentInfo.cs (3)
17public readonly MethodSymbol Method; 23MethodSymbol method, 34public static MethodArgumentInfo CreateParameterlessMethod(MethodSymbol method)
Binder\MethodGroupResolution.cs (2)
22public readonly OverloadResolutionResult<MethodSymbol> OverloadResolutionResult; 40OverloadResolutionResult<MethodSymbol> overloadResolutionResult,
Binder\ParamsCollectionTypeInProgressBinder.cs (3)
17private readonly MethodSymbol? _constructorInProgress; 19internal ParamsCollectionTypeInProgressBinder(NamedTypeSymbol inProgress, Binder next, MethodSymbol? constructorInProgress = null) 30internal override MethodSymbol? ParamsCollectionConstructorInProgress => _constructorInProgress;
Binder\PatternExplainer.cs (1)
541var method = e.DeconstructMethod;
Binder\RefSafetyAnalysis.cs (7)
18internal static void Analyze(CSharpCompilation compilation, MethodSymbol symbol, BoundNode node, BindingDiagnosticBag diagnostics) 58private readonly MethodSymbol _symbol; 73MethodSymbol symbol, 605static ParameterSymbol? tryGetThisParameter(MethodSymbol method) 683var method = node.Method; 781var constructor = node.Constructor; 964var deconstructMethod = invocation.Method;
Binder\Semantics\AccessCheck.cs (1)
196case SymbolKind.Method when ((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction:
Binder\Semantics\Conversions\Conversion.cs (12)
42MethodSymbol? conversionMethod) 54internal readonly MethodSymbol? _conversionMethod; 111MethodSymbol? constructor, bool constructorUsedInExpandedForm, 125internal readonly MethodSymbol? Constructor; 131MethodSymbol? constructor, bool constructorUsedInExpandedForm, 163internal Conversion(ConversionKind kind, MethodSymbol conversionMethod, bool isExtensionMethod) 188internal Conversion SetConversionMethod(MethodSymbol conversionMethod) 479internal MethodSymbol? Method 547internal CollectionExpressionTypeKind GetCollectionExpressionTypeKind(out TypeSymbol? elementType, out MethodSymbol? constructor, out bool isExpanded) 1104internal ImmutableArray<MethodSymbol> OriginalUserDefinedConversions 1116var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 1124return ImmutableArray<MethodSymbol>.Empty;
Binder\Semantics\Conversions\Conversions.cs (9)
186MethodSymbol? constructor = null; 249private static MethodGroupResolution ResolveDelegateOrFunctionPointerMethodGroup(Binder binder, BoundMethodGroup source, MethodSymbol delegateInvokeMethodOpt, bool isFunctionPointer, in CallingConventionInfo callingConventionInfo, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 273private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type) 286MethodSymbol methodSymbol = delegateType.DelegateInvokeMethod; 324var method = result.BestResult.Member; 379var result = OverloadResolutionResult<MethodSymbol>.GetInstance(); 380var delegateInvokeMethod = delegateType.DelegateInvokeMethod; 427private static Conversion ToConversion(OverloadResolutionResult<MethodSymbol> result, MethodGroup methodGroup, int parameterCount) 450MethodSymbol method = result.BestResult.Member;
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1478var invokeMethod = delegateType.DelegateInvokeMethod;
Binder\Semantics\Conversions\UserDefinedConversionAnalysis.cs (4)
24public readonly MethodSymbol Operator; 32MethodSymbol op, 50MethodSymbol op, 69MethodSymbol op,
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (6)
220var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 225var candidates = ArrayBuilder<MethodSymbol>.GetInstance(operators.Count); 230var operators2 = ArrayBuilder<MethodSymbol>.GetInstance(); 240foreach (MethodSymbol op2 in operators2) 245foreach (MethodSymbol op in operators) 264foreach (MethodSymbol op in candidates)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
289var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 292foreach (MethodSymbol op in operators)
Binder\Semantics\Operators\BinaryOperatorAnalysisResult.cs (4)
14internal readonly struct BinaryOperatorAnalysisResult : IMemberResolutionResultWithPriority<MethodSymbol> 39bool IMemberResolutionResultWithPriority<MethodSymbol>.IsApplicable => IsValid; 40MethodSymbol IMemberResolutionResultWithPriority<MethodSymbol>.MemberWithPriority => Signature.Method;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
961var typeOperators = ArrayBuilder<MethodSymbol>.GetInstance(); 964foreach (MethodSymbol op in typeOperators) 986MethodSymbol op = operators[i].Method; 1078RemoveLowerPriorityMembers<BinaryOperatorAnalysisResult, MethodSymbol>(candidates);
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
21public readonly MethodSymbol Method; 43public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt)
Binder\Semantics\Operators\UnaryOperatorAnalysisResult.cs (4)
11internal readonly struct UnaryOperatorAnalysisResult : IMemberResolutionResultWithPriority<MethodSymbol> 34bool IMemberResolutionResultWithPriority<MethodSymbol>.IsApplicable => IsValid; 35MethodSymbol IMemberResolutionResultWithPriority<MethodSymbol>.MemberWithPriority => Signature.Method;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (4)
78RemoveLowerPriorityMembers<UnaryOperatorAnalysisResult, MethodSymbol>(candidates); 517var typeOperators = ArrayBuilder<MethodSymbol>.GetInstance(); 520foreach (MethodSymbol op in typeOperators) 556MethodSymbol op = operators[i].Method;
Binder\Semantics\Operators\UnaryOperatorSignature.cs (2)
17public readonly MethodSymbol Method; 32public UnaryOperatorSignature(UnaryOperatorKind kind, TypeSymbol operandType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt)
Binder\Semantics\OverloadResolution\MethodGroup.cs (5)
19internal ArrayBuilder<MethodSymbol> Methods { get; } 27this.Methods = new ArrayBuilder<MethodSymbol>(); 33MethodSymbol method, 52this.Methods.Add((MethodSymbol)member); 62ImmutableArray<MethodSymbol> methods,
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (7)
99internal abstract TypeWithAnnotations GetMethodGroupResultType(BoundMethodGroup group, MethodSymbol method); 108internal override TypeWithAnnotations GetMethodGroupResultType(BoundMethodGroup group, MethodSymbol method) 1057MethodSymbol method = delegateOrFunctionPointerType switch 1594var delegateInvokeMethod = target.Type.GetDelegateType()?.DelegateInvokeMethod(); 3176MethodSymbol method, 3191MethodSymbol method, 3209var constructedFromMethod = method.ConstructedFrom;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (45)
101public void ObjectCreationOverloadResolution(ImmutableArray<MethodSymbol> constructors, AnalyzedArguments arguments, OverloadResolutionResult<MethodSymbol> result, bool dynamicResolution, bool isEarlyAttributeBinding, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 137ArrayBuilder<MethodSymbol> methods, 141OverloadResolutionResult<MethodSymbol> result, 225internal bool FilterMethodsForUniqueSignature(ArrayBuilder<MethodSymbol> methods, out bool useParams) 234var result = OverloadResolutionResult<MethodSymbol>.GetInstance(); 248unreducedMethods = ArrayBuilder<MethodSymbol>.GetInstance(methods.Count); 294var applicableMethods = ArrayBuilder<MethodSymbol>.GetInstance(methods.Count); 543case MethodSymbol method: 644if (typeof(TMember) != typeof(MethodSymbol)) 652var member = (MethodSymbol)(Symbol)result.Member; 667if (typeof(TMember) != typeof(MethodSymbol)) 688var member = (MethodSymbol)(Symbol)result.Member; 794private bool FailsConstraintChecks(MethodSymbol method, out ArrayBuilder<TypeParameterDiagnosticInfo> constraintFailureDiagnosticsOpt, CompoundUseSiteInfo<AssemblySymbol> template) 847Debug.Assert(typeof(TMember) == typeof(MethodSymbol)); 857var method = (MethodSymbol)(Symbol)result.Member; 919private void AddConstructorToCandidateSet(MethodSymbol constructor, ArrayBuilder<MemberResolutionResult<MethodSymbol>> results, 928results.Add(new MemberResolutionResult<MethodSymbol>(constructor, constructor, MemberAnalysisResult.UnsupportedMetadata(), hasTypeArgumentInferredFromFunctionType: false)); 950results.Add(new MemberResolutionResult<MethodSymbol>(constructor, constructor, result, hasTypeArgumentInferredFromFunctionType: false)); 955MethodSymbol constructor, 998MethodSymbol constructor, 1451return ((MethodSymbol)member).HidesBaseMethodsByName; 1723ArrayBuilder<MemberResolutionResult<MethodSymbol>> results, 1724ImmutableArray<MethodSymbol> constructors, 1737foreach (MethodSymbol constructor in constructors) 1753RemoveLowerPriorityMembers<MemberResolutionResult<MethodSymbol>, MethodSymbol>(results); 3249MethodSymbol invoke; 3515MethodSymbol invoke1 = d1.DelegateInvokeMethod; 3516MethodSymbol invoke2 = d2.DelegateInvokeMethod; 3627MethodSymbol invoke1 = d1.DelegateInvokeMethod; 3628MethodSymbol invoke2 = d2.DelegateInvokeMethod; 3775MethodSymbol method, 4184MethodSymbol method; 4188member.Kind == SymbolKind.Method && (method = (MethodSymbol)(Symbol)member).Arity > 0) 4190MethodSymbol leastOverriddenMethod = (MethodSymbol)(Symbol)leastOverriddenMember; 4305MethodSymbol method, 4491(ignoreOpenTypes && parameters.ParameterTypes[argumentPosition].Type.ContainsTypeParameter(parameterContainer: (MethodSymbol)candidate)))); 4589if (ignoreOpenTypes && parameterType.ContainsTypeParameter(parameterContainer: (MethodSymbol)candidate)) 4642return (TMember)(Symbol)(member as MethodSymbol).ConstructedFrom;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (8)
512Debug.Assert(firstSupported.Member is MethodSymbol { MethodKind: MethodKind.Constructor }); 521Debug.Assert(firstSupported.Member is MethodSymbol { Name: "Add" }); 595private static void ReportWrongCallingConvention(Location location, BindingDiagnosticBag diagnostics, ImmutableArray<Symbol> symbols, MemberResolutionResult<TMember> firstSupported, MethodSymbol target) 710var method = (MethodSymbol)(Symbol)mismatch.Member; 904Debug.Assert(((MethodSymbol)(object)badMember).IsVararg); 1045MethodSymbol method = (MethodSymbol)(Symbol)result.Member;
Binder\SwitchBinder.cs (1)
236labels.Add(new SourceLabelSymbol((MethodSymbol)this.ContainingMemberOrLambda, labelSyntax, boundLabelConstantOpt));
Binder\UsingStatementBinder.cs (1)
200MethodSymbol disposeMethod = originalBinder.TryFindDisposePatternMethod(receiver, syntax, hasAwait, patternDiagnostics, out bool expanded);
Binder\WithMethodTypeParametersBinder.cs (2)
18private readonly MethodSymbol _methodSymbol; 21internal WithMethodTypeParametersBinder(MethodSymbol methodSymbol, Binder next)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
18private MethodSymbol? _lazyPrimaryCtorWithParameters = ErrorMethodSymbol.UnknownMethod;
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
75ArrayBuilder<MethodSymbol> methods, 173if (!symbol.IsStatic || ((MethodSymbol)symbol).IsExtensionMethod)
BoundTree\BoundBinaryOperator.UncommonData.cs (7)
33public static UncommonData? CreateIfNeeded(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt) 44public readonly MethodSymbol? Method; 52public readonly ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt; 54private UncommonData(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, bool isUnconvertedInterpolatedStringAddition, InterpolatedStringHandlerData? interpolatedStringHandlerData) 65public UncommonData WithUpdatedMethod(MethodSymbol? method)
BoundTree\BoundDynamicObjectCreationExpression.cs (1)
12public override MethodSymbol? Constructor => null;
BoundTree\BoundExpression.cs (5)
408internal MethodSymbol? Method => Data?.Method; 416internal ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt => Data?.OriginalUserDefinedOperatorsOpt ?? default(ImmutableArray<MethodSymbol>); 463public MethodSymbol? SymbolOpt 537MethodSymbol constructor,
BoundTree\BoundMethodGroup.cs (1)
18ImmutableArray<MethodSymbol> methods,
BoundTree\BoundNewT.cs (1)
12public override MethodSymbol? Constructor => null;
BoundTree\BoundNodeExtensions.cs (1)
60MethodSymbol method = call!.Method;
BoundTree\BoundNoPiaObjectCreationExpression.cs (1)
12public override MethodSymbol? Constructor => null;
BoundTree\BoundObjectCreationExpression.cs (6)
12public BoundObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, 15: this(syntax, constructor, ImmutableArray<MethodSymbol>.Empty, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped: false, type, hasErrors) 18public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, 21return this.Update(constructor, ImmutableArray<MethodSymbol>.Empty, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, this.WasTargetTyped, type); 24public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments,
BoundTree\BoundObjectCreationExpressionBase.cs (1)
12public abstract MethodSymbol? Constructor { get; }
BoundTree\Constructors.cs (27)
90MethodSymbol method, 108MethodSymbol method, 124MethodSymbol method, 130ImmutableArray<MethodSymbol> originalMethods, 163public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments) 168public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method) 173public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, BoundExpression arg0) 178public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, BoundExpression arg0, BoundExpression arg1) 183public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt = default) 230static ImmutableArray<RefKind> getArgumentRefKinds(MethodSymbol method) 253public BoundObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, params BoundExpression[] arguments) 257public BoundObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments) 433MethodSymbol? methodOpt, 436ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, 454MethodSymbol? methodOpt, 467MethodSymbol? methodOpt, 491MethodSymbol logicalOperator, 492MethodSymbol trueOperator, 493MethodSymbol falseOperator, 496ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, 517MethodSymbol logicalOperator, 518MethodSymbol trueOperator, 519MethodSymbol falseOperator, 747MethodSymbol? methodOpt, 759MethodSymbol? methodOpt, 772MethodSymbol? methodOpt, 785public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, TypeSymbol type)
BoundTree\TupleBinaryOperatorInfo.cs (2)
48internal readonly MethodSymbol? MethodSymbolOpt; // User-defined comparison operator, if applicable 60MethodSymbol? methodSymbolOpt,
BoundTree\UnboundLambda.cs (9)
23MethodSymbol Symbol { get; } 31MethodSymbol IBoundLambdaOrFunction.Symbol { get { return Symbol; } } 78MethodSymbol IBoundLambdaOrFunction.Symbol { get { return Symbol; } } 633private static MethodSymbol? DelegateInvokeMethod(NamedTypeSymbol? delegateType) 638private static TypeWithAnnotations DelegateReturnTypeWithAnnotations(MethodSymbol? invokeMethod, out RefKind refKind) 778var invokeMethod = DelegateInvokeMethod(delegateType); 899var invokeMethod = DelegateInvokeMethod(delegateType); 1100MethodSymbol? invoke = DelegateInvokeMethod(delegateType); 1207var invokeMethod = DelegateInvokeMethod(delegateType);
CodeGen\CodeGenerator.cs (3)
22private readonly MethodSymbol _method; 84MethodSymbol method, 349private void EmitSymbolToken(MethodSymbol method, SyntaxNode syntaxNode, BoundArgListOperator optArgList, bool encodeAsRawDefinitionToken = false)
CodeGen\CodeGenerator_HasHome.cs (4)
75if (!IsAnyReadOnly(addressKind) && containingSymbol is MethodSymbol { ContainingSymbol: NamedTypeSymbol, IsEffectivelyReadOnly: true }) 252return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol { IsStatic: true }; 256return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol { IsStatic: false } or MethodSymbol { IsInitOnly: true }) &&
CodeGen\EmitArrayInitializer.cs (8)
464var rosPointerCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Pointer, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true); 610MethodSymbol? createSpan = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__CreateSpanRuntimeFieldHandle, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true); 634if (!tryGetReadOnlySpanArrayCtor(wrappedExpression.Syntax, out var rosArrayCtor)) 698if (!tryGetReadOnlySpanArrayCtor(arrayCreation.Syntax, out var rosArrayCtor)) 777bool tryGetReadOnlySpanArrayCtor(SyntaxNode syntax, [NotNullWhen(true)] out MethodSymbol? rosArrayCtor) 779rosArrayCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Array, _diagnostics, syntax: syntax, isOptional: true);
CodeGen\EmitConversion.cs (5)
311private void EmitDelegateCreation(BoundExpression node, BoundExpression receiver, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, bool used) 373var ctor = DelegateConstructor(node.Syntax, delegateType); 377private MethodSymbol DelegateConstructor(SyntaxNode syntax, TypeSymbol delegateType) 381var m = possibleCtor as MethodSymbol;
CodeGen\EmitExpression.cs (25)
519var hasValueOpt = expression.HasValueMethodOpt; 693var getTypeMethod = expression.GetTypeFromHandle; 801var meth = expression.MethodOpt ?? receiver.Type.DelegateInvokeMethod(); 1637var method = call.Method; 1657var method = call.Method; 1825var method = call.Method; 1942var method = call.Method; 1950MethodSymbol actualMethodTargetedByTheCall = method; 2182private bool IsReadOnlyCall(MethodSymbol method, NamedTypeSymbol methodContainingType) 2193var originalMethod = method.OriginalDefinition; 2235private static int GetCallStackBehavior(MethodSymbol method, ImmutableArray<BoundExpression> arguments) 2297internal static bool MayUseCallForStructMethod(MethodSymbol method) 2306var overriddenMethod = method.OverriddenMethod; 2423MethodSymbol constructor = expression.Constructor; 2478private bool ConstructorNotSideEffecting(MethodSymbol constructor) 2480var originalDef = constructor.OriginalDefinition; 2630var ctor = objCreation.Constructor; 2706var constructor = objCreation.Constructor; 3507var getTypeMethod = boundTypeOf.GetTypeFromHandle; 3540var symbol = node.Method.PartialDefinitionPart ?? node.Method; 3619var throwMethod = (MethodSymbol)_module.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Threading_CancellationToken__ThrowIfCancellationRequested); 3677MethodSymbol getMethod = node.GetMethodFromHandle; 3704MethodSymbol getField = node.GetFieldFromHandle; 4044private void EmitCallCleanup(SyntaxNode syntax, UseKind useKind, MethodSymbol method)
CodeGen\EmitStackAllocInitializer.cs (3)
70if (Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__CreateSpanRuntimeFieldHandle, _diagnostics, syntax: syntaxNode, isOptional: true) is MethodSymbol createSpanHelper && 71Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__get_Item, _diagnostics, syntax: syntaxNode, isOptional: true) is MethodSymbol spanGetItemDefinition) 76var spanGetItem = spanGetItemDefinition.AsMember(readOnlySpan);
CodeGen\EmitStatement.cs (18)
1533var sequenceEqualsTMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation, 1539var sequenceEqualsCharMethod = sequenceEqualsTMethod.Construct(Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics)); 1542var asSpanMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_MemoryExtensions__AsSpan_String, _diagnostics, syntax: syntaxNode); 1548var stringEqualityMethod = _module.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Equality) as MethodSymbol; 1628var spanTLengthMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation, 1633var spanCharLengthMethod = spanTLengthMethod.AsMember((NamedTypeSymbol)keyType); 1638var stringLengthMethod = _module.Compilation.GetSpecialTypeMember(SpecialMember.System_String__Length) as MethodSymbol; 1652var spanTIndexerMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation, 1658var spanCharLengthMethod = spanTIndexerMethod.AsMember((NamedTypeSymbol)keyType); 1664var stringCharsIndexer = _module.Compilation.GetSpecialTypeMember(SpecialMember.System_String__Chars) as MethodSymbol; 1694Debug.Assert(stringEqualityMethodRef == _module.Translate((MethodSymbol)_module.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Equality), (CSharpSyntaxNode)syntaxNode, assertDiagnostics));
CodeGen\Optimizer.cs (2)
1157MethodSymbol method = node.Method; 1318var constructor = node.Constructor;
CommandLine\CSharpCompiler.cs (1)
250var method = comp.GetEntryPoint(cancellationToken);
Compilation\CSharpCompilation.cs (27)
270internal bool IsNullableAnalysisEnabledIn(MethodSymbol method) 527var methodSymbol = (debugEntryPoint as Symbols.PublicModel.MethodSymbol)?.UnderlyingMethodSymbol; 1860internal new MethodSymbol? GetEntryPoint(CancellationToken cancellationToken) 1899var entryPointMethod = FindEntryPoint(simpleProgramEntryPointSymbol, cancellationToken, out diagnostics); 1919private MethodSymbol? FindEntryPoint(MethodSymbol? simpleProgramEntryPointSymbol, CancellationToken cancellationToken, out ReadOnlyBindingDiagnostic<AssemblySymbol> sealedDiagnostics) 1923var entryPointCandidates = ArrayBuilder<MethodSymbol>.GetInstance(); 1991var taskEntryPoints = ArrayBuilder<(bool IsValid, MethodSymbol Candidate, BindingDiagnosticBag SpecificDiagnostics)>.GetInstance(); 1998bool checkValid(MethodSymbol candidate, bool isCandidate, BindingDiagnosticBag specificDiagnostics) 2016var viableEntryPoints = ArrayBuilder<MethodSymbol>.GetInstance(); 2103MethodSymbol? entryPoint = null; 2157ArrayBuilder<MethodSymbol> entryPointCandidates, IEnumerable<Symbol> members) 2161if (member is MethodSymbol method && 2169internal bool ReturnsAwaitableToVoidOrInt(MethodSymbol method, BindingDiagnosticBag diagnostics) 2207internal (bool IsCandidate, bool IsTaskLike) HasEntryPointSignature(MethodSymbol method, BindingDiagnosticBag bag) 2261public readonly MethodSymbol? MethodSymbol; 2266public EntryPoint(MethodSymbol? methodSymbol, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics) 2420private ConcurrentSet<MethodSymbol>? _moduleInitializerMethods; 2422internal void AddModuleInitializerMethod(MethodSymbol method) 2450private ConcurrentDictionary<(ImmutableArray<byte> ContentHash, int Position), OneOrMany<(Location AttributeLocation, MethodSymbol Interceptor)>>? _interceptions; 2452internal void AddInterception(ImmutableArray<byte> contentHash, int position, Location attributeLocation, MethodSymbol interceptor) 2458() => new ConcurrentDictionary<(ImmutableArray<byte> ContentHash, int Position), OneOrMany<(Location AttributeLocation, MethodSymbol Interceptor)>>(comparer: InterceptorKeyComparer.Instance)); 2479internal (Location AttributeLocation, MethodSymbol Interceptor)? TryGetInterceptor(SimpleNameSyntax? node) 3078if (symbol.Kind == SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor) 3639foreach ((_, OneOrMany<(Location, MethodSymbol)> interceptionsOfAGivenLocation) in _interceptions) 3665foreach (MethodSymbol method in _moduleInitializerMethods.OrderBy<MethodSymbol>(LexicalOrderSymbolComparer.Instance))
Compilation\CSharpSemanticModel.cs (48)
1668foreach (MethodSymbol extensionMethod in lookupResult.Symbols) 1670var reduced = extensionMethod.ReduceExtensionMethod(containingType, Compilation); 1784case MethodSymbol { MethodKind: MethodKind.LambdaMethod }: 3499var methodSymbol = eventAssignment.IsAddition ? eventSymbol.AddMethod : eventSymbol.RemoveMethod; 3530var symbol = conversion.SymbolOpt; 3628memberGroup = dynamicInvocation.ApplicableMethods.Cast<MethodSymbol, Symbol>(); 3636memberGroup = collectionInit.ApplicableMethods.Cast<MethodSymbol, Symbol>(); 3656memberGroup = objectCreation.ApplicableMethods.Cast<MethodSymbol, Symbol>(); 3675memberGroup = boundObjectCreation.ConstructorsGroup.Cast<MethodSymbol, Symbol>(); 3736return new ThisParameterSymbol(containingMember as MethodSymbol, typeOfThis); 3750thisParam = new ThisParameterSymbol(containingMember as MethodSymbol, containingType); 3757thisParam = new ThisParameterSymbol(containingMember as MethodSymbol, containingType); 3785thisParam = new ThisParameterSymbol(containingMember as MethodSymbol, typeOfThis); 3939private static void GetSymbolsAndResultKind(BoundExpression node, Symbol symbolOpt, ImmutableArray<MethodSymbol> originalCandidates, out OneOrMany<Symbol> symbols, out LookupResultKind resultKind) 3970MethodSymbol constructor = null; 4016MethodSymbol constructorOpt, 4033ImmutableArray<MethodSymbol> candidateConstructors; 4054candidateConstructors = ImmutableArray<MethodSymbol>.Empty; 4069memberGroup = candidateConstructors.Cast<MethodSymbol, Symbol>(); 4195private static ImmutableArray<MethodSymbol> FilterOverriddenOrHiddenMethods(ImmutableArray<MethodSymbol> methods) 4204foreach (MethodSymbol method in methods) 4254methodGroup = GetReducedAndFilteredMethodGroupSymbols(binder, boundNode).Cast<MethodSymbol, Symbol>(); 4297MethodSymbol method = null; 4326symbols = OneOrMany.Create(dynamicInvocation.ApplicableMethods.Cast<MethodSymbol, Symbol>()); 4561internal static ImmutableArray<MethodSymbol> GetReducedAndFilteredMethodGroupSymbols(Binder binder, BoundMethodGroup node) 4563var methods = ArrayBuilder<MethodSymbol>.GetInstance(); 4564var filteredMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 4574ImmutableArray<MethodSymbol> nonHiddenMethods = FilterOverriddenOrHiddenMethods(node.Methods); 4577foreach (var method in nonHiddenMethods) 4628var extensionMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 4663ArrayBuilder<MethodSymbol> methods, 4664ArrayBuilder<MethodSymbol> filteredMethods, 4665MethodSymbol method, 4670MethodSymbol constructedMethod; 4702ArrayBuilder<MethodSymbol> methods, 4703ArrayBuilder<MethodSymbol> filteredMethods, 4729var method = (MethodSymbol)singleResult.Symbol; 4747private static OneOrMany<MethodSymbol> CreateReducedExtensionMethodsFromOriginalsIfNecessary(BoundCall call, CSharpCompilation compilation) 4769var methodBuilder = ArrayBuilder<MethodSymbol>.GetInstance(); 4770var filteredMethodBuilder = ArrayBuilder<MethodSymbol>.GetInstance(); 4771foreach (var method in FilterOverriddenOrHiddenMethods(methods)) 4786var method = call.Method; 4793MethodSymbol reduced = method.ReduceExtensionMethod(receiver.Type, Compilation); 4803var method = delegateCreation.MethodOpt; 4808MethodSymbol reduced = method.ReduceExtensionMethod(receiverOpt.Type, Compilation); 5200if (node.GetInterceptableNameSyntax() is { } nameSyntax && Compilation.TryGetInterceptor(nameSyntax) is (_, MethodSymbol interceptor))
Compilation\MemberSemanticModel.cs (6)
852var localFunction = GetDeclaredSymbol((LocalFunctionStatementSyntax)paramList.Parent, cancellationToken).GetSymbol<MethodSymbol>(); 971MethodSymbol disposeMethod = null; 981? (MethodSymbol)Compilation.GetWellKnownTypeMember(WellKnownMember.System_IAsyncDisposable__DisposeAsync) 982: (MethodSymbol)Compilation.GetSpecialTypeMember(SpecialMember.System_IDisposable__Dispose); 2342Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compilation\MemberSemanticModel.SpeculativeMemberSemanticModel.cs (2)
52return NullableWalker.AnalyzeAndRewrite(Compilation, MemberSymbol as MethodSymbol, boundRoot, binder, initialState: null, diagnostics, createSnapshots: false, out snapshotManager, ref remappedSymbols); 57NullableWalker.AnalyzeWithoutRewrite(Compilation, MemberSymbol as MethodSymbol, boundRoot, binder, diagnostics, createSnapshots);
Compilation\MethodBodySemanticModel.cs (15)
44MethodSymbol owner, 61internal static MethodBodySemanticModel Create(SyntaxTreeSemanticModel containingSemanticModel, MethodSymbol owner, InitialState initialState) 112MethodSymbol owner, 124MethodSymbol owner, 137internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ArrowExpressionClauseSyntax syntax, Binder rootBinder, int position) 145internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ConstructorInitializerSyntax syntax, Binder rootBinder, int position) 153internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, PrimaryConstructorBaseTypeSyntax syntax, Binder rootBinder, int position) 168var methodSymbol = (MethodSymbol)this.MemberSymbol; 212var methodSymbol = (MethodSymbol)this.MemberSymbol; 230var methodSymbol = (MethodSymbol)this.MemberSymbol; 240if (MemberSymbol is MethodSymbol methodSymbol && methodSymbol.MethodKind == MethodKind.Constructor && 305return Compilation.IsNullableAnalysisEnabledIn((MethodSymbol)MemberSymbol);
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
103MethodSymbol owner,
Compilation\SyntaxTreeSemanticModel.cs (8)
1508return ((MethodSymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol(); 1590return (this.GetDeclaredMember(container, declarationSyntax.Span, isKnownToBeANamespace: false) as MethodSymbol).GetPublicSymbol(); 1613return (this.GetDeclaredMember(container, declarationSyntax.Span, isKnownToBeANamespace: false) as MethodSymbol).GetPublicSymbol(); 1805MethodSymbol method => method.PartialImplementationPart, 2024MethodSymbol method; 2094var delegateInvoke = delegateType.DelegateInvokeMethod; 2166case MethodSymbol methodSymbol: 2386Debug.Assert(symbol is LocalSymbol or ParameterSymbol or MethodSymbol { MethodKind: MethodKind.LambdaMethod });
Compiler\AnonymousTypeMethodBodySynthesizer.cs (3)
197MethodSymbol equalityComparer_GetHashCode = manager.System_Collections_Generic_EqualityComparer_T__GetHashCode; 198MethodSymbol equalityComparer_get_Default = manager.System_Collections_Generic_EqualityComparer_T__get_Default; 282var formatMethod = manager.System_String__Format_IFormatProvider;
Compiler\ClsComplianceChecker.cs (17)
275foreach (MethodSymbol constructor in attributeType.InstanceConstructors) 303public override void VisitMethod(MethodSymbol symbol) 340private void CheckForAttributeOnAccessor(MethodSymbol symbol) 476MethodSymbol method = type.DelegateInvokeMethod; 483MethodSymbol method = (MethodSymbol)symbol; 591CheckForAttributeWithArrayArgumentInternal(((MethodSymbol)symbol).GetReturnTypeAttributes()); 683Symbol associated = ((MethodSymbol)container).AssociatedSymbol; 702private void CheckForMeaninglessOnReturn(MethodSymbol method) 733MethodSymbol method = (MethodSymbol)symbol; 1126MethodSymbol method = (MethodSymbol)symbol; 1332var mX = (MethodSymbol)x; 1336var mY = (MethodSymbol)y;
Compiler\DocumentationCommentCompiler.cs (2)
263MethodSymbol method => method.PartialImplementationPart, 620MethodSymbol delegateInvoke = ((NamedTypeSymbol)symbol).DelegateInvokeMethod;
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
563parameters = ((MethodSymbol)memberSymbol).Parameters; 599MethodSymbol methodSymbol = (MethodSymbol)currentSymbol;
Compiler\MethodBodySynthesizer.cs (18)
24MethodSymbol constructor, 86MethodSymbol submissionConstructor, 236MethodSymbol accessor = isAddMethod ? eventSymbol.AddMethod : eventSymbol.RemoveMethod; 245MethodSymbol getOrCreateMethod = (MethodSymbol)Binder.GetWellKnownTypeMember( 263MethodSymbol processHandlerMethod = (MethodSymbol)Binder.GetWellKnownTypeMember( 349MethodSymbol accessor = isAddMethod ? eventSymbol.AddMethod : eventSymbol.RemoveMethod; 355MethodSymbol updateMethod = (MethodSymbol)compilation.GetSpecialTypeMember(updateMethodId); 392MethodSymbol compareExchangeMethod = (MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Threading_Interlocked__CompareExchange_T); 528internal static BoundBlock ConstructDestructorBody(MethodSymbol method, BoundBlock block) 538MethodSymbol baseTypeFinalize = GetBaseTypeFinalizeMethod(method); 593private static MethodSymbol GetBaseTypeFinalizeMethod(MethodSymbol method) 602MethodSymbol baseTypeMethod = (MethodSymbol)member;
Compiler\MethodBodySynthesizer.Lowered.cs (11)
243F.CurrentFunction = (MethodSymbol)this.OriginalDefinition; 247MethodSymbol methodToInvoke = 281F.CurrentFunction = (MethodSymbol)this.OriginalDefinition; 324MethodSymbol methodBeingWrapped = this.BaseMethod; 354MethodSymbol system_Collections_Generic_EqualityComparer_T__GetHashCode, 355MethodSymbol system_Collections_Generic_EqualityComparer_T__get_Default, 378MethodSymbol system_Collections_Generic_EqualityComparer_T__GetHashCode, 379MethodSymbol system_Collections_Generic_EqualityComparer_T__get_Default, 413var equalityComparer_get_Default = F.WellKnownMethod( 415var equalityComparer_Equals = F.WellKnownMethod( 455internal static BoundBlock ConstructSingleInvocationMethodBody(SyntheticBoundNodeFactory F, MethodSymbol methodToInvoke, bool useBaseReference)
Compiler\MethodCompiler.cs (21)
136MethodSymbol entryPoint = null; 221private static MethodSymbol GetEntryPoint(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuilt, bool hasDeclarationErrors, bool emitMethodBodies, BindingDiagnosticBag diagnostics, CancellationToken cancellationToken) 229var entryPoint = entryPointAndDiagnostics.MethodSymbol; 512MethodSymbol method = (MethodSymbol)member; 584foreach (var method in AnonymousTypeManager.GetAnonymousTypeHiddenMethods(containingType)) 600MethodSymbol method = new SynthesizedStaticConstructor(sourceTypeSymbol); 655internal static MethodSymbol GetMethodToCompile(MethodSymbol method) 673var method = (MethodSymbol)definition.GetInternalSymbol(); 689foreach (var method in additionalType.GetMethodsToEmit()) 865public override object VisitMethod(MethodSymbol symbol, TypeCompilationState arg) 886MethodSymbol methodSymbol, 1363MethodSymbol method, 1487MethodSymbol method, 1526MethodSymbol kickoffMethod; 1717internal static BoundBlock? BindSynthesizedMethodBody(MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 1734MethodSymbol method, 2333private static BoundStatement BindImplicitConstructorInitializerIfAny(MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 2357private static void ReportCtorInitializerCycles(MethodSymbol method, BoundExpression initializerInvocation, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics)
Compiler\ModuleCompilationState.cs (1)
11internal sealed class ModuleCompilationState : ModuleCompilationState<NamedTypeSymbol, MethodSymbol>
Compiler\SynthesizedMetadataCompiler.cs (1)
117public override void VisitMethod(MethodSymbol symbol)
Compiler\TypeCompilationState.cs (19)
29public readonly MethodSymbol Method; 33internal MethodWithBody(MethodSymbol method, BoundStatement body, ImportChain? importChain) 52private Dictionary<MethodSymbol, MethodSymbol>? _wrappers; 80private SmallDictionary<MethodSymbol, MethodSymbol>? _constructorInitializers; 133public void AddSynthesizedMethod(MethodSymbol method, BoundStatement body) 150public void AddMethodWrapper(MethodSymbol method, MethodSymbol wrapper, BoundStatement body) 156_wrappers = new Dictionary<MethodSymbol, MethodSymbol>(); 175public MethodSymbol? GetMethodWrapper(MethodSymbol method) 177MethodSymbol? wrapper = null; 202internal void ReportCtorInitializerCycles(MethodSymbol method1, MethodSymbol method2, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 217_constructorInitializers = new SmallDictionary<MethodSymbol, MethodSymbol>(); 222MethodSymbol? next = method2;
DocumentationComments\DocumentationCommentIDVisitor.cs (1)
37public override object VisitMethod(MethodSymbol symbol, StringBuilder builder)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
99public override object VisitMethod(MethodSymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
172public override Symbol? VisitMethod(MethodSymbol symbol) 444SymbolKind.Method => ((MethodSymbol)otherContainer).TypeParameters, 591private bool AreMethodsEqual(MethodSymbol method, MethodSymbol other) 607private static MethodSymbol SubstituteTypeParameters(MethodSymbol method)
Emitter\EditAndContinue\EmitHelpers.cs (3)
41if (!GetPredefinedHotReloadExceptionTypeConstructor(compilation, diagnostics, out var predefinedHotReloadExceptionConstructor)) 156private static bool GetPredefinedHotReloadExceptionTypeConstructor(CSharpCompilation compilation, DiagnosticBag diagnostics, out MethodSymbol? constructor) 158constructor = compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_HotReloadException__ctorStringInt32) as MethodSymbol;
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (5)
27private readonly MethodSymbol? _predefinedHotReloadExceptionConstructor; 53MethodSymbol? predefinedHotReloadExceptionConstructor) 244internal override VariableSlotAllocator? TryCreateVariableSlotAllocator(MethodSymbol method, MethodSymbol topLevelMethod, DiagnosticBag diagnostics) 249internal override MethodInstrumentation GetMethodBodyInstrumentations(MethodSymbol method)
Emitter\Model\GenericMethodInstanceReference.cs (1)
20public GenericMethodInstanceReference(MethodSymbol underlyingMethod)
Emitter\Model\MethodReference.cs (2)
17protected readonly MethodSymbol UnderlyingMethod; 19public MethodReference(MethodSymbol underlyingMethod)
Emitter\Model\MethodSymbolAdapter.cs (5)
272(MethodSymbol)AdaptedMethodSymbol.OriginalDefinition, 278MethodSymbol methodSymbol = AdaptedMethodSymbol.ConstructedFrom; 288return ((MethodSymbol)AdaptedMethodSymbol.OriginalDefinition).GetCciAdapter(); 702internal MethodSymbolAdapter(MethodSymbol underlyingMethodSymbol) 714internal MethodSymbol AdaptedMethodSymbol { get; }
Emitter\Model\NamedTypeSymbolAdapter.cs (14)
327var method = (MethodSymbol)member; 335foreach (var implemented in method.ExplicitInterfaceImplementations) 368MethodSymbol objectMethod = objectMember as MethodSymbol; 387foreach ((MethodSymbol body, MethodSymbol implemented) in container.GetSynthesizedExplicitImplementations(cancellationToken: default).MethodImpls) 406var method = m.GetInternalSymbol() as MethodSymbol; 411foreach (var implemented in method.ExplicitInterfaceImplementations) 627foreach (var method in AdaptedNamedTypeSymbol.GetMethodsToEmit()) 1017internal virtual IEnumerable<MethodSymbol> GetMethodsToEmit() 1025var method = (MethodSymbol)m;
Emitter\Model\PEModuleBuilder.cs (29)
26internal abstract class PEModuleBuilder : PEModuleBuilder<CSharpCompilation, SourceModuleSymbol, AssemblySymbol, TypeSymbol, NamedTypeSymbol, MethodSymbol, SyntaxNode, NoPia.EmbeddedTypesManager, ModuleCompilationState> 391var method = (MethodSymbol)member; 500internal virtual VariableSlotAllocator TryCreateVariableSlotAllocator(MethodSymbol method, MethodSymbol topLevelMethod, DiagnosticBag diagnostics) 505internal virtual MethodInstrumentation GetMethodBodyInstrumentations(MethodSymbol method) 841return ((MethodSymbol)Compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__InitializeArrayArrayRuntimeFieldHandle))?.GetCciAdapter(); 1203internal sealed override Cci.IMethodReference Translate(MethodSymbol symbol, DiagnosticBag diagnostics, bool needDeclaration) 1209MethodSymbol methodSymbol, 1243MethodSymbol methodSymbol, 1303else if (methodSymbol is NativeIntegerMethodSymbol { UnderlyingMethod: MethodSymbol underlyingMethod }) 1319MethodSymbol methodSymbol, 1431return container.Kind == SymbolKind.Method && ((MethodSymbol)container).IsGenericMethod || 1820internal MethodSymbol EnsureThrowSwitchExpressionExceptionExists(SyntaxNode syntaxNode, SyntheticBoundNodeFactory factory, DiagnosticBag diagnostics) 1833private MethodSymbol EnsurePrivateImplClassMethodExists<TArg>(SyntaxNode syntaxNode, string methodName, Func<SynthesizedPrivateImplementationDetailsType, TArg, MethodSymbol> createMethodSymbol, TArg arg, DiagnosticBag diagnostics) 1840return (MethodSymbol)methodAdapter.GetInternalSymbol()!; 1843MethodSymbol methodSymbol = createMethodSymbol(privateImplClass, arg); 1848return (MethodSymbol)privateImplClass.PrivateImplementationDetails.GetMethod(methodName)!.GetInternalSymbol()!; 1867internal MethodSymbol EnsureThrowSwitchExpressionExceptionParameterlessExists(SyntaxNode syntaxNode, SyntheticBoundNodeFactory factory, DiagnosticBag diagnostics) 1887internal MethodSymbol EnsureThrowInvalidOperationExceptionExists(SyntaxNode syntaxNode, SyntheticBoundNodeFactory factory, DiagnosticBag diagnostics) 1904internal MethodSymbol EnsureInlineArrayAsSpanExists(SyntaxNode syntaxNode, NamedTypeSymbol spanType, NamedTypeSymbol intType, DiagnosticBag diagnostics) 1932var attributeConstructor = (MethodSymbol)factory.SpecialMember(SpecialMember.System_Runtime_CompilerServices_InlineArrayAttribute__ctor); 1973internal MethodSymbol EnsureInlineArrayAsReadOnlySpanExists(SyntaxNode syntaxNode, NamedTypeSymbol spanType, NamedTypeSymbol intType, DiagnosticBag diagnostics) 1990internal MethodSymbol EnsureInlineArrayElementRefExists(SyntaxNode syntaxNode, NamedTypeSymbol intType, DiagnosticBag diagnostics) 2006internal MethodSymbol EnsureInlineArrayElementRefReadOnlyExists(SyntaxNode syntaxNode, NamedTypeSymbol intType, DiagnosticBag diagnostics) 2022internal MethodSymbol EnsureInlineArrayFirstElementRefExists(SyntaxNode syntaxNode, DiagnosticBag diagnostics) 2035internal MethodSymbol EnsureInlineArrayFirstElementRefReadOnlyExists(SyntaxNode syntaxNode, DiagnosticBag diagnostics)
Emitter\Model\PropertySymbolAdapter.cs (2)
72MethodSymbol getMethod = AdaptedPropertySymbol.GetMethod; 127MethodSymbol setMethod = AdaptedPropertySymbol.SetMethod;
Emitter\Model\SpecializedGenericMethodInstanceReference.cs (1)
24public SpecializedGenericMethodInstanceReference(MethodSymbol underlyingMethod)
Emitter\Model\SpecializedMethodReference.cs (1)
21public SpecializedMethodReference(MethodSymbol underlyingMethod)
Emitter\Model\TypeParameterSymbolAdapter.cs (2)
222return ((MethodSymbol)AdaptedTypeParameterSymbol.ContainingSymbol).GetCciAdapter(); 347return ((MethodSymbol)AdaptedTypeParameterSymbol.ContainingSymbol).GetCciAdapter();
Emitter\NoPia\EmbeddedEvent.cs (1)
135TypeManager.EmbedMethodIfNeedTo(((MethodSymbol)m).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedType.cs (2)
50foreach (MethodSymbol m in UnderlyingNamedType.AdaptedNamedTypeSymbol.GetMethodsToEmit()) 305TypeManager.EmbedMethod(this, ((MethodSymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (9)
42private readonly MethodSymbol[] _lazyWellKnownTypeMethods; 47_lazyWellKnownTypeMethods = new MethodSymbol[(int)WellKnownMember.Count]; 82public MethodSymbol GetWellKnownMethod(WellKnownMember method, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 90private MethodSymbol LazyGetWellKnownTypeMethod(ref MethodSymbol lazyMethod, WellKnownMember member, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 95var symbol = (MethodSymbol)Binder.GetWellKnownTypeMember(ModuleBeingBuilt.Compilation, 126var ctor = GetWellKnownMethod(constructor, syntaxNodeOpt, diagnostics); 416foreach (MethodSymbol m in namedType.GetMethodsToEmit())
Errors\LazyUnmanagedCallersOnlyMethodCalledDiagnosticInfo.cs (2)
13private readonly MethodSymbol _method; 16internal LazyUnmanagedCallersOnlyMethodCalledDiagnosticInfo(MethodSymbol method, bool isDelegateConversion)
FlowAnalysis\AbstractFlowPass.cs (25)
470var method = _symbol as MethodSymbol; 484(_symbol as MethodSymbol)?.TryGetThisParameter(out thisParameter); 496var method = _symbol as MethodSymbol; 1419private void VisitReceiverBeforeCall(BoundExpression receiverOpt, MethodSymbol method) 1427private void VisitReceiverAfterCall(BoundExpression receiverOpt, MethodSymbol method) 1482var method = GetReadMethod(node.Indexer); 1516protected virtual void VisitArguments(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> refKindsOpt, MethodSymbol method) 1543private void VisitArgumentsAfterCall(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> refKindsOpt, MethodSymbol method) 1571protected virtual void WriteArgument(BoundExpression arg, RefKind refKind, MethodSymbol method) 1635static bool ignoreReceiver(MethodSymbol method) 2114protected virtual void PropertySetter(BoundExpression node, BoundExpression receiver, MethodSymbol setter, BoundExpression value = null) 2141var method = GetWriteMethod(property); 2196var readMethod = GetReadMethod(property); 2215var writeMethod = GetWriteMethod(property); 2275var method = GetReadMethod(property); 2811var readMethod = GetReadMethod(property); 2812var writeMethod = GetWriteMethod(property); 3015var method = conversion.Method; 3587MethodSymbol method = null; 3688private static MethodSymbol GetReadMethod(PropertySymbol property) => 3691private static MethodSymbol GetWriteMethod(PropertySymbol property) => 3715var readMethod = property.GetOwnOrInheritedGetMethod(); 3773var writeMethod = symbol.GetOwnOrInheritedSetMethod();
FlowAnalysis\AlwaysAssignedWalker.cs (1)
72protected override void WriteArgument(BoundExpression arg, RefKind refKind, MethodSymbol method)
FlowAnalysis\CSharpDataFlowAnalysis.cs (3)
255IEnumerable<MethodSymbol> usedLocalFunctions; 267usedLocalFunctions = Enumerable.Empty<MethodSymbol>(); 395private static ImmutableArray<IMethodSymbol> Normalize(IEnumerable<MethodSymbol> data)
FlowAnalysis\DefiniteAssignment.cs (16)
102&& CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }; 157protected MethodSymbol? topLevelMethod; 186this.topLevelMethod = member as MethodSymbol; 205this.topLevelMethod = member as MethodSymbol; 340case MethodSymbol { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } and 401if (CurrentSymbol is MethodSymbol currentMethod && currentMethod.IsAsync && !currentMethod.IsImplicitlyDeclared) 543MethodSymbol member, 740protected IEnumerable<MethodSymbol> GetUsedLocalFunctions() => _usedLocalFunctions.ToArray(); 1258Debug.Assert(CurrentSymbol is MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }); 1311if (CurrentSymbol is not MethodSymbol { MethodKind: MethodKind.Constructor, ContainingType.TypeKind: TypeKind.Struct }) 1809if ((object)current != CurrentSymbol && current is MethodSymbol method) 1849if (current is not MethodSymbol && parameter.RefKind == RefKind.Out) 1879if (parameter.RefKind == RefKind.Out && !(this.CurrentSymbol is MethodSymbol currentMethod && currentMethod.IsAsync)) // out parameters not allowed in async 2370if (localSymbol.IsFixed && this.CurrentSymbol is MethodSymbol currentMethod && 2412foreach (var method in node.Methods) 2567protected override void WriteArgument(BoundExpression arg, RefKind refKind, MethodSymbol method)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
163((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction)
FlowAnalysis\DefiniteAssignment.VariableIdentifier.cs (1)
36SymbolKind.Method when symbol is MethodSymbol m && m.MethodKind == MethodKind.LocalFunction => true,
FlowAnalysis\FlowAnalysisPass.cs (5)
32MethodSymbol method, 110private static BoundBlock PrependImplicitInitializations(BoundBlock body, MethodSymbol method, ImmutableArray<FieldSymbol> implicitlyInitializedFields, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 165private static BoundBlock AppendImplicitReturn(BoundBlock body, MethodSymbol method, bool originalBodyNested) 187internal static BoundBlock AppendImplicitReturn(BoundBlock body, MethodSymbol method) 209MethodSymbol method,
FlowAnalysis\NullableWalker.cs (158)
199private MethodSymbol? _delegateInvokeMethod; 238private PooledDictionary<MethodSymbol, Variables>? _nestedFunctionVariables; 263private readonly MethodSymbol? _baseOrThisInitializer; 453MethodSymbol? delegateInvokeMethodOpt, 458MethodSymbol? baseOrThisInitializer, 602if ((_symbol as MethodSymbol)?.IsConstructor() != true || _useConstructorExitWarnings) 630var method = _symbol as MethodSymbol; 704void checkMemberStateOnConstructorExit(MethodSymbol constructor, Symbol member, LocalState state, int thisSlot, Location? exitLocation, ImmutableArray<string> membersWithStateEnforcedByRequiredMembers, bool forcePropertyAnalysis) 797if (_symbol is MethodSymbol method) 875var baseOrThisInitializer = GetBaseOrThisInitializer(); 1041private void EnforceMemberNotNullOnMember(SyntaxNode? syntaxOpt, LocalState state, MethodSymbol method, string memberName) 1075if (_symbol is MethodSymbol method) 1105if (_symbol is MethodSymbol method) 1153private void MakeMembersMaybeNull(MethodSymbol method, ImmutableArray<string> members) 1161void makeMemberMaybeNull(MethodSymbol method, string memberName) 1184int containingSlot = GetReceiverSlotForMemberPostConditions(_symbol as MethodSymbol); 1209private MethodSymbol? GetBaseOrThisInitializer() 1371else if (CurrentSymbol is MethodSymbol { IsAsync: false }) 1383if (CurrentSymbol is MethodSymbol method && 1397MethodSymbol method, 1403MethodSymbol? baseOrThisInitializer, 1424MethodSymbol method, 1430MethodSymbol? baseOrThisInitializer, 1466if (symbol is MethodSymbol method 1482internal static VariableState? GetAfterInitializersState(CSharpCompilation compilation, MethodSymbol method, BoundNode nodeToAnalyze, BoundNode? constructorBody, BindingDiagnosticBag diagnostics) 1499MethodSymbol? baseOrThisInitializer = GetConstructorThisOrBaseSymbol(constructorBody); 1520private static MethodSymbol? GetConstructorThisOrBaseSymbol(BoundNode? constructorBody) 1745MethodSymbol? delegateInvokeMethodOpt, 1788MethodSymbol? delegateInvokeMethodOpt, 1790MethodSymbol? baseOrThisInitializer, 2085var method = getTopLevelMethod(_symbol as MethodSymbol); 2164static MethodSymbol? getTopLevelMethod(MethodSymbol? method) 2173method = container as MethodSymbol; 2191var enclosingMemberMethod = _symbol as MethodSymbol; 2195enclosingMemberMethod = enclosingMemberMethod.ContainingSymbol as MethodSymbol; 2208if (this._symbol is MethodSymbol constructor 2839if (!(CurrentSymbol is MethodSymbol methodSymbol)) 3002if (CurrentSymbol is MethodSymbol method) 3036var method = CurrentSymbol as MethodSymbol; 3044var delegateOrMethod = _useDelegateInvokeReturnType ? _delegateInvokeMethod! : method; 3277private Variables GetOrCreateNestedFunctionVariables(Variables container, MethodSymbol lambdaOrLocalFunction) 3279_nestedFunctionVariables ??= PooledDictionary<MethodSymbol, Variables>.GetInstance(); 3291MethodSymbol lambdaOrFunctionSymbol, 3293MethodSymbol? delegateInvokeMethod, 3305var oldDelegateInvokeMethod = _delegateInvokeMethod; 3673var invokeMethod = n.DelegateInvokeMethod; 3858var createMethod = node.CollectionBuilderMethod; 3874var createMethod = node.CollectionBuilderMethod; 3918MethodSymbol? constructor = getConstructor(node, node.Type); 3929(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = inferInitialObjectState(node, type, constructor, arguments, argumentResults, isTargetTyped); 3947Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 3976Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 3988MethodSymbol? constructor = getConstructor(node, type); 4000static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 4002var constructor = node.Constructor; 4006constructor = (MethodSymbol)AsMemberOfType(type, constructor); 4012(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 4013BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 4082Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 4087return (TypeSymbol type, MethodSymbol? constructor) => 4365MethodSymbol addMethod = addMethodAsMemberOfContainingType(node, containingType, ref argumentResults); 4368(MethodSymbol? reinferredMethod, 4398MethodSymbol? reinferredMethod, 4429MethodSymbol addMethod = addMethodAsMemberOfContainingType(node, containingType, ref argumentResults); 4437static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults) 4439var method = node.AddMethod; 4462method = (MethodSymbol)AsMemberOfType(containingType, method); 4896private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 5135MethodSymbol? method, 5160var reinferredMethod = (MethodSymbol)AsMemberOfType(asMemberOfType, method); 6338var method = node.Method; 6343method = (MethodSymbol)AsMemberOfType(receiverType.Type, method); 6366private void LearnFromEqualsMethod(MethodSymbol method, BoundCall node, TypeWithState receiverType, ImmutableArray<VisitResult> results) 6404static bool anyOverriddenMethodHasExplicitImplementation(MethodSymbol method) 6406for (var overriddenMethod = method; overriddenMethod is object; overriddenMethod = overriddenMethod.OverriddenMethod) 6417static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 6419var wellKnownMethod = (MethodSymbol?)compilation.GetWellKnownTypeMember(wellKnownMember); 6428var constructedMethod = wellKnownMethod.AsMember(constructedType); 6453for (var overriddenMethod = method; overriddenMethod is object; overriddenMethod = overriddenMethod.OverriddenMethod) 6531private bool IsCompareExchangeMethod(MethodSymbol? method) 6603private void CheckCallReceiver(BoundExpression? receiverOpt, TypeWithState receiverType, MethodSymbol method) 6631private TypeWithState GetReturnTypeWithState(MethodSymbol method) 6769protected override void VisitArguments(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> refKindsOpt, MethodSymbol method) 6775private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull) VisitArguments( 6779MethodSymbol? method, 6803private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull) VisitArguments( 6812MethodSymbol? method = null, 6821private delegate (MethodSymbol? method, bool returnNotNull) ArgumentsCompletionDelegate(ImmutableArray<VisitResult> argumentResults, ImmutableArray<ParameterSymbol> parametersOpt, MethodSymbol? method); 6823private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull, ArgumentsCompletionDelegate? completion) 6833MethodSymbol? method, 6861(MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull, ArgumentsCompletionDelegate? completion) 6874MethodSymbol? method, 7044return (ImmutableArray<VisitResult> results, ImmutableArray<ParameterSymbol> parametersOpt, MethodSymbol? method) => 7147private void ApplyMemberPostConditions(BoundExpression? receiverOpt, MethodSymbol? method) 7169private int GetReceiverSlotForMemberPostConditions(MethodSymbol? method) 7181MethodSymbol? current = method; 7182while (current.ContainingSymbol is MethodSymbol container) 7199private void ApplyMemberPostConditions(int receiverSlot, MethodSymbol method) 7876private MethodSymbol InferMethodTypeArguments( 7877MethodSymbol method, 7887var definition = method.ConstructedFrom; 7974internal override TypeWithAnnotations GetMethodGroupResultType(BoundMethodGroup group, MethodSymbol method) 7980method = (MethodSymbol)AsMemberOfType(receiverType.Type, method); 8064private void CheckMethodConstraints(SyntaxNode syntax, MethodSymbol method) 8241if (((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction) 8313if (result is MethodSymbol resultMethod && resultMethod.IsGenericMethod) 8315result = resultMethod.Construct(((MethodSymbol)symbol).TypeArgumentsWithAnnotations); 8694private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 8712void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 8719void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 8730MethodSymbol? targetInvokeMethod = delegateType.DelegateInvokeMethod; 8783void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, Location location) 8790void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameterSymbol, bool topLevel, Location location) 8904var method = conversion.Method; 8921static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 9436var method = conversion.Method; 9736var method = node.MethodOpt; 9866private MethodSymbol CheckMethodGroupReceiverNullability(BoundMethodGroup group, ImmutableArray<ParameterSymbol> parameters, MethodSymbol method, bool invokedAsExtensionMethod) 9874method = (MethodSymbol)AsMemberOfType(receiverType.Type, method); 9928var delegateInvokeMethod = delegateTypeOpt?.DelegateInvokeMethod; 9944private static void UseDelegateInvokeParameterAndReturnTypes(BoundLambda lambda, MethodSymbol? delegateInvokeMethod, out bool useDelegateInvokeParameterTypes, out bool useDelegateInvokeReturnType) 10218var deconstructMethod = invocation?.Method; 10233deconstructMethod = (MethodSymbol)AsMemberOfType(rightResult.Type, deconstructMethod); 10484MethodSymbol? incrementOperator = (node.OperatorKind.IsUserDefined() && node.MethodOpt?.ParameterCount == 1) ? node.MethodOpt : null; 10868var getMethod = ((PropertySymbol)member.OriginalDefinition).GetMethod; 10889var getValue = (MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value); 10956MethodSymbol? reinferredGetEnumeratorMethod = null; 11069reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, enumeratorInfoOpt.GetEnumeratorInfo.Method); 11082var currentPropertyGetter = (MethodSymbol)AsMemberOfType(enumeratorReturnType.Type, enumeratorInfoOpt.CurrentPropertyGetter); 11091var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, enumeratorInfoOpt.MoveNextInfo.Method); 11107var disposeAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, originalDisposeMethod); 11313node.MethodOpt is MethodSymbol method && 11322method = (MethodSymbol)AsMemberOfType(operandType.Type!.StrippedType(), method); 11418MethodSymbol? logicalOperator = null; 11419MethodSymbol? trueFalseOperator = null; 11502var getResult = awaitableInfo.GetResult; 11503var reinferredGetResult = _visitResult.RValueType.Type is NamedTypeSymbol taskAwaiterType 12055var method = (MethodSymbol)CurrentSymbol; 12707var variables = (symbol.ContainingSymbol is MethodSymbol containingMethod ? _variables.GetVariablesForMethodScope(containingMethod) : null) ??
FlowAnalysis\NullableWalker.Variables.cs (4)
214internal Variables CreateNestedMethodScope(MethodSymbol method) 217Debug.Assert(!(method.ContainingSymbol is MethodSymbol containingMethod) || 359if (symbol.ContainingSymbol is MethodSymbol method && 397internal Variables? GetVariablesForMethodScope(MethodSymbol method)
FlowAnalysis\NullableWalker_Patterns.cs (1)
447var method = e.DeconstructMethod;
FlowAnalysis\ReadWriteWalker.cs (3)
31out IEnumerable<MethodSymbol> usedLocalFunctions) 41usedLocalFunctions = Enumerable.Empty<MethodSymbol>(); 83if (current is MethodSymbol m)
Generated\BoundNodes.xml.Generated.cs (167)
1183public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1203public MethodSymbol? MethodOpt { get; } 1206public ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt { get; } 1211public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1225public BoundIncrementOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1247public MethodSymbol? MethodOpt { get; } 1254public ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt { get; } 1259public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1334public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1345public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1356public MethodSymbol TargetMethod { get; } 1363public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1483public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1496public MethodSymbol? GetTypeFromHandle { get; } 1501public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1577public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1590public MethodSymbol? MethodOpt { get; } 1595public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1609public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1623public MethodSymbol? MethodOpt { get; } 1628public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1733public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1754public MethodSymbol LogicalOperator { get; } 1755public MethodSymbol TrueOperator { get; } 1756public MethodSymbol FalseOperator { get; } 1759public ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt { get; } 1764public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1778public BoundCompoundAssignmentOperator(SyntaxNode syntax, BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1806public ImmutableArray<MethodSymbol> OriginalUserDefinedOperatorsOpt { get; } 1811public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 2141public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, bool hasErrors = false) 2155public MethodSymbol? GetResult { get; } 2160public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult) 2209protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2218protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2228public MethodSymbol? GetTypeFromHandle { get; } 2233public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2248public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2294public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2304public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2315public MethodSymbol Method { get; } 2320public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2708public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2719public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2731public MethodSymbol Method { get; } 2732public MethodSymbol? GetMethodFromHandle { get; } 2737public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2751public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2762public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2775public MethodSymbol? GetFieldFromHandle { get; } 2780public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2952public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type, bool hasErrors = false) 2977public ImmutableArray<MethodSymbol> OriginalUserDefinedConversionsOpt { get; } 2982public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type) 2996public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 3010public MethodSymbol ConversionMethod { get; } 3015public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 3095public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 3115public MethodSymbol? GetPinnableOpt { get; } 3120public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 5385public BoundDagDeconstructEvaluation(SyntaxNode syntax, MethodSymbol deconstructMethod, BoundDagTemp input, bool hasErrors = false) 5395public MethodSymbol DeconstructMethod { get; } 5400public BoundDagDeconstructEvaluation Update(MethodSymbol deconstructMethod, BoundDagTemp input) 5894public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5911public ImmutableArray<MethodSymbol> ApplicableMethods { get; } 5916public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5963public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 5981public MethodSymbol? HasValueMethodOpt { get; } 5990public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 6075public BoundMethodGroup(SyntaxNode syntax, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind, bool hasErrors = false) 6093public ImmutableArray<MethodSymbol> Methods { get; } 6102public BoundMethodGroup Update(ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, ImmutableArray<MethodSymbol> methods, Symbol? lookupSymbolOpt, DiagnosticInfo? lookupError, BoundMethodGroupFlags? flags, FunctionTypeSymbol? functionType, BoundExpression? receiverOpt, LookupResultKind resultKind) 6144public BoundCall(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type, bool hasErrors = false) 6170public MethodSymbol Method { get; } 6180public ImmutableArray<MethodSymbol> OriginalMethodsOpt { get; } 6185public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type) 6238public BoundAttribute(SyntaxNode syntax, MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 6257public MethodSymbol? Constructor { get; } 6269public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6342public BoundObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6364public override MethodSymbol Constructor { get; } 6365public ImmutableArray<MethodSymbol> ConstructorsGroup { get; } 6379public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6434public BoundCollectionExpression(SyntaxNode syntax, CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type, bool hasErrors = false) 6456public MethodSymbol? CollectionBuilderMethod { get; } 6465public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6622public BoundDynamicObjectCreationExpression(SyntaxNode syntax, string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6645public ImmutableArray<MethodSymbol> ApplicableMethods { get; } 6651public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6866public BoundCollectionElementInitializer(SyntaxNode syntax, MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 6885public MethodSymbol AddMethod { get; } 6897public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6911public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6924public ImmutableArray<MethodSymbol> ApplicableMethods { get; } 6929public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6978public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 6993public MethodSymbol Constructor { get; } 7000public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 7084public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7099public MethodSymbol? MethodOpt { get; } 7106public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 8148public BoundRecursivePattern(SyntaxNode syntax, BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8167public MethodSymbol? DeconstructMethod { get; } 8175public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8272public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8291public MethodSymbol GetLengthMethod { get; } 8292public MethodSymbol GetItemMethod { get; } 8298public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 8828public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8843public MethodSymbol? CloneMethod { get; } 8849public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 12546MethodSymbol? methodOpt = GetUpdatedSymbol(node, node.MethodOpt); 12548ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt = GetUpdatedArray(node, node.OriginalUserDefinedOperatorsOpt); 12566MethodSymbol? methodOpt = GetUpdatedSymbol(node, node.MethodOpt); 12568ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt = GetUpdatedArray(node, node.OriginalUserDefinedOperatorsOpt); 12624MethodSymbol targetMethod = GetUpdatedSymbol(node, node.TargetMethod); 12695MethodSymbol? getTypeFromHandle = GetUpdatedSymbol(node, node.GetTypeFromHandle); 12747MethodSymbol? methodOpt = GetUpdatedSymbol(node, node.MethodOpt); 12765MethodSymbol? methodOpt = GetUpdatedSymbol(node, node.MethodOpt); 12802ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt = GetUpdatedArray(node, node.OriginalUserDefinedOperatorsOpt); 12991MethodSymbol? getResult = GetUpdatedSymbol(node, node.GetResult); 13017MethodSymbol? getTypeFromHandle = GetUpdatedSymbol(node, node.GetTypeFromHandle); 13035MethodSymbol method = GetUpdatedSymbol(node, node.Method); 13184MethodSymbol method = GetUpdatedSymbol(node, node.Method); 13185MethodSymbol? getMethodFromHandle = GetUpdatedSymbol(node, node.GetMethodFromHandle); 13203MethodSymbol? getFieldFromHandle = GetUpdatedSymbol(node, node.GetFieldFromHandle); 13304ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt = GetUpdatedArray(node, node.OriginalUserDefinedConversionsOpt); 13322MethodSymbol conversionMethod = GetUpdatedSymbol(node, node.ConversionMethod); 13370MethodSymbol? getPinnableOpt = GetUpdatedSymbol(node, node.GetPinnableOpt); 13712MethodSymbol deconstructMethod = GetUpdatedSymbol(node, node.DeconstructMethod); 13842ImmutableArray<MethodSymbol> applicableMethods = GetUpdatedArray(node, node.ApplicableMethods); 13879MethodSymbol? hasValueMethodOpt = GetUpdatedSymbol(node, node.HasValueMethodOpt); 13929ImmutableArray<MethodSymbol> methods = GetUpdatedArray(node, node.Methods); 13967MethodSymbol method = GetUpdatedSymbol(node, node.Method); 13968ImmutableArray<MethodSymbol> originalMethodsOpt = GetUpdatedArray(node, node.OriginalMethodsOpt); 14006MethodSymbol? constructor = GetUpdatedSymbol(node, node.Constructor); 14042MethodSymbol constructor = GetUpdatedSymbol(node, node.Constructor); 14043ImmutableArray<MethodSymbol> constructorsGroup = GetUpdatedArray(node, node.ConstructorsGroup); 14079MethodSymbol? collectionBuilderMethod = GetUpdatedSymbol(node, node.CollectionBuilderMethod); 14149ImmutableArray<MethodSymbol> applicableMethods = GetUpdatedArray(node, node.ApplicableMethods); 14257MethodSymbol addMethod = GetUpdatedSymbol(node, node.AddMethod); 14276ImmutableArray<MethodSymbol> applicableMethods = GetUpdatedArray(node, node.ApplicableMethods); 14307MethodSymbol constructor = GetUpdatedSymbol(node, node.Constructor); 14360MethodSymbol? methodOpt = GetUpdatedSymbol(node, node.MethodOpt); 14774MethodSymbol? deconstructMethod = GetUpdatedSymbol(node, node.DeconstructMethod); 14812MethodSymbol getLengthMethod = GetUpdatedSymbol(node, node.GetLengthMethod); 14813MethodSymbol getItemMethod = GetUpdatedSymbol(node, node.GetItemMethod); 14977MethodSymbol? cloneMethod = GetUpdatedSymbol(node, node.CloneMethod);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (7)
33MethodSymbol containingMethod, 110MethodSymbol containingSymbol, 428var exceptionDispatchInfoCapture = _F.WellKnownMethod(WellKnownMember.System_Runtime_ExceptionServices_ExceptionDispatchInfo__Capture, isOptional: true); 429var exceptionDispatchInfoThrow = _F.WellKnownMethod(WellKnownMember.System_Runtime_ExceptionServices_ExceptionDispatchInfo__Throw, isOptional: true); 707var oldContainingSymbol = _F.CurrentFunction; 723var oldContainingSymbol = _F.CurrentFunction; 984MethodSymbol containingMethod,
Lowering\AsyncRewriter\AsyncIteratorInfo.cs (4)
29internal MethodSymbol SetResultMethod { get; } 32internal MethodSymbol SetExceptionMethod { get; } 35MethodSymbol setResultMethod, MethodSymbol setExceptionMethod)
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
48MethodSymbol method,
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (33)
44internal readonly MethodSymbol CreateBuilder; 49internal readonly MethodSymbol SetException; 54internal readonly MethodSymbol SetResult; 59internal readonly MethodSymbol AwaitOnCompleted; 64internal readonly MethodSymbol AwaitUnsafeOnCompleted; 69internal readonly MethodSymbol Start; 74internal readonly MethodSymbol SetStateMachine; 89MethodSymbol createBuilder, 90MethodSymbol setException, 91MethodSymbol setResult, 92MethodSymbol awaitOnCompleted, 93MethodSymbol awaitUnsafeOnCompleted, 94MethodSymbol start, 95MethodSymbol setStateMachine, 112internal static bool TryCreate(SyntheticBoundNodeFactory F, MethodSymbol method, TypeMap typeMap, out AsyncMethodBuilderMemberCollection collection) 119TryGetBuilderMember<MethodSymbol>( 124out MethodSymbol createBuilderMethod); 152MethodSymbol createBuilderMethod; 154TryGetBuilderMember<MethodSymbol>( 186MethodSymbol createBuilderMethod = null; 215TryGetBuilderMember<MethodSymbol>( 267MethodSymbol createBuilderMethod = null; 298TryGetBuilderMember<MethodSymbol>( 376MethodSymbol createBuilderMethod, 386MethodSymbol setExceptionMethod; 387MethodSymbol setResultMethod; 388MethodSymbol awaitOnCompletedMethod; 389MethodSymbol awaitUnsafeOnCompletedMethod; 390MethodSymbol startMethod; 391MethodSymbol setStateMachineMethod; 469private static MethodSymbol GetCustomCreateMethod( 483var method = (MethodSymbol)member;
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (8)
27protected readonly MethodSymbol _method; 67MethodSymbol method, 136internal void GenerateMoveNext(BoundStatement body, MethodSymbol moveNextMethod) 360MethodSymbol getResult = VisitMethodSymbol(node.AwaitableInfo.GetResult); 361MethodSymbol isCompletedMethod = ((object)node.AwaitableInfo.IsCompleted != null) ? VisitMethodSymbol(node.AwaitableInfo.IsCompleted.GetMethod) : null; 416MethodSymbol methodSymbol = null, 443private BoundExpression GenerateGetIsCompleted(LocalSymbol awaiterTemp, MethodSymbol getIsCompletedMethod) 626var onCompleted = (useUnsafeOnCompleted ?
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (33)
36MethodSymbol method, 210protected override BoundStatement InitializeParameterField(MethodSymbol getEnumeratorMethod, ParameterSymbol parameter, BoundExpression resultParameter, BoundExpression parameterProxy) 301MethodSymbol IAsyncEnumerableOfElementType_MoveNextAsync = F.WellKnownMethod(WellKnownMember.System_Collections_Generic_IAsyncEnumerator_T__MoveNextAsync) 306MethodSymbol promise_GetStatus = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_ManualResetValueTaskSourceCore_T__GetStatus) 309MethodSymbol promise_GetResult = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_ManualResetValueTaskSourceCore_T__GetResult) 314MethodSymbol valueTaskT_ctorValue = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_ValueTask_T__ctorValue) 317MethodSymbol valueTaskT_ctor = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_ValueTask_T__ctorSourceAndToken) 327out MethodSymbol promise_get_Version); 368out BoundExpressionStatement startCall, out MethodSymbol promise_get_Version) 378var resetMethod = (MethodSymbol)F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_ManualResetValueTaskSourceCore_T__Reset, isOptional: true) 385MethodSymbol startMethod = _asyncMethodBuilderMemberCollection.Start.Construct(this.stateMachineType); 426MethodSymbol IAsyncDisposable_DisposeAsync = F.WellKnownMethod(WellKnownMember.System_IAsyncDisposable__DisposeAsync); 437out MethodSymbol promise_get_Version); 451MethodSymbol valueTask_ctor = 481MethodSymbol IAsyncEnumerableOfElementType_get_Current = 499MethodSymbol IValueTaskSourceOfBool_GetResult = 503MethodSymbol promise_GetResult = 524MethodSymbol IValueTaskSourceOfBool_GetStatus = 528MethodSymbol promise_GetStatus = 550MethodSymbol IValueTaskSourceOfBool_OnCompleted = 554MethodSymbol promise_OnCompleted = 578MethodSymbol IValueTaskSource_GetResult = 581MethodSymbol promise_GetResult = 602MethodSymbol IValueTaskSource_GetStatus = 605MethodSymbol promise_GetStatus = 625MethodSymbol IValueTaskSource_OnCompleted = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_IValueTaskSource__OnCompleted); 627MethodSymbol promise_OnCompleted = 654MethodSymbol IAsyncEnumerableOfElementType_GetEnumerator = 683MethodSymbol setResultMethod = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_ManualResetValueTaskSourceCore_T__SetResult, isOptional: true); 686setResultMethod = (MethodSymbol)setResultMethod.SymbolAsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 689MethodSymbol setExceptionMethod = F.WellKnownMethod(WellKnownMember.System_Threading_Tasks_Sources_ManualResetValueTaskSourceCore_T__SetException, isOptional: true); 692setExceptionMethod = (MethodSymbol)setExceptionMethod.SymbolAsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
Lowering\AsyncRewriter\AsyncRewriter.cs (5)
25MethodSymbol method, 43MethodSymbol method, 153var IAsyncStateMachine_MoveNext = F.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_IAsyncStateMachine_MoveNext); 154var IAsyncStateMachine_SetStateMachine = F.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_IAsyncStateMachine_SetStateMachine); 255var startMethod = methodScopeAsyncMethodBuilderMemberCollection.Start.Construct(frameType);
Lowering\AsyncRewriter\AsyncStateMachine.cs (4)
21private readonly MethodSymbol _constructor; 25public AsyncStateMachine(VariableSlotAllocator variableAllocatorOpt, TypeCompilationState compilationState, MethodSymbol asyncMethod, int asyncMethodOrdinal, TypeKind typeKind) 61_constructor = isIterator ? (MethodSymbol)new IteratorConstructor(this) : new AsyncConstructor(this); 69internal override MethodSymbol Constructor
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (9)
32public readonly PooledHashSet<MethodSymbol> MethodsConvertedToDelegates; 37public bool CanTakeRefParameters(MethodSymbol function) 47private readonly MethodSymbol _topLevelMethod; 54PooledHashSet<MethodSymbol> methodsConvertedToDelegates, 55MethodSymbol topLevelMethod, 71MethodSymbol method, 77var methodsConvertedToDelegates = PooledHashSet<MethodSymbol>.GetInstance(); 648public static (NestedFunction, Scope) GetVisibleNestedFunction(Scope startingScope, MethodSymbol functionSymbol) 668public static NestedFunction GetNestedFunctionInTree(Scope treeRoot, MethodSymbol functionSymbol)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (13)
127public readonly MethodSymbol OriginalMethodSymbol; 160public NestedFunction(MethodSymbol symbol, SyntaxReference blockSyntax) 272/// <see cref="Build(BoundNode, MethodSymbol, HashSet{MethodSymbol}, DiagnosticBag)"/> 324private readonly MethodSymbol _topLevelMethod; 331private readonly HashSet<MethodSymbol> _methodsConvertedToDelegates; 351MethodSymbol topLevelMethod, 352HashSet<MethodSymbol> methodsConvertedToDelegates, 369MethodSymbol topLevelMethod, 370HashSet<MethodSymbol> methodsConvertedToDelegates, 474var method = node.MethodOpt.OriginalDefinition; 569private BoundNode? VisitNestedFunction(MethodSymbol functionSymbol, BoundBlock? body) 625if (symbol is MethodSymbol method &&
Lowering\ClosureConversion\ClosureConversion.cs (26)
63/// a (<see cref="MethodSymbol"/>, <see cref="BoundStatement"/>) pair for each generated method. 67/// (<see cref="MethodSymbol"/>, <see cref="BoundStatement"/>) pairs for additional methods that the lambda rewriter produced. 76private readonly MethodSymbol _topLevelMethod; 77private readonly MethodSymbol _substitutedSourceMethod; 100private MethodSymbol _currentMethod; 160MethodSymbol method, 162MethodSymbol substitutedSourceMethod, 203(localOrParameter as MethodSymbol)?.MethodKind == MethodKind.LocalFunction); 230MethodSymbol method, 232MethodSymbol substitutedSourceMethod, 318protected override MethodSymbol CurrentMethod 373var containingMethod = scope.ContainingFunctionOpt?.OriginalMethodSymbol ?? _topLevelMethod; 409var originalMethod = nestedFunction.OriginalMethodSymbol; 527var containingMethod = isNonGeneric ? null : (_substitutedSourceMethod ?? _topLevelMethod); 676MethodSymbol constructor = frame.Constructor.AsMember(frameType); 858var loweredSymbol = (node.Method.MethodKind is MethodKind.LambdaMethod or MethodKind.LocalFunction) ? 870MethodSymbol localFunc, 872out MethodSymbol method, 1012MethodSymbol originalMethod, 1015ref MethodSymbol synthesizedMethod, 1083out var method, 1347out var method, 1374out MethodSymbol remappedMethod, 1557var oldMethod = _currentMethod; 1604private void AddSynthesizedMethod(MethodSymbol method, BoundStatement body) 1648MethodSymbol referencedMethod = synthesizedMethod;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (9)
385private static WellKnownMember GetBinaryOperatorFactory(BinaryOperatorKind opKind, MethodSymbol methodOpt, out bool isChecked, out bool isLifted, out bool requiresLifted) 481static bool useCheckedFactory(bool isChecked, MethodSymbol methodOpt) 487private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right) 567private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, WellKnownMember opFactory, BoundExpression loweredLeft, BoundExpression loweredRight) 646var method = node.Method; 699var method = node.SymbolOpt; 757private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver) 762var createDelegate = _bound.WellKnownMethod(WellKnownMember.System_Reflection_MethodInfo__CreateDelegate, isOptional: true); 1104var getMethod = node.PropertySymbol.GetOwnOrInheritedGetMethod();
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (6)
24internal readonly MethodSymbol TopLevelMethod; 31internal readonly MethodSymbol OriginalContainingMethodOpt; 33internal readonly MethodSymbol StaticConstructor; 39internal override MethodSymbol Constructor { get; } 46MethodSymbol topLevelMethod, 47MethodSymbol containingMethod,
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (4)
22internal MethodSymbol TopLevelMethod { get; } 29MethodSymbol topLevelMethod, 31MethodSymbol originalMethod, 157private static DeclarationModifiers MakeDeclarationModifiers(ClosureKind closureKind, MethodSymbol originalMethod)
Lowering\DiagnosticsPass_ExpressionTrees.cs (12)
26private readonly MethodSymbol _containingSymbol; 31public static void IssueDiagnostics(CSharpCompilation compilation, BoundNode node, BindingDiagnosticBag diagnostics, MethodSymbol containingSymbol) 49private DiagnosticsPass(CSharpCompilation compilation, BindingDiagnosticBag diagnostics, MethodSymbol containingSymbol) 221private void CheckReferenceToMethodIfLocalFunction(BoundExpression node, MethodSymbol method) 305MethodSymbol method, 529var method = indexer.GetOwnOrInheritedGetMethod() ?? indexer.GetOwnOrInheritedSetMethod(); 707var binary = node.LogicalOperator; 708var unary = node.OperatorKind.Operator() == BinaryOperatorKind.And ? node.FalseOperator : node.TrueOperator; 741if (_inExpressionLambda && node.MethodOpt is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.IsStatic) 838if (_inExpressionLambda && node.Conversion.Method is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.IsStatic) 871private void CheckMethodGroup(BoundMethodGroup node, MethodSymbol method, bool isExtensionMethod, bool parentIsConversion, TypeSymbol convertedToType) 880if ((node.LookupSymbolOpt as MethodSymbol)?.MethodKind == MethodKind.LocalFunction)
Lowering\DiagnosticsPass_Warnings.cs (4)
235private static bool IsComCallWithRefOmitted(MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt) 252if (node.Method is MethodSymbol method) 367MethodSymbol op = sym as MethodSymbol;
Lowering\InitializerRewriter.cs (1)
19internal static BoundTypeOrInstanceInitializers RewriteConstructor(ImmutableArray<BoundInitializer> boundInitializers, MethodSymbol method)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (16)
26private readonly MethodSymbol _method; 28private readonly MethodSymbol _createPayloadForMethodsSpanningSingleFile; 29private readonly MethodSymbol _createPayloadForMethodsSpanningMultipleFiles; 40MethodSymbol method, 63MethodSymbol createPayloadForMethodsSpanningSingleFile = GetCreatePayloadOverload( 69MethodSymbol createPayloadForMethodsSpanningMultipleFiles = GetCreatePayloadOverload( 102MethodSymbol method, 105MethodSymbol createPayloadForMethodsSpanningSingleFile, 106MethodSymbol createPayloadForMethodsSpanningMultipleFiles, 123var oldMethod = methodBodyFactory.CurrentFunction; 141private static bool IsExcludedFromCodeCoverage(MethodSymbol method) 169MethodSymbol createPayloadForMethodsSpanningSingleFile, 170MethodSymbol createPayloadForMethodsSpanningMultipleFiles, 177MethodSymbol createPayloadOverload; 564private static MethodSymbol GetCreatePayloadOverload(CSharpCompilation compilation, WellKnownMember overload, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 566return (MethodSymbol)Binder.GetWellKnownTypeMember(compilation, overload, diagnostics, syntax: syntax);
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
165ref MethodSymbol method,
Lowering\Instrumentation\Instrumenter.cs (1)
239ref MethodSymbol method,
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (14)
153MethodSymbol method, 204private MethodSymbol? GetLocalOrParameterStoreLogger(TypeSymbol variableType, Symbol targetSymbol, bool? refAssignmentSourceIsLocal, SyntaxNode syntax) 263var symbol = GetWellKnownMethodSymbol(overload, syntax); 268private MethodSymbol? GetWellKnownMethodSymbol(WellKnownMember overload, SyntaxNode syntax) 269=> (MethodSymbol?)Binder.GetWellKnownTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax, isOptional: false); 271private MethodSymbol? GetSpecialMethodSymbol(SpecialMember overload, SyntaxNode syntax) 272=> (MethodSymbol?)Binder.GetSpecialTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax); 312var parameterLogger = GetLocalOrParameterStoreLogger(parameter.Type, parameter, refAssignmentSourceIsLocal: null, _factory.Syntax); 343var entryLogger = GetWellKnownMethodSymbol(entryOverload, _factory.Syntax); 347var returnLogger = GetWellKnownMethodSymbol(WellKnownMember.Microsoft_CodeAnalysis_Runtime_LocalStoreTracker__LogReturn, _factory.Syntax); 394var logger = GetLocalOrParameterStoreLogger(targetType, targetSymbol, refAssignmentSourceIsLocal, original.Syntax); 464var toStringMethod = GetSpecialMethodSymbol(SpecialMember.System_Object__ToString, value.Syntax); 525var logger = GetLocalOrParameterStoreLogger(targetType, targetSymbol, refAssignmentSourceIsLocal: null, original.Syntax); 589var logger = GetLocalOrParameterStoreLogger(targetType, targetSymbol, refAssignmentSourceIsLocal: null, invocation.Syntax);
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (10)
26MethodSymbol throwMethod, 31private readonly MethodSymbol _throwMethod = throwMethod; 41MethodSymbol method, 57var throwMethod = factory.WellKnownMethod(WellKnownMember.System_Threading_CancellationToken__ThrowIfCancellationRequested, isOptional: true); 119ref MethodSymbol method, 153private MethodSymbol? FindOverloadWithCancellationToken(MethodSymbol method) 162var methodDefinition = method.OriginalDefinition; 186member is MethodSymbol { Parameters: [.., { RefKind: RefKind.None, Type: { } lastParamType }] parametersWithCancellationToken } overload && 215var result = overload.AsMember(method.ContainingType);
Lowering\Instrumentation\StackOverflowProbingInstrumenter.cs (4)
16MethodSymbol ensureStackMethod, 21private readonly MethodSymbol _ensureStackMethod = ensureStackMethod; 31MethodSymbol method, 47var ensureStackMethod = factory.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__EnsureSufficientExecutionStack, isOptional: true);
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (2)
169public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 171get { return ImmutableArray<MethodSymbol>.Empty; }
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (2)
58MethodSymbol originalMethod, 395var origMethod = F.CurrentFunction;
Lowering\IteratorRewriter\IteratorRewriter.cs (10)
31MethodSymbol method, 51MethodSymbol method, 159var getter = symbol.GetMethod; 212var IDisposable_Dispose = F.SpecialMethod(SpecialMember.System_IDisposable__Dispose); 214var IEnumerator_MoveNext = F.SpecialMethod(SpecialMember.System_Collections_IEnumerator__MoveNext); 215var IEnumerator_Reset = F.SpecialMethod(SpecialMember.System_Collections_IEnumerator__Reset); 216var IEnumerator_get_Current = F.SpecialProperty(SpecialMember.System_Collections_IEnumerator__Current).GetMethod; 219var IEnumeratorOfElementType_get_Current = F.SpecialProperty(SpecialMember.System_Collections_Generic_IEnumerator_T__Current).GetMethod.AsMember(IEnumeratorOfElementType); 256var IEnumerable_GetEnumerator = F.SpecialMethod(SpecialMember.System_Collections_IEnumerable__GetEnumerator); 259var IEnumerableOfElementType_GetEnumerator = F.SpecialMethod(SpecialMember.System_Collections_Generic_IEnumerable_T__GetEnumerator).AsMember(IEnumerableOfElementType);
Lowering\IteratorRewriter\IteratorStateMachine.cs (3)
21private readonly MethodSymbol _constructor; 26public IteratorStateMachine(VariableSlotAllocator slotAllocatorOpt, TypeCompilationState compilationState, MethodSymbol iteratorMethod, int iteratorMethodOrdinal, bool isEnumerable, TypeWithAnnotations elementType) 51internal override MethodSymbol Constructor
Lowering\LocalRewriter\DelegateCacheContainer.cs (7)
18private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 30internal DelegateCacheContainer(MethodSymbol ownerMethod, int topLevelMethodOrdinal, int ownerUniqueId, int generationOrdinal) 56var targetMethod = boundDelegateCreation.MethodOpt; 87private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)> 91public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y) 100public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (10)
25private Dictionary<MethodSymbol, DelegateCacheContainer>? _genericCacheContainers; 37var targetMethod = boundDelegateCreation.MethodOpt; 93if (!TryGetOwnerFunction(_factory.CurrentFunction, boundDelegateCreation, out var ownerFunction)) 108var containers = _genericCacheContainers ??= new Dictionary<MethodSymbol, DelegateCacheContainer>(ReferenceEqualityComparer.Instance); 124private static bool TryGetOwnerFunction(MethodSymbol currentFunction, BoundDelegateCreationExpression boundDelegateCreation, [NotNullWhen(true)] out MethodSymbol? ownerFunction) 126var targetMethod = boundDelegateCreation.MethodOpt; 142for (Symbol? enclosingSymbol = currentFunction; enclosingSymbol is MethodSymbol enclosingMethod; enclosingSymbol = enclosingSymbol.ContainingSymbol) 176for (Symbol? enclosingSymbol = currentFunction; enclosingSymbol is MethodSymbol enclosingMethod; enclosingSymbol = enclosingSymbol.ContainingSymbol) 210private static void FindTypeParameters(MethodSymbol method, HashSet<TypeParameterSymbol> result)
Lowering\LocalRewriter\DynamicSiteContainer.cs (3)
15private readonly MethodSymbol _topLevelMethod; 17internal DynamicSiteContainer(string name, MethodSymbol topLevelMethod, MethodSymbol containingMethod)
Lowering\LocalRewriter\LocalRewriter.cs (15)
57MethodSymbol containingMethod, 86MethodSymbol method, 333delegateType.DelegateInvokeMethod() is MethodSymbol delegateInvoke && 354var oldContainingSymbol = _factory.CurrentFunction; 419var oldContainingSymbol = _factory.CurrentFunction; 606/// Recommendation: Do not use, use <see cref="TryGetSpecialTypeMethod(SyntaxNode, SpecialMember, out MethodSymbol, bool)"/> instead! 609private MethodSymbol UnsafeGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember) 616/// Recommendation: Do not use, use <see cref="TryGetSpecialTypeMethod(SyntaxNode, SpecialMember, CSharpCompilation, BindingDiagnosticBag, out MethodSymbol, bool)"/> instead! 619private static MethodSymbol UnsafeGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 621MethodSymbol method; 636private bool TryGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember, out MethodSymbol method, bool isOptional = false) 641private static bool TryGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember, CSharpCompilation compilation, BindingDiagnosticBag diagnostics, out MethodSymbol method, bool isOptional = false) 657MethodSymbol? getTypeFromHandle; 687MethodSymbol? getTypeFromHandle; 1125private void CheckRefReadOnlySymbols(MethodSymbol symbol)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
167private static bool MethodMayMutateReceiver(BoundExpression receiver, MethodSymbol method)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (12)
160MethodSymbol method = d.DeconstructMethod; 220_localRewriter.TryGetNullableMethod(t.Syntax, inputType, SpecialMember.System_Nullable_T_GetValueOrDefault, out MethodSymbol getValueOrDefault)) 309var ctor = (MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Index__ctor); 323var indexCtor = (MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Index__ctor); 327var rangeCtor = (MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Range__ctor); 435var sequenceEqual = 436((MethodSymbol)_factory.WellKnownMember(isReadOnlySpan 440var asSpan = (MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_MemoryExtensions__AsSpan_String);
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
279var setMethod = property.GetOwnOrInheritedSetMethod();
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (23)
180MethodSymbol? method, 196MethodSymbol? method, 537private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt) 600MethodSymbol? leftTruthOperator, 725private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative) 747return new BoundUnaryOperator(syntax, UnaryOperatorKind.BoolLogicalNegation, converted, ConstantValue.NotAvailable, MethodSymbol.None, constrainedToTypeOpt: null, LookupResultKind.Viable, boolean) 773MethodSymbol? method, 800MethodSymbol? method, 1130MethodSymbol? method, 1299MethodSymbol? method, 1339MethodSymbol? method, 1408MethodSymbol? method, 1510MethodSymbol? method, 1836MethodSymbol getValueOrDefaultX = UnsafeGetNullableMethod(syntax, boundTempX.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 1837MethodSymbol getValueOrDefaultY = UnsafeGetNullableMethod(syntax, boundTempY.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 1894private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member) 1904internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 1911private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result, bool isOptional = false) 2002var method = UnsafeGetSpecialTypeMethod(syntax, member); 2010MethodSymbol method; 2013method = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(member); 2016(object)(method = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(member)) == null) 2063var method = UnsafeGetSpecialTypeMethod(syntax, member);
Lowering\LocalRewriter\LocalRewriter_Call.cs (12)
97private void EmbedIfNeedTo(BoundExpression receiver, ImmutableArray<MethodSymbol> methods, SyntaxNode syntaxNode) 108foreach (var m in methods) 136ref MethodSymbol method, 187var containingMethod = this._factory.CurrentFunction; 203var symbolForCompare = needToReduce ? ReducedExtensionMethodSymbol.Create(interceptor, receiverOpt!.Type, _compilation, out _) : interceptor; 383MethodSymbol method = node.Method; 441MethodSymbol method, 522private BoundExpression MakeCall(SyntaxNode syntax, BoundExpression? rewrittenReceiver, MethodSymbol method, ImmutableArray<BoundExpression> rewrittenArguments) 665var requiresInstanceReceiver = methodOrIndexer.RequiresInstanceReceiver() && methodOrIndexer is not MethodSymbol { MethodKind: MethodKind.Constructor } and not FunctionPointerMethodSymbol; 1233((MethodSymbol)methodOrIndexer).Parameters[0].Type as NamedTypeSymbol : 1426MethodSymbol? arrayEmpty = _compilation.GetSpecialTypeMember(SpecialMember.System_Array__Empty) as MethodSymbol;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (46)
79if (_compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_InteropServices_ImmutableCollectionsMarshal__AsImmutableArray_T) is MethodSymbol asImmutableArray && 106var addMethod = (MethodSymbol?)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_List_T__Add); 114static bool canOptimizeListElement(BoundNode element, MethodSymbol addMethod) 169if (!TryGetWellKnownTypeMember(node.Syntax, WellKnownMember.System_Linq_Enumerable__ToList, out MethodSymbol? toListGeneric, isOptional: true)) 191private bool ShouldUseIEnumerableBulkAddMethod(TypeSymbol spreadType, TypeSymbol targetEnumerableType, MethodSymbol? getEnumeratorMethod) 235private BoundExpression VisitImmutableArrayCollectionExpression(BoundCollectionExpression node, TypeWithAnnotations elementType, MethodSymbol asImmutableArray) 255MethodSymbol? spanConstructor = null; 279var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_ReadOnlySpan_T__ctor_Array)).AsMember(spanType); 297spanConstructor = ((MethodSymbol)_factory.WellKnownMember( 319var listToArray = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ToArray)).AsMember((NamedTypeSymbol)list.Type); 478var constructMethod = node.CollectionBuilderMethod; 557: WellKnownMember.System_Span_T__ctor_ref_T, isOptional: true) is MethodSymbol spanRefConstructor) 563var constructor = spanRefConstructor.AsMember(spanType); 575MethodSymbol elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(syntax, intType, _diagnostics.DiagnosticBag). 602MethodSymbol inlineArrayAsSpan = asReadOnlySpan ? 668&& tryGetToArrayMethod(spreadTypeOriginalDefinition, WellKnownType.System_Collections_Generic_List_T, WellKnownMember.System_Collections_Generic_List_T__ToArray, out MethodSymbol? listToArrayMethod)) 688&& TryGetSpanConversion(spreadExpression.Type, writableOnly: false, out var asSpanMethod)) 691if (tryGetToArrayMethod(spanType, WellKnownType.System_ReadOnlySpan_T, WellKnownMember.System_ReadOnlySpan_T__ToArray, out var toArrayMethod) 699bool tryGetToArrayMethod(TypeSymbol spreadTypeOriginalDefinition, WellKnownType wellKnownType, WellKnownMember wellKnownMember, [NotNullWhen(true)] out MethodSymbol? toArrayMethod) 856private bool TryGetSpanConversion(TypeSymbol type, bool writableOnly, out MethodSymbol? asSpanMethod) 906if (!TryGetSpanConversion(type, writableOnly, out var asSpanMethod)) 916private BoundExpression CallAsSpanMethod(BoundExpression spreadExpression, MethodSymbol? asSpanMethod) 922if (asSpanMethod is MethodSymbol { MethodKind: MethodKind.Constructor } constructor) 926else if (asSpanMethod is MethodSymbol { IsStatic: true, ParameterCount: 1 }) 940private (MethodSymbol spanSliceMethod, BoundExpression spreadElementAsSpan, MethodSymbol getLengthMethod, MethodSymbol copyToMethod)? PrepareCopyToOptimization( 965(MethodSymbol getLengthMethod, MethodSymbol copyToMethod)? getSpanMethodsForSpread( 987MethodSymbol spanSliceMethod, 989MethodSymbol getLengthMethod, 990MethodSymbol copyToMethod) 1036MethodSymbol? setCount = null; 1037MethodSymbol? asSpan = null; 1042setCount = ((MethodSymbol?)_compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_InteropServices_CollectionsMarshal__SetCount_T))?.Construct(typeArguments); 1043asSpan = ((MethodSymbol?)_compilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_InteropServices_CollectionsMarshal__AsSpan_T))?.Construct(typeArguments); 1058var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctorInt32)).AsMember(collectionType); 1082var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctor)).AsMember(collectionType); 1108var spanGetItem = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Span_T__get_Item)).AsMember((NamedTypeSymbol)spanTemp.Type); 1162var addMethod = _factory.WellKnownMethod(WellKnownMember.System_Collections_Generic_List_T__Add).AsMember(collectionType);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (3)
365var accessor = indexer.GetOwnOrInheritedGetMethod() ?? indexer.GetOwnOrInheritedSetMethod(); 916var method = call.Method; 937private static bool IsSpecialMember(MethodSymbol method, SpecialMember specialMember)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (24)
109if (!TryGetWellKnownTypeMember<MethodSymbol>(node.Syntax, WellKnownMember.System_ReadOnlySpan_T__ctor_Array_Start_Length, out MethodSymbol? ctor)) 553MethodSymbol? symbolOpt = oldNodeOpt.SymbolOpt; 566var method = oldNodeOpt.SymbolOpt; 599MethodSymbol createSpan; 633MethodSymbol method = methodDefinition.AsMember(destinationType); 656MethodSymbol implicitOperator = implicitOperatorDefinition.AsMember((NamedTypeSymbol)sourceType); 669MethodSymbol castUpMethod = castUpMethodDefinition.AsMember(destinationType).Construct([sourceElementType]); 690MethodSymbol method = methodDefinition.AsMember(destinationType).Construct([sourceElementType]); 745delegateType.DelegateInvokeMethod() is MethodSymbol delegateInvoke && 1064MethodSymbol ctor = UnsafeGetNullableMethod(syntax, rewrittenType, SpecialMember.System_Nullable_T__ctor); 1080MethodSymbol get_Value = UnsafeGetNullableMethod(syntax, rewrittenOperandType, SpecialMember.System_Nullable_T_get_Value); 1126if (!TryGetSpecialTypeMethod(syntax, DecimalConversionMethod(typeFromUnderlying, typeToUnderlying), out MethodSymbol method)) 1167MethodSymbol getValueOrDefault; 1384MethodSymbol ctor = UnsafeGetNullableMethod(call.Syntax, resultType, SpecialMember.System_Nullable_T__ctor); 1435MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(syntax, boundTemp.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 1497MethodSymbol method; 1730if (!TryGetSpecialTypeMethod(syntax, member, out MethodSymbol method)) 1760var meth = conversion.Method; 1792MethodSymbol method; 1806MethodSymbol method; 1823MethodSymbol method; 1836MethodSymbol method; 1864private Conversion TryMakeUserDefinedConversion(SyntaxNode syntax, MethodSymbol meth, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit)
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (1)
31var method = node.MethodOpt;
Lowering\LocalRewriter\LocalRewriter_Event.cs (7)
56MethodSymbol? method = node.IsAddition ? node.Event.AddMethod : node.Event.RemoveMethod; 117MethodSymbol? clearMethod; 157MethodSymbol? marshalMethod; 250MethodSymbol? getOrCreateMethod; 271MethodSymbol invocationListAccessor = invocationListProperty.GetMethod; 301var ctor = _factory.WellKnownMethod(WellKnownMember.System_Runtime_InteropServices_ComAwareEventInfo__ctor); 305var addRemove = _factory.WellKnownMethod(node.IsAddition ? WellKnownMember.System_Runtime_InteropServices_ComAwareEventInfo__AddEventHandler :
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (3)
312var getPinnableMethod = fixedInitializer.GetPinnableOpt; 476MethodSymbol? offsetMethod; 537MethodSymbol? lengthMethod;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (21)
60else if (node.AwaitOpt is null && CanRewriteForEachAsFor(node.Syntax, nodeExpressionType, out var indexerGet, out var lengthGetter)) 70private bool CanRewriteForEachAsFor(SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet) 83lengthGet = (MethodSymbol?)_factory.WellKnownMember(WellKnownMember.System_Span_T__get_Length, isOptional: true)?.SymbolAsMember(spanType); 84indexerGet = (MethodSymbol?)_factory.WellKnownMember(WellKnownMember.System_Span_T__get_Item, isOptional: true)?.SymbolAsMember(spanType); 89lengthGet = (MethodSymbol?)_factory.WellKnownMember(WellKnownMember.System_ReadOnlySpan_T__get_Length, isOptional: true)?.SymbolAsMember(spanType); 90indexerGet = (MethodSymbol?)_factory.WellKnownMember(WellKnownMember.System_ReadOnlySpan_T__get_Item, isOptional: true)?.SymbolAsMember(spanType); 290private bool TryGetDisposeMethod(SyntaxNode forEachSyntax, ForEachEnumeratorInfo enumeratorInfo, out MethodSymbol disposeMethod) 294disposeMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_IAsyncDisposable__DisposeAsync, _diagnostics, syntax: forEachSyntax); 324MethodSymbol? disposeMethod = enumeratorInfo.PatternDisposeInfo?.Method; // pattern-based 495private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 711private BoundStatement RewriteForEachStatementAsFor(BoundForEachStatement node, MethodSymbol indexerGet, MethodSymbol lengthGet) 715getItem: static (LocalRewriter rewriter, SyntaxNode syntax, ForEachEnumeratorInfo enumeratorInfo, BoundLocal boundArrayVar, BoundLocal boundPositionVar, (MethodSymbol indexerGet, MethodSymbol lengthGet) arg) => 724getLength: static (LocalRewriter rewriter, SyntaxNode syntax, BoundLocal boundArrayVar, (MethodSymbol indexerGet, MethodSymbol lengthGet) arg) => 769MethodSymbol elementRef; 1067MethodSymbol getLowerBoundMethod = UnsafeGetSpecialTypeMethod(forEachSyntax, SpecialMember.System_Array__GetLowerBound); 1068MethodSymbol getUpperBoundMethod = UnsafeGetSpecialTypeMethod(forEachSyntax, SpecialMember.System_Array__GetUpperBound);
Lowering\LocalRewriter\LocalRewriter_FunctionPointerInvocation.cs (1)
22MethodSymbol functionPointer = node.FunctionPointer.Signature;
Lowering\LocalRewriter\LocalRewriter_Index.cs (1)
74if (!TryGetNullableMethod(syntax, targetNullableType, SpecialMember.System_Nullable_T__ctor, out MethodSymbol nullableCtor))
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (11)
156var getMethod = indexer.GetOwnOrInheritedGetMethod(); 215var getItemOrSliceHelper = (MethodSymbol?)_compilation.GetWellKnownTypeMember(node.GetItemOrSliceHelper); 243MethodSymbol createSpan = getCreateSpanHelper(node, spanType: getItemOrSliceHelper.ContainingType, intType: (NamedTypeSymbol)getItemOrSliceHelper.Parameters[0].Type); 321MethodSymbol getCreateSpanHelper(BoundInlineArrayAccess node, NamedTypeSymbol spanType, NamedTypeSymbol intType) 325MethodSymbol createSpan; 338BoundExpression getElementRef(BoundInlineArrayAccess node, BoundExpression rewrittenReceiver, BoundExpression index, MethodSymbol getItemOrSliceHelper, int length) 350MethodSymbol elementRef; 369MethodSymbol elementRef; 392MethodSymbol createSpan = getCreateSpanHelper(node, spanType, intType); 729else if (unloweredExpr is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } &&
Lowering\LocalRewriter\LocalRewriter_Literal.cs (5)
70var curMethod = _factory.CurrentFunction; 131var ctor = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(member); 150var ctor = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(SpecialMember.System_DateTime__CtorInt64);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
105MethodSymbol? exitMethod; 122MethodSymbol? enterMethod;
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (2)
74out var getValueOrDefault)) 82out var hasValue))
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (4)
140TryGetNullableMethod(rewrittenLeft.Syntax, rewrittenLeft.Type, SpecialMember.System_Nullable_T_GetValueOrDefault, out MethodSymbol? getValueOrDefault, isOptional: true)) 147TryGetNullableMethod(rewrittenLeft.Syntax, rewrittenLeft.Type, SpecialMember.System_Nullable_T_GetValueOrDefaultDefaultValue, out MethodSymbol? getValueOrDefaultDefaultValue, isOptional: true)) 199var method = boundCall.Method; 257MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(rewrittenLeft.Syntax, rewrittenLeftType, SpecialMember.System_Nullable_T_GetValueOrDefault);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (5)
35var constructor = node.Constructor; 333MethodSymbol? method; 379var ctor = _factory.WellKnownMethod(WellKnownMember.System_Guid__ctor); 392var getTypeFromCLSID = _factory.WellKnownMethod(WellKnownMember.System_Runtime_InteropServices_Marshal__GetTypeFromCLSID, isOptional: true); 410var createInstance = _factory.WellKnownMethod(WellKnownMember.System_Activator__CreateInstance);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
142MethodSymbol addMethod = initializer.AddMethod;
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (2)
79MethodSymbol? getMethodOpt = null, 91var getMethod = getMethodOpt ?? property.GetOwnOrInheritedGetMethod();
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
95if (!TryGetNullableMethod(node.Syntax, node.Type, SpecialMember.System_Nullable_T__ctor, out MethodSymbol nullableCtor)) 157MethodSymbol constructionMethod,
Lowering\LocalRewriter\LocalRewriter_ReturnStatement.cs (1)
41var method = _factory.CurrentFunction;
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (2)
61if (TryGetWellKnownTypeMember(stackAllocNode.Syntax, WellKnownMember.System_Span_T__ctor_Pointer, out MethodSymbol? spanConstructor)) 63constructorCall = _factory.New((MethodSymbol)spanConstructor.SymbolAsMember(spanType), stackAllocNode, countTemp);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (18)
172var method = boundCall.Method; 374var method = UnsafeGetSpecialTypeMethod(syntax, SpecialMember.System_String__ConcatStringString); 386var method = UnsafeGetSpecialTypeMethod(syntax, SpecialMember.System_String__ConcatStringStringString); 399var method = UnsafeGetSpecialTypeMethod(syntax, SpecialMember.System_String__ConcatStringStringStringString); 410var method = UnsafeGetSpecialTypeMethod(syntax, SpecialMember.System_String__ConcatStringArray); 476if (TryGetSpecialTypeMethod(syntax, concatMember, out MethodSymbol? spanConcat, isOptional: true) && 477tryGetNeededToSpanMembers(this, syntax, needsImplicitConversionFromStringToSpan, charType, out MethodSymbol? readOnlySpanCtorRefParamChar, out MethodSymbol? stringImplicitConversionToReadOnlySpan)) 499[NotNullWhen(true)] out MethodSymbol? readOnlySpanCtorRefParamChar, 500out MethodSymbol? stringImplicitConversionToReadOnlySpan) 505if (self.TryGetSpecialTypeMethod(syntax, SpecialMember.System_ReadOnlySpan_T__ctor_Reference, out MethodSymbol? readOnlySpanCtorRefParamGeneric, isOptional: true) && 527MethodSymbol spanConcat, 528MethodSymbol? stringImplicitConversionToReadOnlySpan, 529MethodSymbol readOnlySpanCtorRefParamChar, 599var method = UnsafeGetSpecialTypeMethod(syntax, member); 658var objectToStringMethod = UnsafeGetSpecialTypeMethod(syntax, SpecialMember.System_Object__ToString); 662MethodSymbol? structToStringMethod = null; 669if (member is MethodSymbol toStringMethod &&
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
225var toStringAndClear = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_Runtime_CompilerServices_DefaultInterpolatedStringHandler__ToStringAndClear, _diagnostics, syntax: syntax);
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (5)
129_factory.WellKnownMember(WellKnownMember.System_Runtime_CompilerServices_SwitchExpressionException__ctorObject, isOptional: true) is MethodSymbol) 131(_factory.WellKnownMember(WellKnownMember.System_Runtime_CompilerServices_SwitchExpressionException__ctor, isOptional: true) is MethodSymbol) 163var throwSwitchExpressionExceptionMethod = module.EnsureThrowSwitchExpressionExceptionExists(diagnosticSyntax, factory, diagnostics); 178var throwSwitchExpressionExceptionMethod = module.EnsureThrowSwitchExpressionExceptionParameterlessExists(diagnosticSyntax, factory, diagnostics); 192var throwMethod = module.EnsureThrowInvalidOperationExceptionExists(diagnosticSyntax, factory, diagnostics);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (6)
57var smallestCtor = (MethodSymbol?)NamedTypeSymbol.GetWellKnownMemberInType(smallestType.OriginalDefinition, 66MethodSymbol smallestConstructor = smallestCtor.AsMember(smallestType); 74var tuple8Ctor = (MethodSymbol?)NamedTypeSymbol.GetWellKnownMemberInType(tuple8Type.OriginalDefinition, 93MethodSymbol constructor = tuple8Ctor.AsMember(underlyingTupleTypeChain.Pop());
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (18)
65MethodSymbol? method, 77MethodSymbol? method, 166method = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(SpecialMember.System_Decimal__op_UnaryNegation); 181MethodSymbol? method, 204MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(syntax, boundTemp.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 245MethodSymbol? method, 353private BoundExpression GetLiftedUnaryOperatorConsequence(UnaryOperatorKind kind, SyntaxNode syntax, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, BoundExpression nonNullOperand) 355MethodSymbol ctor = UnsafeGetNullableMethod(syntax, type, SpecialMember.System_Nullable_T__ctor); 671MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(syntax, type, SpecialMember.System_Nullable_T_GetValueOrDefault); 672MethodSymbol ctor = UnsafeGetNullableMethod(syntax, type, SpecialMember.System_Nullable_T__ctor); 755MethodSymbol ctor = UnsafeGetNullableMethod(node.Syntax, binaryOperandType, SpecialMember.System_Nullable_T__ctor); 807private MethodSymbol GetDecimalIncDecOperator(BinaryOperatorKind oper) 818var method = (MethodSymbol)_compilation.Assembly.GetSpecialTypeMember(member); 827MethodSymbol method = GetDecimalIncDecOperator(oper); 836MethodSymbol method = GetDecimalIncDecOperator(oper); 837MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(syntax, operand.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 838MethodSymbol ctor = UnsafeGetNullableMethod(syntax, operand.Type, SpecialMember.System_Nullable_T__ctor);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (4)
363MethodSymbol getValueOrDefault = UnsafeGetNullableMethod(resourceTypeSyntax, local.Type, SpecialMember.System_Nullable_T_GetValueOrDefault); 445MethodSymbol? disposeMethod = disposeInfo?.Method; 456TryGetWellKnownTypeMember<MethodSymbol>(syntax: null, WellKnownMember.System_IAsyncDisposable__DisposeAsync, out disposeMethod, location: awaitKeyword.GetLocation()); 494MethodSymbol method = methodArgumentInfo.Method;
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (17)
131MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 174MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 237MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 273MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 316MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 343MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 375MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 416MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 445MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 484MethodSymbol argumentInfoFactory = GetArgumentInfoFactory(); 519private MethodSymbol GetArgumentInfoFactory() 532return _factory.Call(null, (MethodSymbol)binderFactory, args.AsImmutableOrNull()); 559MethodSymbol argumentInfoFactory, 612MethodSymbol callSiteFactoryGeneric = _factory.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_CallSite_T__Create); 614MethodSymbol? delegateInvoke; 643var callSiteFactoryMethod = callSiteFactoryGeneric.AsMember(callSiteType); 799MethodSymbol argumentInfoFactory,
Lowering\MethodToClassRewriter.cs (20)
43protected abstract MethodSymbol CurrentMethod { get; } 217var rewrittenMethod = VisitMethodSymbol(node.Method); 231var rewrittenMethodSymbol = VisitMethodSymbol(node.Method); 238Debug.Assert(rewrittenMethodSymbol.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.ForceCompleteIfNeeded) 239== node.Method.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.ForceCompleteIfNeeded)); 323private MethodSymbol GetMethodWrapperForBaseNonVirtualCall(MethodSymbol methodBeingCalled, SyntaxNode syntax) 325var newMethod = GetOrCreateBaseFunctionWrapper(methodBeingCalled, syntax); 345private MethodSymbol GetOrCreateBaseFunctionWrapper(MethodSymbol methodBeingWrapped, SyntaxNode syntax) 349MethodSymbol? wrapper = this.CompilationState.GetMethodWrapper(methodBeingWrapped); 468var getResult = VisitMethodSymbol(node.GetResult); 567MethodSymbol ctor = VisitMethodSymbol(node.Constructor); 588MethodSymbol? method = node.MethodOpt; 616protected MethodSymbol? VisitMethodSymbol(MethodSymbol? method) 638return (MethodSymbol)member; 647return ((MethodSymbol)method.OriginalDefinition) 720MethodSymbol method = VisitMethodSymbol(node.ConversionMethod); 737internal BaseMethodWrapperSymbol(NamedTypeSymbol containingType, MethodSymbol methodBeingWrapped, SyntaxNode syntax, string name)
Lowering\SpillSequenceSpiller.cs (5)
26MethodSymbol method, SyntaxNode syntaxNode, TypeCompilationState compilationState, 232internal static BoundStatement Rewrite(BoundStatement body, MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 1290var hasValueOpt = node.HasValueMethodOpt; 1396var oldCurrentFunction = _F.CurrentFunction; 1405var oldCurrentFunction = _F.CurrentFunction;
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (4)
42private IteratorAndAsyncCaptureWalker(CSharpCompilation compilation, MethodSymbol method, BoundNode node, HashSet<Symbol> initiallyAssignedVariables) 53public static OrderedSet<Symbol> Analyze(CSharpCompilation compilation, MethodSymbol method, BoundNode node, DiagnosticBag diagnostics) 350private readonly MethodSymbol _topLevelMethod; 353public OutsideVariablesUsedInside(IteratorAndAsyncCaptureWalker analyzer, MethodSymbol topLevelMethod, IteratorAndAsyncCaptureWalker parent)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
21internal readonly MethodSymbol OriginalMethod; 102MethodSymbol originalMethod, 186protected override MethodSymbol CurrentMethod
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
97(MethodSymbol)f.ModuleBuilderOpt.GetOrCreateHotReloadExceptionConstructorDefinition(),
Lowering\StateMachineRewriter\StateMachineRewriter.cs (10)
20protected readonly MethodSymbol method; 39MethodSymbol method, 346MethodSymbol methodToImplement, 356protected MethodSymbol OpenPropertyImplementation(MethodSymbol getterToImplement) 361var getter = prop.GetMethod; 368protected SynthesizedImplementationMethod OpenMoveNextMethodImplementation(MethodSymbol methodToImplement) 389MethodSymbol currentManagedThreadIdMethod = currentManagedThreadIdProperty.GetMethod; 402protected SynthesizedImplementationMethod GenerateIteratorGetEnumerator(MethodSymbol getEnumeratorMethod, ref BoundExpression managedThreadId, StateMachineState initialState) 519protected virtual BoundStatement InitializeParameterField(MethodSymbol getEnumeratorMethod, ParameterSymbol parameter, BoundExpression resultParameter, BoundExpression parameterProxy)
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (3)
19public readonly MethodSymbol KickoffMethod; 21public StateMachineTypeSymbol(VariableSlotAllocator slotAllocatorOpt, TypeCompilationState compilationState, MethodSymbol kickoffMethod, int kickoffMethodOrdinal) 28private static string MakeName(VariableSlotAllocator slotAllocatorOpt, TypeCompilationState compilationState, MethodSymbol kickoffMethod, int kickoffMethodOrdinal)
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (4)
26MethodSymbol interfaceMethod, 65public SynthesizedStateMachineMoveNextMethod(MethodSymbol interfaceMethod, StateMachineTypeSymbol stateMachineType) 79var kickoffMethod = StateMachineType.KickoffMethod; 113MethodSymbol interfaceMethod,
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (3)
22MethodSymbol interfacePropertyGetter, 71public override MethodSymbol GetMethod 76public override MethodSymbol SetMethod
Lowering\SynthesizedMethodBaseSymbol.cs (2)
25protected readonly MethodSymbol BaseMethod; 33MethodSymbol baseMethod,
Lowering\SyntheticBoundNodeFactory.cs (45)
64private MethodSymbol? _currentFunction; 65public MethodSymbol? CurrentFunction 83private MethodSymbol? _topLevelMethod; 84public MethodSymbol? TopLevelMethod 103public SyntheticBoundNodeFactory(MethodSymbol topLevelMethod, SyntaxNode node, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics, InstrumentationState? instrumentationState = null) 114public SyntheticBoundNodeFactory(MethodSymbol? topLevelMethodOpt, NamedTypeSymbol? currentClassOpt, SyntaxNode node, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics, InstrumentationState? instrumentationState = null) 275var accessor = property.GetOwnOrInheritedGetMethod(); 283var accessor = property.GetOwnOrInheritedGetMethod(); 333public MethodSymbol? WellKnownMethod(WellKnownMember wm, bool isOptional) 335return (MethodSymbol?)WellKnownMember(wm, isOptional); 338public MethodSymbol WellKnownMethod(WellKnownMember wm) 340return (MethodSymbol)WellKnownMember(wm, isOptional: false)!; 391public MethodSymbol SpecialMethod(SpecialMember sm) 393var result = (MethodSymbol?)SpecialMember(sm, isOptional: false); 398public MethodSymbol? SpecialMethod(SpecialMember sm, bool isOptional) 400return (MethodSymbol?)SpecialMember(sm, isOptional); 624public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 733var ctor = type.InstanceConstructors.Single(c => c.ParameterCount == args.Length); 737public BoundObjectCreationExpression New(MethodSymbol ctor, params BoundExpression[] args) 742var ctor = type.InstanceConstructors.Single(c => c.ParameterCount == args.Length); 746public BoundObjectCreationExpression New(MethodSymbol ctor, ImmutableArray<BoundExpression> args) 749public BoundObjectCreationExpression New(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKinds) 766var ctor = WellKnownMethod(wm); 785public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 795public BoundExpression StaticCall(MethodSymbol method, ImmutableArray<BoundExpression> args) 800MethodSymbol methodSymbol = WellKnownMethod(method); 808MethodSymbol methodSymbol = WellKnownMethod(method); 819MethodSymbol methodSymbol = SpecialMethod(method); 824public BoundCall Call(BoundExpression? receiver, MethodSymbol method) 829public BoundCall Call(BoundExpression? receiver, MethodSymbol method, BoundExpression arg0, bool useStrictArgumentRefKinds = false) 834public BoundCall Call(BoundExpression? receiver, MethodSymbol method, BoundExpression arg0, BoundExpression arg1, bool useStrictArgumentRefKinds = false) 839public BoundCall Call(BoundExpression? receiver, MethodSymbol method, params BoundExpression[] args) 847public BoundCall Call(BoundExpression? receiver, MethodSymbol method, ImmutableArray<BoundExpression> args, bool useStrictArgumentRefKinds = false) 858static ImmutableArray<RefKind> getArgumentRefKinds(MethodSymbol method, bool useStrictArgumentRefKinds) 884public BoundCall Call(BoundExpression? receiver, MethodSymbol method, ImmutableArray<RefKind> refKinds, ImmutableArray<BoundExpression> args) 1188var ctor = baseType.InstanceConstructors.Single(c => c.ParameterCount == 0); 1253MethodSymbol getTypeFromHandle; 1295internal BoundExpression ConstructorInfo(MethodSymbol ctor) 1313public BoundExpression MethodDefIndex(MethodSymbol method) 1395public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo) 1430private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo) 1454private MethodSymbol GetFieldFromHandleMethod(NamedTypeSymbol fieldContainer) 1535MethodSymbol? arrayEmpty = SpecialMethod(CodeAnalysis.SpecialMember.System_Array__Empty, isOptional: true); 1644MethodSymbol? containingMethod = this.CurrentFunction;
Operations\CSharpOperationFactory.cs (9)
442MethodSymbol targetMethod = boundCall.Method; 703MethodSymbol constructor = boundObjectCreationExpression.Constructor; 740MethodSymbol? constructor = boundWithExpression.CloneMethod; 884MethodSymbol? accessor = isObjectOrCollectionInitializer || property.RefKind != RefKind.None 925MethodSymbol addMethod = boundCollectionElementInitializer.AddMethod; 1160private IMethodReferenceOperation CreateBoundMethodGroupSingleMethodOperation(BoundMethodGroup boundMethodGroup, MethodSymbol methodSymbol, bool suppressVirtualCalls) 1238static MethodSymbol? getConstructMethod(CSharpCompilation compilation, BoundCollectionExpression expr) 1363var method = boundCompoundAssignmentOperator.Operator.Method; 1374private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt)
Operations\CSharpOperationFactory_Methods.cs (2)
114private bool IsCallVirtual(MethodSymbol? targetMethod, BoundExpression? receiver) 121private bool IsMethodInvalid(LookupResultKind resultKind, MethodSymbol targetMethod) =>
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (14)
149public MethodSymbol System_Object__Equals 151get { return this.Compilation.GetSpecialTypeMember(SpecialMember.System_Object__Equals) as MethodSymbol; } 154public MethodSymbol System_Object__ToString 156get { return this.Compilation.GetSpecialTypeMember(SpecialMember.System_Object__ToString) as MethodSymbol; } 159public MethodSymbol System_Object__GetHashCode 161get { return this.Compilation.GetSpecialTypeMember(SpecialMember.System_Object__GetHashCode) as MethodSymbol; } 164public MethodSymbol System_Collections_Generic_EqualityComparer_T__Equals 166get { return this.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_EqualityComparer_T__Equals) as MethodSymbol; } 169public MethodSymbol System_Collections_Generic_EqualityComparer_T__GetHashCode 171get { return this.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_EqualityComparer_T__GetHashCode) as MethodSymbol; } 174public MethodSymbol System_Collections_Generic_EqualityComparer_T__get_Default 176get { return this.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_EqualityComparer_T__get_Default) as MethodSymbol; } 179public MethodSymbol System_String__Format_IFormatProvider 181get { return this.Compilation.GetSpecialTypeMember(SpecialMember.System_String__Format_IFormatProvider) as MethodSymbol; }
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (4)
756internal static ImmutableArray<MethodSymbol> GetAnonymousTypeHiddenMethods(NamedTypeSymbol type) 777internal static MethodSymbol TranslateAnonymousTypeMethodSymbol(MethodSymbol method) 787return ((MethodSymbol)member).AsMember(translatedType);
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (4)
279internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 281return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (4)
215private static ImmutableArray<Symbol> CreateMembers(MethodSymbol constructor, MethodSymbol invokeMethod) 218public new MethodSymbol DelegateInvokeMethod 219=> (MethodSymbol)_members[1];
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (2)
146public override MethodSymbol SetMethod 194public override MethodSymbol GetMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (2)
123public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 125get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
31internal readonly ImmutableArray<MethodSymbol> SpecialMembers; 87this.SpecialMembers = ImmutableArray.Create<MethodSymbol>(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (4)
325internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 327return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\ArrayTypeSymbol.cs (4)
487internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 489return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Attributes\AttributeData.cs (1)
37public new abstract MethodSymbol? AttributeConstructor { get; }
Symbols\Attributes\PEAttributeData.cs (3)
23private MethodSymbol? _lazyAttributeConstructor; 43public override MethodSymbol? AttributeConstructor 81MethodSymbol? attributeConstructor;
Symbols\Attributes\RetargetingAttributeData.cs (3)
19private readonly MethodSymbol? _attributeConstructor; 26MethodSymbol? attributeConstructor, 41public override MethodSymbol? AttributeConstructor => _attributeConstructor;
Symbols\Attributes\SourceAttributeData.cs (7)
22private readonly MethodSymbol? _attributeConstructor; 34MethodSymbol? attributeConstructor, 61internal SourceAttributeData(CSharpCompilation compilation, AttributeSyntax attributeSyntax, NamedTypeSymbol attributeClass, MethodSymbol? attributeConstructor, bool hasErrors) 79MethodSymbol? attributeConstructor, 97public override MethodSymbol? AttributeConstructor 224internal static int GetTargetAttributeSignatureIndex(CSharpCompilation compilation, NamedTypeSymbol attributeClass, MethodSymbol? attributeConstructor, AttributeDescription description) 231var ctor = attributeConstructor;
Symbols\Compilation_WellKnownMembers.cs (13)
75/// <see cref="MethodSymbol.AsMember"/> to construct an instantiation. 245internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 251internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 305MethodSymbol method = (MethodSymbol)member; 394var ctorSymbol = (MethodSymbol)Binder.GetWellKnownTypeMember(this, constructor, useSiteInfo: out _, isOptional: true); 441var ctorSymbol = (MethodSymbol)this.GetSpecialTypeMember(constructor); 1061internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1131protected override ImmutableArray<ParameterSymbol> GetParameters(MethodSymbol method) 1151protected override TypeSymbol GetReturnType(MethodSymbol method) 1175protected override bool IsByRefMethod(MethodSymbol method)
Symbols\ConstraintsHelper.cs (7)
345this MethodSymbol containingSymbol, 375this MethodSymbol containingSymbol, 803this MethodSymbol method, 854MethodSymbol method, 865((MethodSymbol)method.OriginalDefinition).TypeParameters, 1492foreach (var constructor in type.InstanceConstructors) 1571public static bool RequiresChecking(MethodSymbol method)
Symbols\ConstructedMethodSymbol.cs (3)
18internal ConstructedMethodSymbol(MethodSymbol constructedFrom, ImmutableArray<TypeWithAnnotations> typeArgumentsWithAnnotations) 20map: new TypeMap(constructedFrom.ContainingType, ((MethodSymbol)constructedFrom.OriginalDefinition).TypeParameters, typeArgumentsWithAnnotations), 21originalDefinition: (MethodSymbol)constructedFrom.OriginalDefinition,
Symbols\DynamicTypeSymbol.cs (4)
252internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 254return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\ErrorMethodSymbol.cs (2)
129public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 131get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\ErrorPropertySymbol.cs (2)
57public override MethodSymbol GetMethod { get { return null; } } 60public override MethodSymbol SetMethod { get { return null; } }
Symbols\ErrorTypeSymbol.cs (4)
562internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 564return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\EventSymbol.cs (3)
63public abstract MethodSymbol? AddMethod { get; } 68public abstract MethodSymbol? RemoveMethod { get; } 162MethodSymbol? accessor = AddMethod ?? RemoveMethod;
Symbols\EventSymbolExtensions.cs (1)
15internal static MethodSymbol GetOwnOrInheritedAccessor(this EventSymbol @event, bool isAdder)
Symbols\ExtendedErrorTypeSymbol.cs (1)
320return ((MethodSymbol)symbol).Arity;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
824public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations => ImmutableArray<MethodSymbol>.Empty;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (4)
220internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 222return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\FunctionTypeSymbol.cs (2)
197internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() => throw ExceptionUtilities.Unreachable();
Symbols\LabelSymbol.cs (3)
139/// It should be the <see cref="MethodSymbol"/> containing the label in its body. 141public virtual MethodSymbol ContainingMethod 151/// It should be the <see cref="MethodSymbol"/> containing the label in its body.
Symbols\MemberSignatureComparer.cs (2)
855return ((MethodSymbol)member).CallingConvention; 866return member.Kind == SymbolKind.Method && ((MethodSymbol)member).IsVararg;
Symbols\MemberSymbolExtensions.cs (39)
38return ((MethodSymbol)member).Parameters; 56return ((MethodSymbol)member).ParameterTypesWithAnnotations; 71return ((MethodSymbol)member).IsVararg; 88return ((MethodSymbol)member).ParameterRefKinds; 103return ((MethodSymbol)member).ParameterCount; 144bool isImplementableAndNotPublic(MethodSymbol accessor) 150public static bool IsImplementable(this MethodSymbol methodOpt) 155public static bool IsAccessor(this MethodSymbol methodSymbol) 162return symbol.Kind == SymbolKind.Method && IsAccessor((MethodSymbol)symbol); 165public static bool IsIndexedPropertyAccessor(this MethodSymbol methodSymbol) 171public static bool IsOperator(this MethodSymbol methodSymbol) 178return symbol.Kind == SymbolKind.Method && IsOperator((MethodSymbol)symbol); 193return symbol.Kind == SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion; 200public static int CustomModifierCount(this MethodSymbol method) 232return ((MethodSymbol)m).CustomModifierCount(); 274return ((MethodSymbol)s).AsMember(newOwner); 294return ((MethodSymbol)symbol).Arity; 327return ((MethodSymbol)symbol).TypeParameters; 345return ((MethodSymbol)symbol).TypeArgumentsWithAnnotations.SelectAsArray(TypeMap.AsTypeSymbol); 358internal static bool IsConstructor(this MethodSymbol method) 373internal static bool HasThisConstructorInitializer(this MethodSymbol method, out ConstructorInitializerSyntax initializerSyntax) 393internal static bool IncludeFieldInitializersInBody(this MethodSymbol methodSymbol) 415foreach (var constructor in type.InstanceConstructors) 438internal static bool IsParameterlessConstructor(this MethodSymbol method) 452internal static bool IsDefaultValueTypeConstructor(this MethodSymbol method) 463internal static bool ShouldEmit(this MethodSymbol method) 493internal static MethodSymbol GetOwnOrInheritedAddMethod(this EventSymbol @event) 497MethodSymbol addMethod = @event.AddMethod; 517internal static MethodSymbol GetOwnOrInheritedRemoveMethod(this EventSymbol @event) 521MethodSymbol removeMethod = @event.RemoveMethod; 538return ((MethodSymbol)member).IsExplicitInterfaceImplementation; 580var method = (MethodSymbol)member; 597return ((MethodSymbol)member).ExplicitInterfaceImplementations.Cast<MethodSymbol, Symbol>(); 612return ((MethodSymbol)member).OverriddenMethod; 627var method = (MethodSymbol)member; 663member = ((MethodSymbol)member).AssociatedSymbol ?? member;
Symbols\MergedNamespaceSymbol.cs (1)
295internal override void GetExtensionMethods(ArrayBuilder<MethodSymbol> methods, string name, int arity, LookupOptions options)
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (5)
197private static MethodSymbol FindMethodBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, SignatureHeader targetMemberSignatureHeader, int targetMemberTypeParamCount, ParamInfo<TypeSymbol>[] targetParamInfo) 201var method = member as MethodSymbol; 216private static bool MethodSymbolMatchesParamInfo(MethodSymbol candidateMethod, ParamInfo<TypeSymbol>[] targetParamInfo) 275private static bool ReturnTypesMatch(MethodSymbol candidateMethod, TypeMap candidateMethodTypeMap, ref ParamInfo<TypeSymbol> targetReturnParam)
Symbols\Metadata\PE\MetadataDecoder.cs (4)
21internal class MetadataDecoder : MetadataDecoder<PEModuleSymbol, TypeSymbol, MethodSymbol, FieldSymbol, Symbol> 488protected override MethodSymbol FindMethodSymbolInType(TypeSymbol typeSymbol, MethodDefinitionHandle targetMethodDef) 509return (MethodSymbol)memberRefDecoder.FindMember(targetMethodDef, methodsOnly: true); 602protected override MethodDefinitionHandle GetMethodHandle(MethodSymbol method)
Symbols\Metadata\PE\PEEventSymbol.cs (2)
334public override MethodSymbol AddMethod 339public override MethodSymbol RemoveMethod
Symbols\Metadata\PE\PEMethodSymbol.cs (8)
316public MethodSymbol _lazyExplicitClassOverride; 389private ImmutableArray<MethodSymbol> _lazyExplicitMethodImplementations; 1292public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 1334var explicitInterfaceImplementationsBuilder = ArrayBuilder<MethodSymbol>.GetInstance(); 1345MethodSymbol uniqueClassOverride = null; 1346foreach (MethodSymbol method in explicitlyOverriddenMethods) 1380internal MethodSymbol ExplicitlyOverriddenClassMethod 1610static (name, value, isField) => MethodSymbol.TryDecodeUnmanagedCallersOnlyCallConvsField(name, value, isField, location: null, diagnostics: null));
Symbols\Metadata\PE\PENamedTypeSymbol.cs (8)
1061internal override IEnumerable<MethodSymbol> GetMethodsToEmit() 1077var method = (MethodSymbol)members[index]; 1347foreach (MethodSymbol method in nonFieldMembers) 2476internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 2478return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
885case "" when !ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke }:
Symbols\Metadata\PE\PEPropertySymbol.cs (4)
488MethodSymbol getMethod = curr.GetMethod; 500MethodSymbol setMethod = curr.SetMethod; 695public override MethodSymbol GetMethod 700public override MethodSymbol SetMethod
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
670bool inherited = (_containingSymbol.Kind == SymbolKind.Method) && ((MethodSymbol)_containingSymbol).IsOverride;
Symbols\MethodSymbol.cs (30)
28internal const MethodSymbol None = null; 45public new virtual MethodSymbol OriginalDefinition 293/// True if this <see cref="MethodSymbol"/> type supports retrieving the this parameter 330public virtual MethodSymbol ConstructedFrom 378public abstract ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations { get; } 414internal MethodSymbol GetLeastOverriddenMethod(NamedTypeSymbol accessingTypeOpt) 425private MethodSymbol GetLeastOverriddenMethodCore(NamedTypeSymbol accessingTypeOpt, bool requireSameReturnType) 428MethodSymbol m = this; 451MethodSymbol overridden = m.OverriddenMethod; 473internal MethodSymbol GetConstructedLeastOverriddenMethod(NamedTypeSymbol accessingTypeOpt, bool requireSameReturnType) 475var m = this.ConstructedFrom.GetLeastOverriddenMethodCore(accessingTypeOpt, requireSameReturnType); 487public MethodSymbol OverriddenMethod 495return (MethodSymbol)OverriddenOrHiddenMembers.GetOverriddenMember(); 498return (MethodSymbol)OverriddenOrHiddenMembersResult.GetOverriddenMember(this, OriginalDefinition.OverriddenMethod); 537var overriddenMethod = this.OverriddenMethod; 575var overriddenMethod = this.OverriddenMethod; 738public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation) 750public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation, out bool wasFullyInferred) 770public MethodSymbol ReduceExtensionMethod() 779internal virtual MethodSymbol CallsiteReducedFromMethod 789public virtual MethodSymbol PartialImplementationPart 798public virtual MethodSymbol PartialDefinitionPart 807public virtual MethodSymbol ReducedFrom 841public MethodSymbol Construct(params TypeSymbol[] typeArguments) 852public MethodSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 857internal MethodSymbol Construct(ImmutableArray<TypeWithAnnotations> typeArguments) 887internal MethodSymbol AsMember(NamedTypeSymbol newOwner) 1055static bool isGenericMethod([DisallowNull] MethodSymbol? method) 1064method = method.ContainingSymbol as MethodSymbol; 1269protected static void AddRequiredMembersMarkerAttributes(ref ArrayBuilder<SynthesizedAttributeData> attributes, MethodSymbol methodToAttribute)
Symbols\MethodSymbolExtensions.cs (16)
16public static bool IsParams(this MethodSymbol method) 21internal static bool IsSynthesizedLambda(this MethodSymbol method) 39public static bool IsRuntimeFinalizer(this MethodSymbol method, bool skipFirstMethodKindCheck = false) 46method.ParameterCount != 0 || method.Arity != 0 || !method.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.IgnoreInterfaceImplementationChanges)) 84public static MethodSymbol ConstructIfGeneric(this MethodSymbol method, ImmutableArray<TypeWithAnnotations> typeArguments) 95public static bool CanBeHiddenByMemberKind(this MethodSymbol hiddenMethod, SymbolKind hidingMemberKind) 124private static bool CanBeHiddenByMethodPropertyOrType(MethodSymbol method) 149public static bool IsAsyncReturningVoid(this MethodSymbol method) 157public static bool IsAsyncEffectivelyReturningTask(this MethodSymbol method, CSharpCompilation compilation) 167public static bool IsAsyncEffectivelyReturningGenericTask(this MethodSymbol method, CSharpCompilation compilation) 177public static bool IsAsyncReturningIAsyncEnumerable(this MethodSymbol method, CSharpCompilation compilation) 186public static bool IsAsyncReturningIAsyncEnumerator(this MethodSymbol method, CSharpCompilation compilation) 192internal static CSharpSyntaxNode ExtractReturnTypeSyntax(this MethodSymbol method) 216internal static bool IsValidUnscopedRefAttributeTarget(this MethodSymbol method) 225internal static bool HasUnscopedRefAttributeOnMethodOrProperty(this MethodSymbol? method)
Symbols\NamedTypeSymbol.cs (18)
175public MethodSymbol? DelegateInvokeMethod 190var method = methods[0] as MethodSymbol; 209internal void AddOperators(string name, ArrayBuilder<MethodSymbol> operators) 217if (candidate is MethodSymbol { MethodKind: MethodKind.UserDefinedOperator or MethodKind.Conversion } method) 227public ImmutableArray<MethodSymbol> InstanceConstructors 238public ImmutableArray<MethodSymbol> StaticConstructors 249public ImmutableArray<MethodSymbol> Constructors 257private ImmutableArray<MethodSymbol> GetConstructors(bool includeInstance, bool includeStatic) 270return ImmutableArray<MethodSymbol>.Empty; 273ArrayBuilder<MethodSymbol> constructors = ArrayBuilder<MethodSymbol>.GetInstance(); 276if (candidate is MethodSymbol method) 284if (candidate is MethodSymbol method) 334internal void GetExtensionMethods(ArrayBuilder<MethodSymbol> methods, string nameOpt, int arity, LookupOptions options) 342internal void DoGetExtensionMethods(ArrayBuilder<MethodSymbol> methods, string nameOpt, int arity, LookupOptions options) 352var method = (MethodSymbol)member;
Symbols\NamespaceSymbol.cs (1)
333internal virtual void GetExtensionMethods(ArrayBuilder<MethodSymbol> methods, string nameOpt, int arity, LookupOptions options)
Symbols\NativeIntegerTypeSymbol.cs (12)
89case MethodSymbol underlyingMethod: 274internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 276return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>(); 334internal NativeIntegerMethodSymbol(NativeIntegerTypeSymbol container, MethodSymbol underlyingMethod, NativeIntegerPropertySymbol? associatedSymbol) 345public override MethodSymbol UnderlyingMethod { get; } 366public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations => ImmutableArray<MethodSymbol>.Empty; 458Func<NativeIntegerTypeSymbol, NativeIntegerPropertySymbol, MethodSymbol?, NativeIntegerMethodSymbol?> getAccessor) : 476public override MethodSymbol? GetMethod { get; } 478public override MethodSymbol? SetMethod { get; }
Symbols\ObsoleteAttributeHelpers.cs (1)
87symbol = ((MethodSymbol)symbol).AssociatedSymbol;
Symbols\OverriddenOrHiddenMembersHelpers.cs (36)
24internal static OverriddenOrHiddenMembersResult MakeOverriddenOrHiddenMembers(this MethodSymbol member) 96MethodSymbol accessor = member as MethodSymbol; 153MethodSymbol method => KnownOverriddenClassMethod(method), 197private static MethodSymbol KnownOverriddenClassMethod(MethodSymbol method) => 241private static OverriddenOrHiddenMembersResult MakePropertyAccessorOverriddenOrHiddenMembers(MethodSymbol accessor, PropertySymbol associatedProperty) 248MethodSymbol overriddenAccessor = null; 260MethodSymbol correspondingAccessor = accessorIsGetter ? propertyHiddenByProperty.GetMethod : propertyHiddenByProperty.SetMethod; 272MethodSymbol correspondingAccessor = accessorIsGetter ? 294bool isAccessorOverride(MethodSymbol accessor, MethodSymbol overriddenAccessor) 333private static OverriddenOrHiddenMembersResult MakeEventAccessorOverriddenOrHiddenMembers(MethodSymbol accessor, EventSymbol associatedEvent) 340MethodSymbol overriddenAccessor = null; 352MethodSymbol correspondingAccessor = accessorIsAdder ? eventHiddenByEvent.AddMethod : eventHiddenByEvent.RemoveMethod; 364MethodSymbol correspondingAccessor = eventOverriddenByEvent.GetOwnOrInheritedAccessor(accessorIsAdder); 568else if (otherMember.IsAccessor() && !((MethodSymbol)otherMember).IsIndexedPropertyAccessor()) 756if (hiddenMember.Kind != SymbolKind.Method || ((MethodSymbol)hiddenMember).CanBeHiddenByMemberKind(hidingMemberKind)) 880MethodSymbol methodSymbol = (MethodSymbol)member; 881return MethodSymbol.CanOverrideOrHide(methodSymbol.MethodKind) && ReferenceEquals(methodSymbol, methodSymbol.ConstructedFrom); 892MethodSymbol method = (MethodSymbol)member; 914MethodSymbol method = (MethodSymbol)member; 931internal static bool RequiresExplicitOverride(this MethodSymbol method, out bool warnAmbiguous) 937MethodSymbol csharpOverriddenMethod = method.OverriddenMethod; 941MethodSymbol runtimeOverriddenMethod = method.GetFirstRuntimeOverriddenMethodIgnoringNewSlot(out bool wasAmbiguous); 989internal static bool MethodHasRuntimeCollision(this MethodSymbol method) 1013internal static MethodSymbol GetFirstRuntimeOverriddenMethodIgnoringNewSlot(this MethodSymbol method, out bool wasAmbiguous) 1019const MethodSymbol.IsMetadataVirtualOption ignoreInterfaceImplementationChanges = MethodSymbol.IsMetadataVirtualOption.IgnoreInterfaceImplementationChanges; 1031MethodSymbol candidate = null; 1038MethodSymbol overridden = (MethodSymbol)otherMember;
Symbols\PointerTypeSymbol.cs (4)
314internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 316return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\PropertyOrEventSymbolExtensions.cs (7)
21internal static ISet<PropertySymbol> GetPropertiesForExplicitlyImplementedAccessor(MethodSymbol accessor) 26internal static ISet<EventSymbol> GetEventsForExplicitlyImplementedAccessor(MethodSymbol accessor) 32private static ISet<T> GetSymbolsForExplicitlyImplementedAccessor<T>(MethodSymbol accessor) where T : Symbol 39ImmutableArray<MethodSymbol> implementedAccessors = accessor.ExplicitInterfaceImplementations; 46foreach (var implementedAccessor in implementedAccessors) 60internal static Accessibility GetDeclaredAccessibilityFromAccessors(MethodSymbol accessor1, MethodSymbol accessor2)
Symbols\PropertySymbol.cs (3)
205public abstract MethodSymbol GetMethod 213public abstract MethodSymbol SetMethod 257MethodSymbol accessor = GetMethod ?? SetMethod;
Symbols\PropertySymbolExtensions.cs (4)
22public static MethodSymbol? GetOwnOrInheritedGetMethod(this PropertySymbol? property) 26MethodSymbol getMethod = property.GetMethod; 42public static MethodSymbol? GetOwnOrInheritedSetMethod(this PropertySymbol? property) 46MethodSymbol setMethod = property.SetMethod;
Symbols\PublicModel\MethodSymbol.cs (3)
18private readonly Symbols.MethodSymbol _underlying; 24public MethodSymbol(Symbols.MethodSymbol underlying) 31internal Symbols.MethodSymbol UnderlyingMethodSymbol => _underlying;
Symbols\ReducedExtensionMethodSymbol.cs (15)
24private readonly MethodSymbol _reducedFrom; 37public static MethodSymbol Create(MethodSymbol method, TypeSymbol receiverType, CSharpCompilation compilation, out bool wasFullyInferred) 72public static MethodSymbol Create(MethodSymbol method) 77var constructedFrom = method.ConstructedFrom; 91private ReducedExtensionMethodSymbol(MethodSymbol reducedFrom) 112internal static MethodSymbol InferExtensionMethodTypeArguments(MethodSymbol method, TypeSymbol thisType, CSharpCompilation compilation, 241internal override MethodSymbol CallsiteReducedFromMethod 272public override MethodSymbol ReducedFrom 277public override MethodSymbol ConstructedFrom 376public override MethodSymbol OriginalDefinition 541public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 543get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Retargeting\RetargetingEventSymbol.cs (2)
57public override MethodSymbol? AddMethod 67public override MethodSymbol? RemoveMethod
Symbols\Retargeting\RetargetingMethodSymbol.cs (10)
34private readonly MethodSymbol _underlyingMethod; 52private ImmutableArray<MethodSymbol> _lazyExplicitInterfaceImplementations; 59public RetargetingMethodSymbol(RetargetingModuleSymbol retargetingModule, MethodSymbol underlyingMethod) 85public override MethodSymbol UnderlyingMethod 295public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 304default(ImmutableArray<MethodSymbol>)); 310private ImmutableArray<MethodSymbol> RetargetExplicitInterfaceImplementations() 321var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 325var retargeted = this.RetargetingTranslator.Retarget(impls[i], MemberSignatureComparer.RetargetedExplicitImplementationComparer); 338internal MethodSymbol ExplicitlyOverriddenClassMethod
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (8)
143internal override IEnumerable<MethodSymbol> GetMethodsToEmit() 147foreach (MethodSymbol method in _underlyingType.GetMethodsToEmit()) 398internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 400foreach ((MethodSymbol body, MethodSymbol implemented) in _underlyingType.SynthesizedInterfaceMethodImpls()) 402var newBody = this.RetargetingTranslator.Retarget(body, MemberSignatureComparer.RetargetedExplicitImplementationComparer); 403var newImplemented = this.RetargetingTranslator.Retarget(implemented, MemberSignatureComparer.RetargetedExplicitImplementationComparer);
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (2)
234internal override void GetExtensionMethods(ArrayBuilder<MethodSymbol> methods, string nameOpt, int arity, LookupOptions options) 236var underlyingMethods = ArrayBuilder<MethodSymbol>.GetInstance();
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
123public override MethodSymbol GetMethod 133public override MethodSymbol SetMethod
Symbols\Retargeting\RetargetingSymbolTranslator.cs (25)
45return new RetargetingMethodSymbol(this, (MethodSymbol)symbol); 874public MethodSymbol Retarget(MethodSymbol method) 879return (MethodSymbol)this.SymbolMap.GetOrAdd(method, _retargetingModule._createRetargetingMethod); 882public MethodSymbol Retarget(MethodSymbol method, IEqualityComparer<MethodSymbol> retargetedMethodComparer) 903var retargetedDefinition = Retarget(method.OriginalDefinition, retargetedMethodComparer); 964private MethodSymbol FindMethodInRetargetedType(MethodSymbol method, NamedTypeSymbol retargetedType, IEqualityComparer<MethodSymbol> retargetedMethodComparer) 972private readonly MethodSymbol _toFind; 974private RetargetedTypeMethodFinder(RetargetingModuleSymbol retargetingModule, NamedTypeSymbol retargetedType, MethodSymbol toFind) : 981public static MethodSymbol Find(RetargetingSymbolTranslator translator, MethodSymbol method, NamedTypeSymbol retargetedType, IEqualityComparer<MethodSymbol> retargetedMethodComparer) 994private static MethodSymbol FindWorker 997MethodSymbol method, 999IEqualityComparer<MethodSymbol> retargetedMethodComparer 1027ImmutableArray<MethodSymbol>.Empty); 1033var retargetedMethod = (MethodSymbol)retargetedMember; 1158MethodSymbol oldAttributeCtor = oldAttributeData.AttributeConstructor; 1159MethodSymbol newAttributeCtor = (object)oldAttributeCtor == null ? 1349public override Symbol VisitMethod(MethodSymbol symbol, RetargetOptions options)
Symbols\SignatureOnlyMethodSymbol.cs (3)
32private readonly ImmutableArray<MethodSymbol> _explicitInterfaceImplementations; 46ImmutableArray<MethodSymbol> explicitInterfaceImplementations) 89public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations { get { return _explicitInterfaceImplementations; } }
Symbols\SignatureOnlyPropertySymbol.cs (2)
100public override MethodSymbol SetMethod { get { throw ExceptionUtilities.Unreachable(); } } 102public override MethodSymbol GetMethod { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\CustomModifierUtils.cs (3)
22MethodSymbol sourceMethod, 23MethodSymbol destinationMethod, 40MethodSymbol constructedSourceMethod = sourceMethod.ConstructIfGeneric(destinationMethod.TypeArgumentsWithAnnotations);
Symbols\Source\ExplicitInterfaceHelpers.cs (7)
95public static string GetMethodNameWithoutInterfaceName(this MethodSymbol method) 144internal static MethodSymbol FindExplicitlyImplementedMethod( 145this MethodSymbol implementingMethod, 152return (MethodSymbol)FindExplicitlyImplementedMember(implementingMethod, isOperator, explicitInterfaceType, interfaceMethodName, explicitInterfaceSpecifierSyntax, diagnostics); 262if (interfaceMember is MethodSymbol interfaceMethod && 273if (interfaceMember.IsAccessor() && !((MethodSymbol)interfaceMember).IsIndexedPropertyAccessor()) 329void checkAccessorIsAccessibleIfImplementable(MethodSymbol accessor)
Symbols\Source\LambdaSymbol.cs (2)
177public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 179get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Source\LocalFunctionSymbol.cs (2)
335public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations => ImmutableArray<MethodSymbol>.Empty;
Symbols\Source\ParameterHelpers.cs (5)
206var methodOwner = owner as MethodSymbol; 905internal static MethodSymbol FindContainingGenericMethod(Symbol symbol) 911MethodSymbol method = (MethodSymbol)current;
Symbols\Source\SourceComplexParameterSymbol.cs (9)
1234else if (this.ContainingSymbol is MethodSymbol method && 1351if (!ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke or MethodKind.LambdaMethod }) 1584if (!binder.HasCollectionExpressionApplicableConstructor(syntax, Type, out MethodSymbol? constructor, isExpanded: out _, diagnostics, isParamsModifierValidation: true)) 1594if (!binder.HasCollectionExpressionApplicableAddMethod(syntax, Type, out ImmutableArray<MethodSymbol> addMethods, diagnostics)) 1608MethodSymbol? reportAsLessVisible = null; 1610foreach (var addMethod in addMethods) 1643MethodSymbol? collectionBuilderMethod = binder.GetAndValidateCollectionBuilderMethod(syntax, (NamedTypeSymbol)Type, diagnostics, elementType: out _); 1665bool isAtLeastAsVisible(ParameterSyntax syntax, Binder binder, MethodSymbol method, BindingDiagnosticBag diagnostics) 1676void checkIsAtLeastAsVisible(ParameterSyntax syntax, Binder binder, MethodSymbol method, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceCustomEventSymbol.cs (2)
183public override MethodSymbol? AddMethod 188public override MethodSymbol? RemoveMethod
Symbols\Source\SourceEventAccessorSymbol.cs (8)
19private readonly ImmutableArray<MethodSymbol> _explicitInterfaceImplementations; 52ImmutableArray<MethodSymbol> explicitInterfaceImplementations; 56explicitInterfaceImplementations = ImmutableArray<MethodSymbol>.Empty; 60MethodSymbol implementedAccessor = isAdder ? explicitlyImplementedEventOpt.AddMethod : explicitlyImplementedEventOpt.RemoveMethod; 64explicitInterfaceImplementations = (object)implementedAccessor == null ? ImmutableArray<MethodSymbol>.Empty : ImmutableArray.Create<MethodSymbol>(implementedAccessor); 81public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 224MethodSymbol overriddenAccessor = overriddenEvent.GetOwnOrInheritedAccessor(isAdder);
Symbols\Source\SourceEventSymbol.cs (4)
85public abstract override MethodSymbol? AddMethod { get; } 87public abstract override MethodSymbol? RemoveMethod { get; } 776private void CheckExplicitImplementationAccessor(MethodSymbol? thisAccessor, MethodSymbol? otherAccessor, EventSymbol explicitlyImplementedEvent, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceFieldLikeEventSymbol.cs (2)
147public override MethodSymbol AddMethod 152public override MethodSymbol RemoveMethod
Symbols\Source\SourceFixedFieldSymbol.cs (2)
152private readonly MethodSymbol _constructor; 173internal override MethodSymbol Constructor
Symbols\Source\SourceLabelSymbol.cs (4)
15private readonly MethodSymbol _containingMethod; 27MethodSymbol containingMethod, 69MethodSymbol containingMethod, 107public override MethodSymbol ContainingMethod
Symbols\Source\SourceLocalSymbol.cs (1)
109MethodSymbol containingMethod,
Symbols\Source\SourceMemberContainerSymbol.cs (71)
1592WhereAsArray(s => !s.IsIndexer() && (!s.IsAccessor() || ((MethodSymbol)s).AssociatedSymbol?.IsIndexer() != true))); 2448if (member.Kind != SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor) 2497var ops1 = ArrayBuilder<MethodSymbol>.GetInstance(); 2502var ops2 = ArrayBuilder<MethodSymbol>.GetInstance(); 2510var ops2 = ArrayBuilder<MethodSymbol>.GetInstance(); 2520static void reportOperatorNeedsMatch(BindingDiagnosticBag diagnostics, string operatorName2, MethodSymbol op1) 2527static void reportCheckedOperatorNeedsMatch(BindingDiagnosticBag diagnostics, string operatorName2, MethodSymbol op1) 2535ArrayBuilder<MethodSymbol> ops1, 2536ArrayBuilder<MethodSymbol> ops2, 2538Action<BindingDiagnosticBag, string, MethodSymbol> reportMatchNotFoundError) 2559internal static bool DoOperatorsPair(MethodSymbol op1, MethodSymbol op2) 2597var ops = ArrayBuilder<MethodSymbol>.GetInstance(); 2652if (member is not MethodSymbol method || !method.ShouldCheckRequiredMembers()) 2679foreach (var method in this.GetMembers(name).OfType<MethodSymbol>()) 3399!(member is MethodSymbol method && MethodCompiler.GetMethodToCompile(method) is SourceMemberMethodSymbol sourceMethod)) 3699(prevMethod.IsPartialImplementation || (prevMethod.OtherPartOfPartial is MethodSymbol otherImplementation && (object)otherImplementation != currentMethod))) 3705(prevMethod.IsPartialDefinition || (prevMethod.OtherPartOfPartial is MethodSymbol otherDefinition && (object)otherDefinition != currentMethod))) 3853MethodSymbol accessor = getNotSet ? propertySymbol.GetMethod : propertySymbol.SetMethod; 3878var methodSymbol = (MethodSymbol)symbol; 3914var methodSymbol = (MethodSymbol)symbol; 4067var meth = (MethodSymbol)member; 4113var m = s as MethodSymbol; 4158if (hasInitializers && !builder.NonTypeMembers.Any(member => member is MethodSymbol { MethodKind: MethodKind.Constructor })) 4210case MethodSymbol { MethodKind: not (MethodKind.Ordinary or MethodKind.Constructor) }: 4261var thisEquals = addThisEquals(equalityContract); 4269var getHashCode = addGetHashCode(equalityContract); 4277var printMembers = addPrintMembersMethod(membersSoFar); 4315ImmutableArray<MethodSymbol>.Empty); 4323var deconstruct = (MethodSymbol)existingDeconstructMethod; 4363ImmutableArray<MethodSymbol>.Empty); 4377var constructor = (MethodSymbol)existingConstructor; 4392MethodSymbol addPrintMembersMethod(IEnumerable<Symbol> userDefinedMembers) 4411explicitInterfaceImplementations: ImmutableArray<MethodSymbol>.Empty); 4413MethodSymbol printMembersMethod; 4421printMembersMethod = (MethodSymbol)existingPrintMembersMethod; 4452void addToStringMethod(MethodSymbol printMethod) 4466explicitInterfaceImplementations: ImmutableArray<MethodSymbol>.Empty); 4468var baseToStringMethod = getBaseToStringMethod(); 4495var toStringMethod = (MethodSymbol)existingToStringMethod; 4506MethodSymbol? getBaseToStringMethod() 4514if (member is not MethodSymbol method) 4621void addObjectEquals(MethodSymbol thisEquals) 4626MethodSymbol addGetHashCode(PropertySymbol? equalityContract) 4640ImmutableArray<MethodSymbol>.Empty); 4642MethodSymbol getHashCode; 4651getHashCode = (MethodSymbol)existingHashCodeMethod; 4719MethodSymbol addThisEquals(PropertySymbol? equalityContract) 4739ImmutableArray<MethodSymbol>.Empty); 4741MethodSymbol thisEquals; 4750thisEquals = (MethodSymbol)existingEqualsMethod; 4813var method = (MethodSymbol)member; 5269private void AddAccessorIfAvailable(ArrayBuilder<Symbol> symbols, MethodSymbol? accessorOpt) 5425if (member is MethodSymbol { MethodKind: MethodKind.Ordinary }) 5441ImmutableArray<(MethodSymbol Body, MethodSymbol Implemented)>.Empty); 5444public readonly ImmutableArray<(MethodSymbol Body, MethodSymbol Implemented)> MethodImpls; 5448ImmutableArray<(MethodSymbol Body, MethodSymbol Implemented)> methodImpls) 5456ImmutableArray<(MethodSymbol Body, MethodSymbol Implemented)> methodImpls)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (60)
18internal delegate void ReportMismatchInReturnType<TArg>(BindingDiagnosticBag bag, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, bool topLevel, TArg arg); 19internal delegate void ReportMismatchInParameterType<TArg>(BindingDiagnosticBag bag, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, ParameterSymbol parameter, bool topLevel, TArg arg); 73internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 115var methodImpls = ArrayBuilder<(MethodSymbol Body, MethodSymbol Implemented)>.GetInstance(); 237var associatedPropertyOrEvent = interfaceMemberKind == SymbolKind.Method ? ((MethodSymbol)interfaceMember).AssociatedSymbol : null; 535var method = (MethodSymbol)member; 536if (MethodSymbol.CanOverrideOrHide(method.MethodKind) && !method.IsAccessor()) 557MethodSymbol overridden = method.GetFirstRuntimeOverriddenMethodIgnoringNewSlot(out _); 571var getMethod = property.GetMethod; 572var setMethod = property.SetMethod; 612var addMethod = @event.AddMethod; 613var removeMethod = @event.RemoveMethod; 703if (hiddenMember.Kind == SymbolKind.Method && !((MethodSymbol)hiddenMember).CanBeHiddenByMemberKind(symbol.Kind)) 781associatedPropertyOrEvent = ((MethodSymbol)overridingMember).AssociatedSymbol; 790? ((MethodSymbol)overridingMember).ParameterTypesWithAnnotations 854if (!this.ContainingAssembly.RuntimeSupportsCovariantReturnsOfClasses && overridingMember is MethodSymbol overridingMethod) 859var ambiguousMethod = overridingMethod.OverriddenMethod; 891!(overridingMemberIsMethod && ((MethodSymbol)overriddenMember).MethodKind == MethodKind.Destructor)) //destructors are metadata virtual 978var overridingMethod = (MethodSymbol)overridingMember; 979var overriddenMethod = (MethodSymbol)overriddenMember; 1097MethodSymbol overriddenGetMethod = overriddenProperty.GetOwnOrInheritedGetMethod(); 1107var ownOrInheritedOverriddenSetMethod = overriddenProperty.GetOwnOrInheritedSetMethod(); 1128MethodSymbol ownOrInheritedGetMethod = overridingProperty.GetOwnOrInheritedGetMethod(); 1135MethodSymbol ownOrInheritedSetMethod = overridingProperty.GetOwnOrInheritedSetMethod(); 1148MethodSymbol overriddenMethod, 1149MethodSymbol overridingMethod, 1217(BindingDiagnosticBag diagnostics, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, bool topLevel, Location location) 1224(BindingDiagnosticBag diagnostics, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, ParameterSymbol overridingParameter, bool topLevel, Location location) 1235MethodSymbol baseMethod, 1236MethodSymbol overrideMethod, 1376internal static bool RequiresValidScopedOverrideForRefSafety(MethodSymbol? method) 1422internal static bool ReportInvalidScopedOverrideAsError(MethodSymbol baseMethod, MethodSymbol overrideMethod) 1433MethodSymbol? baseMethod, 1434MethodSymbol? overrideMethod, 1486MethodSymbol? baseMethod, 1487MethodSymbol? overrideMethod, 1614if (hidingMember is MethodSymbol hidingMethod && hiddenMembers[0] is MethodSymbol hiddenMethod) 1674var associatedPropertyOrEvent = ((MethodSymbol)hidingMember).AssociatedSymbol; 1792private (SynthesizedExplicitImplementationForwardingMethod? ForwardingMethod, (MethodSymbol Body, MethodSymbol Implemented)? MethodImpl) 1811MethodSymbol interfaceMethod = (MethodSymbol)interfaceMember; 1812MethodSymbol implementingMethod = (MethodSymbol)implementingMember; 1822MethodSymbol implementingMethodOriginalDefinition = implementingMethod.OriginalDefinition; 1841else if (implementingMethod.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.IgnoreInterfaceImplementationChanges)) 1894private static bool IsPossibleImplementationUnderRuntimeRules(MethodSymbol implementingMethod, NamedTypeSymbol @interface) 1918private static bool IsOverrideOfPossibleImplementationUnderRuntimeRules(MethodSymbol implementingMethod, NamedTypeSymbol @interface) 1920MethodSymbol curr = implementingMethod;
Symbols\Source\SourceMemberMethodSymbol.cs (2)
828public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 832return ImmutableArray<MethodSymbol>.Empty;
Symbols\Source\SourceMethodSymbol.cs (2)
21/// array of types, indexed by the constrained type parameter in <see cref="MethodSymbol.TypeParameters"/>. 27/// array of kinds, indexed by the constrained type parameter in <see cref="MethodSymbol.TypeParameters"/>.
Symbols\Source\SourceMethodSymbolWithAttributes.cs (4)
826var implementationPart = this.PartialImplementationPart ?? this; 834for (MethodSymbol? current = this; current is object; current = current.ContainingSymbol as MethodSymbol) 1605static bool isBadAsyncReturn(MethodSymbol methodSymbol)
Symbols\Source\SourceNamedTypeSymbol.cs (3)
1800&& !GetMembers().All(m => m is not MethodSymbol { MethodKind: MethodKind.Constructor, ObsoleteKind: ObsoleteAttributeKind.None } method 1854foreach (var slice in GetMembers(WellKnownMemberNames.SliceMethodName).OfType<MethodSymbol>())
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (8)
19private ImmutableArray<MethodSymbol> _lazyExplicitInterfaceImplementations; 40protected MethodSymbol? MethodChecks(TypeWithAnnotations returnType, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics) 87MethodSymbol? overriddenOrExplicitlyImplementedMethod = null; 95_lazyExplicitInterfaceImplementations = ImmutableArray<MethodSymbol>.Empty; 133_lazyExplicitInterfaceImplementations = ImmutableArray.Create<MethodSymbol>(overriddenOrExplicitlyImplementedMethod); 144_lazyExplicitInterfaceImplementations = ImmutableArray<MethodSymbol>.Empty; 155protected abstract MethodSymbol? FindExplicitlyImplementedMethod(BindingDiagnosticBag diagnostics); 202public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations
Symbols\Source\SourceOrdinaryMethodSymbol.cs (6)
354public sealed override MethodSymbol PartialDefinitionPart 362public sealed override MethodSymbol PartialImplementationPart 478MethodSymbol constructedDefinition = definition.ConstructIfGeneric(TypeMap.TypeParametersAsTypeSymbolsWithIgnoredAnnotations(implementation.TypeParameters)); 639MethodSymbol? overriddenOrExplicitlyImplementedMethod = MethodChecks(returnType, parameters, diagnostics); 935protected sealed override MethodSymbol FindExplicitlyImplementedMethod(BindingDiagnosticBag diagnostics) 1013protected sealed override MethodSymbol FindExplicitlyImplementedMethod(BindingDiagnosticBag diagnostics)
Symbols\Source\SourceParameterSymbol.cs (2)
290MethodSymbol owningMethod = ContainingSymbol as MethodSymbol;
Symbols\Source\SourcePropertyAccessorSymbol.cs (13)
23private ImmutableArray<MethodSymbol> _lazyExplicitInterfaceImplementations; 271MethodSymbol implementedMethod = explicitInterfaceImplementations[0]; 280MethodSymbol overriddenMethod = this.OverriddenMethod; 602public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 609ImmutableArray<MethodSymbol> explicitInterfaceImplementations; 613explicitInterfaceImplementations = ImmutableArray<MethodSymbol>.Empty; 617MethodSymbol implementedAccessor = this.MethodKind == MethodKind.PropertyGet 622? ImmutableArray<MethodSymbol>.Empty 623: ImmutableArray.Create<MethodSymbol>(implementedAccessor); 686MethodSymbol? implementedAccessor = isGetMethod 701MethodSymbol overriddenMethod = this.OverriddenMethod; 834public sealed override MethodSymbol? PartialImplementationPart => _property is SourcePropertySymbol { IsPartialDefinition: true, OtherPartOfPartial: { } other } 838public sealed override MethodSymbol? PartialDefinitionPart => _property is SourcePropertySymbol { IsPartialImplementation: true, OtherPartOfPartial: { } other }
Symbols\Source\SourcePropertySymbolBase.cs (7)
621public sealed override MethodSymbol? GetMethod 629public sealed override MethodSymbol? SetMethod 1166private void CheckExplicitImplementationAccessor(MethodSymbol thisAccessor, MethodSymbol otherAccessor, PropertySymbol explicitlyImplementedProperty, BindingDiagnosticBag diagnostics) 1234MethodSymbol overriddenAccessor = this.GetOwnOrInheritedSetMethod(); 1240MethodSymbol overriddenAccessor = this.GetOwnOrInheritedGetMethod(); 1612static bool isNullOrValidAccessor(MethodSymbol? accessor)
Symbols\Source\SourceTypeParameterSymbol.cs (8)
764private MethodSymbol _lazyOverriddenMethod = ErrorMethodSymbol.UnknownMethod; 778var overriddenMethod = this.OverriddenMethod; 788var overriddenMethod = this.OverriddenMethod; 805private MethodSymbol OverriddenMethod 817protected abstract MethodSymbol GetOverriddenMethod(SourceOrdinaryMethodSymbol overridingMethod); 828protected override MethodSymbol GetOverriddenMethod(SourceOrdinaryMethodSymbol overridingMethod) 830MethodSymbol method = overridingMethod; 849protected override MethodSymbol GetOverriddenMethod(SourceOrdinaryMethodSymbol overridingMethod)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
296protected sealed override MethodSymbol FindExplicitlyImplementedMethod(BindingDiagnosticBag diagnostics)
Symbols\Source\SynthesizedAttributeData.cs (5)
17public static SynthesizedAttributeData Create(CSharpCompilation compilation, MethodSymbol wellKnownMember, ImmutableArray<TypedConstant> arguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 30private readonly MethodSymbol _wellKnownMember; 34internal FromMethodAndArguments(CSharpCompilation compilation, MethodSymbol wellKnownMember, ImmutableArray<TypedConstant> arguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 48public override MethodSymbol AttributeConstructor => _wellKnownMember; 78public override MethodSymbol? AttributeConstructor => _original.AttributeConstructor;
Symbols\Source\ThisParameterSymbol.cs (3)
126private readonly MethodSymbol? _containingMethod; 129internal ThisParameterSymbol(MethodSymbol forMethod) : this(forMethod, forMethod.ContainingType) 133internal ThisParameterSymbol(MethodSymbol? forMethod, TypeSymbol containingType)
Symbols\SubstitutedEventSymbol.cs (4)
59public override MethodSymbol? AddMethod 63MethodSymbol? originalAddMethod = OriginalDefinition.AddMethod; 68public override MethodSymbol? RemoveMethod 72MethodSymbol? originalRemoveMethod = OriginalDefinition.RemoveMethod;
Symbols\SubstitutedMethodSymbol.cs (18)
25private readonly MethodSymbol _underlyingMethod; 27private readonly MethodSymbol _constructedFrom; 35private ImmutableArray<MethodSymbol> _lazyExplicitInterfaceImplementations; 40internal SubstitutedMethodSymbol(NamedTypeSymbol containingSymbol, MethodSymbol originalDefinition) 47protected SubstitutedMethodSymbol(Symbol containingSymbol, TypeMap map, MethodSymbol originalDefinition, MethodSymbol constructedFrom) 67public override MethodSymbol UnderlyingMethod 75public override MethodSymbol ConstructedFrom 142public sealed override MethodSymbol OriginalDefinition 150internal sealed override MethodSymbol CallsiteReducedFromMethod 154var method = OriginalDefinition.ReducedFrom; 163var reduced = this.CallsiteReducedFromMethod; 182public sealed override MethodSymbol ReducedFrom 267public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 273return ImmutableArray<MethodSymbol>.Empty; 281default(ImmutableArray<MethodSymbol>)); 428MethodSymbol other = obj as MethodSymbol;
Symbols\SubstitutedNamedTypeSymbol.cs (7)
367internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 374foreach ((MethodSymbol body, MethodSymbol implemented) in OriginalDefinition.SynthesizedInterfaceMethodImpls()) 376var newBody = ExplicitInterfaceHelpers.SubstituteExplicitInterfaceImplementation(body, this.TypeSubstitution); 377var newImplemented = ExplicitInterfaceHelpers.SubstituteExplicitInterfaceImplementation(implemented, this.TypeSubstitution); 453internal override IEnumerable<MethodSymbol> GetMethodsToEmit()
Symbols\SubstitutedParameterSymbol.cs (1)
17internal SubstitutedParameterSymbol(MethodSymbol containingSymbol, TypeMap map, ParameterSymbol originalParameter) :
Symbols\SubstitutedPropertySymbol.cs (4)
86public override MethodSymbol GetMethod 90MethodSymbol originalGetMethod = OriginalDefinition.GetMethod; 95public override MethodSymbol SetMethod 99MethodSymbol originalSetMethod = OriginalDefinition.SetMethod;
Symbols\SubstitutedTypeParameterSymbol.cs (2)
67MethodSymbol reducedFrom = ((MethodSymbol)_container).ReducedFrom;
Symbols\Symbol.cs (5)
666var method = (MethodSymbol)this; 727var method = (MethodSymbol)this; 1238this is MethodSymbol method && method.MethodKind == MethodKind.FunctionPointerSignature ?
Symbols\Symbol_Attributes.cs (3)
55var method = (MethodSymbol)this; 673Debug.Assert(!binder.InAttributeArgument || this is MethodSymbol { MethodKind: MethodKind.LambdaMethod or MethodKind.LocalFunction }, "Possible cycle in attribute binding");
Symbols\SymbolExtensions.cs (17)
149var method = (MethodSymbol)containingMember; 167MethodSymbol method = (MethodSymbol)symbol; 208return ((MethodSymbol)symbol).ConstructedFrom; 352return ((MethodSymbol)symbol).Arity; 479MethodSymbol method => method.ReturnTypeFlowAnalysisAnnotations, 499MethodSymbol method = (MethodSymbol)symbol; 547SymbolKind.Method => ((MethodSymbol)symbol).RequiresInstanceReceiver, 569internal static IMethodSymbol? GetPublicSymbol(this MethodSymbol? symbol) 744internal static ImmutableArray<IMethodSymbol> GetPublicSymbols(this ImmutableArray<MethodSymbol> symbols) 808internal static MethodSymbol? GetSymbol(this IMethodSymbol? symbol) 810return symbol.GetSymbol<MethodSymbol>(); 827internal static bool ShouldCheckRequiredMembers(this MethodSymbol method) 832Debug.Assert(symbol is MethodSymbol or PropertySymbol); 833return symbol is MethodSymbol method ? method.OverloadResolutionPriority : ((PropertySymbol)symbol).OverloadResolutionPriority;
Symbols\SymbolVisitor.cs (1)
70public virtual void VisitMethod(MethodSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
70public virtual TResult VisitMethod(MethodSymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
185/// Called when visiting a <see cref="MethodSymbol" />; Override this with specific 191public virtual TResult VisitMethod(MethodSymbol symbol, TArgument argument)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
29var baseConstructor = ContainingType.BaseTypeNoUseSiteDiagnostics.InstanceConstructors.Single();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
29var baseConstructor = ContainingType.BaseTypeNoUseSiteDiagnostics.InstanceConstructors.Single();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (7)
75((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__MoveNext)), 94((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerator__Reset)), 107((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_IDisposable__Dispose)), 261internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() => SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListMethod.cs (3)
7internal delegate BoundStatement GenerateMethodBodyDelegate(SyntheticBoundNodeFactory factory, MethodSymbol method, MethodSymbol interfaceMethod); 13internal SynthesizedReadOnlyListMethod(NamedTypeSymbol containingType, MethodSymbol interfaceMethod, GenerateMethodBodyDelegate generateMethodBody) :
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (2)
43public override MethodSymbol? GetMethod { get; } 45public override MethodSymbol? SetMethod { get; }
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (62)
321(MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerable__GetEnumerator), 341(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_ICollection__CopyTo)!, 346(PropertySymbol)((MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__get_Item)!).AssociatedSymbol, 362(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__Add)!, 367(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__Clear)!, 372(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__Contains)!, 377(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__IndexOf)!, 382(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__Insert)!, 387(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__Remove)!, 392(MethodSymbol)compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_IList__RemoveAt)!, 397((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IEnumerable_T__GetEnumerator)!).AsMember(iEnumerableT), 409((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IReadOnlyList_T__get_Item)!).AssociatedSymbol).AsMember(iReadOnlyListT), 425((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Add)!).AsMember(iCollectionT), 430((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Clear)!).AsMember(iCollectionT), 435((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Contains)!).AsMember(iCollectionT), 440((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__CopyTo)!).AsMember(iCollectionT), 445((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_ICollection_T__Remove)!).AsMember(iCollectionT), 450((PropertySymbol)((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__get_Item)!).AssociatedSymbol).AsMember(iListT), 456((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__IndexOf)!).AsMember(iListT), 461((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__Insert)!).AsMember(iListT), 466((MethodSymbol)compilation.GetSpecialTypeMember(SpecialMember.System_Collections_Generic_IList_T__RemoveAt)!).AsMember(iListT), 471static BoundStatement generateGetEnumerator(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 496static BoundStatement generateCount(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 524static BoundStatement generateIsSynchronized(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 531static BoundStatement generateSyncRoot(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 541static BoundStatement generateIsFixedSize(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 548static BoundStatement generateIsReadOnly(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 555static BoundStatement generateContains(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 581var listMember = (MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__Contains); 591static BoundStatement generateCopyTo(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 603var arraySetValueMethod = (MethodSymbol)method.DeclaringCompilation.GetSpecialTypeMember(SpecialMember.System_Array__SetValue)!; 636var listMember = (MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__CopyTo); 648static BoundStatement generateIndexer(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 659var constructor = (MethodSymbol)method.DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_IndexOutOfRangeException__ctor)!; 675var listMember = (PropertySymbol)((MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__get_Item)).AssociatedSymbol; 682static BoundStatement generateIndexOf(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 712var listMember = (MethodSymbol)containingType.GetFieldTypeMember(WellKnownMember.System_Collections_Generic_List_T__IndexOf); 721static BoundStatement generateNotSupportedException(SyntheticBoundNodeFactory f, MethodSymbol method, MethodSymbol interfaceMethod) 723var constructor = (MethodSymbol)method.DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_NotSupportedException__ctor)!; 743var equalityComparer_get_Default = f.WellKnownMethod( 745var equalityComparer_Equals = f.WellKnownMethod( 949internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() => SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
42var overridden = OverriddenMethod;
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (7)
83private static MethodSymbol? VirtualCloneInBase(NamedTypeSymbol containingType) 121foreach (var member in members) 123var ctor = (MethodSymbol)member; 141internal static MethodSymbol? FindValidCloneMethod(TypeSymbol containingType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 156MethodSymbol? candidate = null; 160if (member is MethodSymbol
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (6)
89internal static MethodSymbol? FindCopyConstructor(NamedTypeSymbol containingType, NamedTypeSymbol within, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 91MethodSymbol? bestCandidate = null; 93foreach (var member in containingType.InstanceConstructors) 135if (member is MethodSymbol { ContainingType.IsRecord: true, MethodKind: MethodKind.Constructor } method) 143internal static bool HasCopyConstructorSignature(MethodSymbol member) 146return member is MethodSymbol { IsStatic: false, ParameterCount: 1, Arity: 0 } method &&
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
107var getterMethod = property.GetMethod;
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (2)
42MethodSymbol? equals = null; 45if (member is MethodSymbol candidate && candidate.ParameterCount == 1 && candidate.Parameters[0].RefKind == RefKind.None &&
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
105MethodSymbol? baseEquals = ContainingType.GetMembersUnordered().OfType<SynthesizedRecordBaseEquals>().Single().OverriddenMethod;
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (5)
46MethodSymbol? equalityComparer_GetHashCode = null; 47MethodSymbol? equalityComparer_get_Default = null; 79var overridden = OverriddenMethod; 126static void ensureEqualityComparerHelpers(SyntheticBoundNodeFactory F, [NotNull] ref MethodSymbol? equalityComparer_GetHashCode, [NotNull] ref MethodSymbol? equalityComparer_get_Default)
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (3)
31internal static bool VerifyOverridesMethodFromObject(MethodSymbol overriding, SpecialMember overriddenSpecialMember, BindingDiagnosticBag diagnostics) 41var overridden = overriding.OverriddenMethod?.OriginalDefinition; 45MethodSymbol leastOverridden = overriding.GetLeastOverriddenMethod(accessingTypeOpt: null);
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (2)
16private readonly MethodSymbol _typedRecordEquals; 18public SynthesizedRecordObjEquals(SourceMemberContainerTypeSymbol containingType, MethodSymbol typedRecordEquals, int memberOffset)
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
47protected sealed override MethodSymbol? FindExplicitlyImplementedMethod(BindingDiagnosticBag diagnostics) => null;
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (6)
107var overridden = OverriddenMethod; 144var ensureStackMethod = F.WellKnownMethod( 156MethodSymbol? basePrintMethod = OverriddenMethod; 263internal static void VerifyOverridesPrintMembersFromBase(MethodSymbol overriding, BindingDiagnosticBag diagnostics) 279var overridden = overriding.OverriddenMethod; 314var getterMethod = property.GetMethod;
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (3)
24private readonly MethodSymbol _printMethod; 25public SynthesizedRecordToString(SourceMemberContainerTypeSymbol containingType, MethodSymbol printMethod, int memberOffset) 57var stringBuilderCtor = F.WellKnownMethod(WellKnownMember.System_Text_StringBuilder__ctor);
Symbols\Synthesized\SynthesizedContainer.cs (7)
26protected SynthesizedContainer(string name, MethodSymbol containingMethod) 54internal virtual MethodSymbol Constructor => null; 123var ctor = Constructor; 212internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 214return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
183public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 185get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (9)
52public new abstract ImmutableArray<MethodSymbol> Constructors { get; } 200internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 202return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>(); 232private readonly ImmutableArray<MethodSymbol> _constructors; 241_constructors = ImmutableArray.Create<MethodSymbol>(new SynthesizedEmbeddedAttributeConstructorSymbol(this, m => ImmutableArray<ParameterSymbol>.Empty)); 244public override ImmutableArray<MethodSymbol> Constructors => _constructors; 253Func<MethodSymbol, ImmutableArray<ParameterSymbol>> getParameters) :
Symbols\Synthesized\SynthesizedEmbeddedLifetimeAnnotationAttributeSymbol.cs (3)
12private readonly ImmutableArray<MethodSymbol> _constructors; 21_constructors = ImmutableArray.Create<MethodSymbol>( 28public override ImmutableArray<MethodSymbol> Constructors => _constructors;
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (3)
17private readonly ImmutableArray<MethodSymbol> _constructors; 46_constructors = ImmutableArray.Create<MethodSymbol>( 62public override ImmutableArray<MethodSymbol> Constructors => _constructors;
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (4)
19private readonly ImmutableArray<MethodSymbol> _constructors; 50_constructors = ImmutableArray.Create<MethodSymbol>( 66public override ImmutableArray<MethodSymbol> Constructors => _constructors; 118Func<MethodSymbol, ImmutableArray<ParameterSymbol>> getParameters,
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (3)
19private readonly ImmutableArray<MethodSymbol> _constructors; 38_constructors = ImmutableArray.Create<MethodSymbol>( 50public override ImmutableArray<MethodSymbol> Constructors => _constructors;
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (3)
19private readonly ImmutableArray<MethodSymbol> _constructors; 38_constructors = ImmutableArray.Create<MethodSymbol>( 50public override ImmutableArray<MethodSymbol> Constructors => _constructors;
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (3)
17private readonly ImmutableArray<MethodSymbol> _constructors; 36_constructors = ImmutableArray.Create<MethodSymbol>( 45public override ImmutableArray<MethodSymbol> Constructors => _constructors;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
218public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 220get { return ImmutableArray<MethodSymbol>.Empty; } 291private static BoundCall CreateParameterlessCall(CSharpSyntaxNode syntax, BoundExpression receiver, ThreeState receiverIsSubjectToCloning, MethodSymbol method) 339internal readonly MethodSymbol UserMain; 341internal AsyncForwardEntryPoint(CSharpCompilation compilation, NamedTypeSymbol containingType, MethodSymbol userMain) :
Symbols\Synthesized\SynthesizedExplicitImplementationForwardingMethod.cs (4)
25private readonly MethodSymbol _implementingMethod; 27public SynthesizedExplicitImplementationForwardingMethod(MethodSymbol interfaceMethod, MethodSymbol implementingMethod, NamedTypeSymbol implementingType) 33public MethodSymbol ImplementingMethod
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (2)
330public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 332get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
43var exceptionConstructor = (MethodSymbol?)factory.WellKnownMember(WellKnownMember.System_Exception__ctorString, isOptional: true);
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (4)
47public MethodSymbol Constructor 48=> (MethodSymbol)_members[0]; 135internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() => [];
Symbols\Synthesized\SynthesizedImplementationMethod.cs (5)
17protected readonly MethodSymbol _interfaceMethod; 23private readonly ImmutableArray<MethodSymbol> _explicitInterfaceImplementations; 29MethodSymbol interfaceMethod, 42_explicitInterfaceImplementations = ImmutableArray.Create<MethodSymbol>(interfaceMethod); 133public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (6)
27private readonly MethodSymbol _inlineArrayAttributeConstructor; 30internal SynthesizedInlineArrayTypeSymbol(SourceModuleSymbol containingModule, string name, int arrayLength, MethodSymbol inlineArrayAttributeConstructor) 186internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() => SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
263public sealed override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 265get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (2)
64public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 66get { return ImmutableArray<MethodSymbol>.Empty; }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
262public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 266return ImmutableArray<MethodSymbol>.Empty;
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (2)
17private readonly MethodSymbol _topLevelMethod; 19public SynthesizedLambdaCacheFieldSymbol(NamedTypeSymbol containingType, TypeSymbol type, string name, MethodSymbol topLevelMethod, bool isReadOnly, bool isStatic)
Symbols\Synthesized\SynthesizedLocal.cs (2)
21private readonly MethodSymbol _containingMethodOpt; 35MethodSymbol containingMethodOpt,
Symbols\Synthesized\SynthesizedParameterlessThrowMethod.cs (2)
15private readonly MethodSymbol _exceptionConstructor; 17internal SynthesizedParameterlessThrowMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string synthesizedMethodName, MethodSymbol exceptionConstructor)
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
232MethodSymbol method => method.UseUpdatedEscapeRules, 298internal static ImmutableArray<ParameterSymbol> DeriveParameters(MethodSymbol sourceMethod, MethodSymbol destinationMethod)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (4)
184internal override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 186return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (5)
26private readonly MethodSymbol _overriddenAccessor; 29public SynthesizedSealedPropertyAccessor(PropertySymbol property, MethodSymbol overriddenAccessor) 40internal MethodSymbol OverriddenAccessor 230public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 234return ImmutableArray<MethodSymbol>.Empty;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (2)
283public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations 287return ImmutableArray<MethodSymbol>.Empty;
Symbols\Synthesized\SynthesizedSubstitutedTypeParameterSymbol.cs (2)
22Debug.Assert(this.TypeParameterKind == (ContainingSymbol is MethodSymbol ? TypeParameterKind.Method : 33public override TypeParameterKind TypeParameterKind => ContainingSymbol is MethodSymbol ? TypeParameterKind.Method : TypeParameterKind.Type;
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (2)
16private readonly MethodSymbol _container; 20public SynthesizedSimpleMethodTypeParameterSymbol(MethodSymbol container, int ordinal, string name)
Symbols\TypeMap.cs (4)
145internal TypeMap WithAlphaRename(MethodSymbol oldOwner, Symbol newOwner, out ImmutableArray<TypeParameterSymbol> newTypeParameters) 152MethodSymbol oldOwner, 156MethodSymbol stopAt = null) 183oldOwner = oldOwner.ContainingSymbol.OriginalDefinition as MethodSymbol;
Symbols\TypeParameterSymbol.cs (6)
123public MethodSymbol DeclaringMethod 127return this.ContainingSymbol as MethodSymbol; 717internal sealed override IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls() 719return SpecializedCollections.EmptyEnumerable<(MethodSymbol Body, MethodSymbol Implemented)>();
Symbols\TypeSymbol.cs (60)
85internal ImmutableDictionary<MethodSymbol, MethodSymbol>? synthesizedMethodImplMap; 865if (checkPendingExplicitImplementations && interfaceMember is MethodSymbol interfaceMethod && 869MethodSymbol bodyOfSynthesizedMethodImpl = currType.GetBodyOfSynthesizedInterfaceMethodImpl(interfaceMethod); 949CheckForImplementationOfCorrespondingPropertyOrEvent((MethodSymbol)interfaceMember, implementingType, implementingTypeIsFromSomeCompilation, ref implicitImpl); 1056(MethodSymbol interfaceAccessor1, MethodSymbol interfaceAccessor2) = GetImplementableAccessors(interfaceMember); 1081static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType) 1108(MethodSymbol interfaceAccessor1, MethodSymbol interfaceAccessor2) = GetImplementableAccessors(interfaceMember); 1164(MethodSymbol interfaceAccessor1, MethodSymbol interfaceAccessor2) = GetImplementableAccessors(interfaceMember); 1396private static (MethodSymbol interfaceAccessor1, MethodSymbol interfaceAccessor2) GetImplementableAccessors(Symbol interfaceMember) 1398MethodSymbol interfaceAccessor1; 1399MethodSymbol interfaceAccessor2; 1459(MethodSymbol interfaceAccessor1, MethodSymbol interfaceAccessor2) = GetImplementableAccessors(interfaceMember); 1494private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated) 1505? ((MethodSymbol)implementation).AssociatedSymbol 1514MethodSymbol bodyOfSynthesizedMethodImpl = currType.GetBodyOfSynthesizedInterfaceMethodImpl(interfaceAccessor); 1538private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation, 1558MethodSymbol correspondingImplementingAccessor = null; 1599MethodSymbol interfaceAccessorWithImplementationName = new SignatureOnlyMethodSymbol( 1675var interfaceMethod = (MethodSymbol)interfaceMember; 1689var implicitImplMethod = (MethodSymbol)implicitImpl; 1796MethodSymbol implementedMethod, 1797MethodSymbol implementingMethod, 1914var implementingGetMethod = implementedProperty.GetMethod.IsImplementable() ? 1917var implementingSetMethod = implementedProperty.SetMethod.IsImplementable() ? 1941var implementingMethod = (MethodSymbol)implementingMember; 1942var implementedMethod = (MethodSymbol)interfaceMember; 2007var method = (MethodSymbol)interfaceMember; 2027hasRefReturnMismatch = ((MethodSymbol)closestMismatch).RefKind != interfaceMemberRefKind; 2055if (!(one is MethodSymbol oneMethod)) 2060if (!(other is MethodSymbol otherMethod)) 2085private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics) 2171if (interfaceMember is MethodSymbol interfaceMethod) 2181(((MethodSymbol)member).MethodKind is MethodKind.UserDefinedOperator or MethodKind.Conversion) != isOperator.GetValueOrDefault()) 2285Debug.Assert(interfaceMember.Kind != SymbolKind.Method || (object)interfaceMember == ((MethodSymbol)interfaceMember).ConstructedFrom); 2296/// <see cref="MethodSymbol.ExplicitInterfaceImplementations"/> API, this method returns the "Body" part 2304protected MethodSymbol? GetBodyOfSynthesizedInterfaceMethodImpl(MethodSymbol interfaceMethod) 2317if (info.synthesizedMethodImplMap.TryGetValue(interfaceMethod, out MethodSymbol? result)) 2324ImmutableDictionary<MethodSymbol, MethodSymbol> makeSynthesizedMethodImplMap() 2326var map = ImmutableDictionary.CreateBuilder<MethodSymbol, MethodSymbol>(ExplicitInterfaceImplementationTargetMemberEqualityComparer.Instance); 2327foreach ((MethodSymbol body, MethodSymbol implemented) in this.SynthesizedInterfaceMethodImpls()) 2339/// <see cref="MethodSymbol.ExplicitInterfaceImplementations"/> API. The "Body" is the method that 2346internal abstract IEnumerable<(MethodSymbol Body, MethodSymbol Implemented)> SynthesizedInterfaceMethodImpls(); 2402overriddenMember = ((MethodSymbol)member).OverriddenMethod;
Symbols\TypeSymbolExtensions.cs (5)
575var invokeMethod = type.DelegateInvokeMethod(); 609public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type) 954MethodSymbol currentPointer = type.Signature; 1206public static bool ContainsTypeParameter(this TypeSymbol type, MethodSymbol parameterContainer) 1233(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol;
Symbols\VarianceSafety.cs (5)
52CheckMethodVarianceSafety((MethodSymbol)member, diagnostics); 137private static void CheckMethodVarianceSafety(this MethodSymbol method, BindingDiagnosticBag diagnostics) 148private static void CheckMethodVarianceSafety(this MethodSymbol method, LocationProvider<MethodSymbol> returnTypeLocationProvider, BindingDiagnosticBag diagnostics) 258private static void CheckTypeParametersVarianceSafety(ImmutableArray<TypeParameterSymbol> typeParameters, MethodSymbol context, BindingDiagnosticBag diagnostics)
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
27public abstract MethodSymbol UnderlyingMethod
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenTupleTest.cs (2)
23451var b = m.OverriddenMethod; 23853var b = m.OverriddenMethod;
Emit\EmitMetadataTests.cs (1)
2071var invoke = myDel.DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests.cs (2)
3798var setter = property.SetMethod; 4007var setter = property.SetMethod;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (16)
Semantics\InitOnlyMemberTests.cs (2)
1461var getter = property.GetMethod; 1475var setter = property.SetMethod;
Semantics\NullableReferenceTypesTests.cs (14)
30193var getter = property.GetMethod; 30215var setter = property.SetMethod; 30296var getter = property.GetMethod; 40981var setter = property.SetMethod; 41042var setter = property.SetMethod; 44662var setter = property.SetMethod; 47999var getter = property.GetMethod; 98498var af2 = bf2.OverriddenMethod; 104821var af1 = bf1.OverriddenMethod; 104848var af2 = bf2.OverriddenMethod; 105091var baseM1 = m1.OverriddenMethod; 105135var baseM1 = m1.OverriddenMethod; 105184var baseM1 = m1.OverriddenMethod; 105220var baseM1 = m1.OverriddenMethod;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (93)
Symbols\DefaultInterfaceImplementationTests.cs (35)
14738var p1get = p1.GetMethod; 14761var p2get = p2.GetMethod; 14811var p4get = p4.GetMethod; 14941var p1get = p1.GetMethod; 14942var p1set = p1.SetMethod; 15001var p1get = p1.GetMethod; 15002var p1set = p1.SetMethod; 15182var p1get = p1.GetMethod; 15183var p1set = p1.SetMethod; 16316var p1get = p1.GetMethod; 16342var p2get = p2.GetMethod; 16368var p3set = p3.SetMethod; 16782var p1get = p1.GetMethod; 16808var p2set = p2.SetMethod; 16867var p4get = p4.GetMethod; 16892var p5set = p5.SetMethod; 17025var p1get = p1.GetMethod; 17051var p2get = p2.GetMethod; 17135var p5get = p5.GetMethod; 17305var p2get = p2.GetMethod; 17390var p5get = p5.GetMethod; 17475var p1get = p1.GetMethod; 17476var p1set = p1.SetMethod; 17519var p1get = p1.GetMethod; 17520var p1set = p1.SetMethod; 19856var p1get = p1.GetMethod; 19857var p1set = p1.SetMethod; 19900var p1get = p1.GetMethod; 19901var p1set = p1.SetMethod; 28443var p1add = p1.AddMethod; 28444var p1remove = p1.RemoveMethod; 28686var p1Add = p1.AddMethod; 28687var p1Remove = p1.RemoveMethod; 30880var p1add = p1.AddMethod; 30881var p1remove = p1.RemoveMethod;
Symbols\ExtensionMethodTests.cs (1)
2570var extensionMethod = ReducedExtensionMethodSymbol.Create(method.ConstructIfGeneric(typeArgs));
Symbols\IndexerTests.cs (2)
183var getter = property.GetMethod; 195var setter = property.SetMethod;
Symbols\InterfaceImplementationTests.cs (8)
914var interfacePropertyGetter = interfaceProperty.GetMethod; 915var interfacePropertySetter = interfaceProperty.SetMethod; 922var baseClassPropertyGetter = baseClassProperty.GetMethod; 923var baseClassPropertySetter = baseClassProperty.SetMethod; 983var interfacePropertyGetter = interfaceProperty.GetMethod; 984var interfacePropertySetter = interfaceProperty.SetMethod; 991var baseClassPropertyGetter = baseClassProperty.GetMethod; 992var baseClassPropertySetter = baseClassProperty.SetMethod;
Symbols\Source\DelegateTests.cs (2)
111var invoke = fieldType.DelegateInvokeMethod; 158var invoke = myDel.DelegateInvokeMethod;
Symbols\Source\MethodTests.cs (3)
238var otherSymbol = m.PartialImplementationPart; 266var otherSymbol = m.PartialImplementationPart; 1598var f2 = f.OverriddenMethod;
Symbols\Source\PropertyTests.cs (8)
2489var interfacePropertyGetter = interfaceProperty.GetMethod; 2491var interfacePropertySetter = interfaceProperty.SetMethod; 2496var classPropertyGetter = classProperty.GetMethod; 2498var classPropertySetter = classProperty.SetMethod; 2528var interfacePropertyGetter = interfaceProperty.GetMethod; 2530var interfacePropertySetter = interfaceProperty.SetMethod; 2535var classPropertyGetter = classProperty.GetMethod; 2537var classPropertySetter = classProperty.SetMethod;
Symbols\Source\RecordTests.cs (2)
170var getAccessor = x.GetMethod; 177var setAccessor = x.SetMethod;
Symbols\StaticAbstractMembersInInterfacesTests.cs (32)
22948var cM01Get = cM01.GetMethod; 22963var cM01Set = cM01.SetMethod; 23044var cM01Get = cM01.GetMethod; 23057var cM01Set = cM01.SetMethod; 23134var cM01Get = cM01.GetMethod; 23149var cM01Set = cM01.SetMethod; 23667var cM01Get = cM01.GetMethod; 23725var cM01Get = cM01.GetMethod; 23738var cM01Set = cM01.SetMethod; 23829var cM01Get = cM01.GetMethod; 24019var cM01Set = cM01.SetMethod; 24077var cM01Set = cM01.SetMethod; 24090var cM01Get = cM01.GetMethod; 24181var cM01Set = cM01.SetMethod; 24587var c1M01Get = c1M01.GetMethod; 24588var c1M01Set = c1M01.SetMethod; 24641var c2M01Get = c2M01.GetMethod; 24642var c2M01Set = c2M01.SetMethod; 24681var c3M01Get = c3M01.GetMethod; 24682var c3M01Set = c3M01.SetMethod; 25726var cM01Add = cM01.AddMethod; 25741var cM01Remove = cM01.RemoveMethod; 25821var cM01Add = cM01.AddMethod; 25836var cM01Remove = cM01.RemoveMethod; 26369var cM01Add = cM01.AddMethod; 26382var cM01Remove = cM01.RemoveMethod; 26643var cM01Remove = cM01.RemoveMethod; 26656var cM01Add = cM01.AddMethod; 27197var c2M01Add = c2M01.AddMethod; 27198var c2M01Remove = c2M01.RemoveMethod; 27308var c4M02Add = c4M02.AddMethod; 27309var c4M02Remove = c4M02.RemoveMethod;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
95var reducedFrom = reducedMethod.ReducedFrom;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (4)
3579var addMethod = @event.AddMethod; 3585var removeMethod = @event.RemoveMethod; 3610var addMethod = @event.AddMethod; 3616var removeMethod = @event.RemoveMethod;