26 types derived from Binder
Microsoft.CodeAnalysis.CSharp (26)
Binder\Binder_Flags.cs (2)
16private sealed class BinderWithContainingMemberOrLambda : Binder 46private sealed class BinderWithConditionalReceiver : Binder
Binder\BuckStopsHereBinder.cs (1)
15internal class BuckStopsHereBinder : Binder
Binder\CollectionInitializerAddMethodBinder.cs (1)
12internal sealed class CollectionInitializerAddMethodBinder : Binder
Binder\ConstantFieldsInProgressBinder.cs (1)
14internal sealed class ConstantFieldsInProgressBinder : Binder
Binder\ContextualAttributeBinder.cs (1)
18internal sealed class ContextualAttributeBinder : Binder
Binder\EarlyWellKnownAttributeBinder.cs (1)
19internal sealed class EarlyWellKnownAttributeBinder : Binder
Binder\ExecutableCodeBinder.cs (1)
25internal sealed class ExecutableCodeBinder : Binder
Binder\HostObjectModeBinder.cs (1)
15internal sealed class HostObjectModelBinder : Binder
Binder\ImplicitlyTypedFieldBinder.cs (1)
20internal sealed class ImplicitlyTypedFieldBinder : Binder
Binder\InContainerBinder.cs (1)
21internal class InContainerBinder : Binder
Binder\LocalInProgressBinder.cs (1)
19internal sealed class LocalInProgressBinder : Binder
Binder\LocalScopeBinder.cs (1)
17internal partial class LocalScopeBinder : Binder
Binder\NameofBinder.cs (1)
22internal sealed class NameofBinder : Binder
Binder\ParamsCollectionTypeInProgressBinder.cs (1)
14internal sealed class ParamsCollectionTypeInProgressBinder : Binder
Binder\SwitchExpressionArmBinder.cs (1)
16internal sealed class SwitchExpressionArmBinder : Binder
Binder\SwitchExpressionBinder.cs (1)
16internal class SwitchExpressionBinder : Binder
Binder\TypeofBinder.cs (1)
23internal sealed class TypeofBinder : Binder
Binder\WithExtensionParameterBinder.cs (1)
14internal sealed class WithExtensionParameterBinder : Binder
Binder\WithExternAliasesBinder.cs (1)
20internal abstract class WithExternAliasesBinder : Binder
Binder\WithNullableContextBinder.cs (1)
11internal sealed class WithNullableContextBinder : Binder
Binder\WithParametersBinder.cs (1)
20internal sealed class WithParametersBinder : Binder
Binder\WithPrimaryConstructorParametersBinder.cs (1)
15internal sealed class WithPrimaryConstructorParametersBinder : Binder
Binder\WithTypeParametersBinder.cs (1)
14internal abstract class WithTypeParametersBinder : Binder
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
20internal abstract class WithUsingNamespacesAndTypesBinder : Binder
Compilation\MemberSemanticModel.cs (1)
2391internal class IncrementalBinder : Binder
5 instantiations of Binder
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Flags.cs (5)
68: new Binder(this, flags); 75: new Binder(this, this.Flags | flags); 105? new Binder(this, this.Flags & ~BinderFlags.UnsafeRegion) 110? new Binder(this, this.Flags | BinderFlags.UnsafeRegion) 123: new Binder(this, (this.Flags & ~removed) | added);
1161 references to Binder
Microsoft.CodeAnalysis.CSharp (1139)
Binder\Binder.CapturedParametersFinder.cs (4)
49Binder? bodyBinder; 100void getBodyBinderAndSyntax(SourceMemberMethodSymbol sourceMethod, out Binder? bodyBinder, out CSharpSyntaxNode? syntaxNode) 115bool checkParameterReferencesInMethodBody(CSharpSyntaxNode syntaxNode, Binder bodyBinder) 146protected override bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult)
Binder\Binder.cs (12)
38internal Binder(Binder next, Conversions? conversions = null) 47protected Binder(Binder next, BinderFlags flags) 84protected internal Binder? Next { get; } 89protected internal Binder NextRequired 165internal virtual Binder? GetBinder(SyntaxNode node) 175internal Binder GetRequiredBinder(SyntaxNode node) 177var binder = GetBinder(node); 846internal Binder[] GetAllBinders() 848var binders = ArrayBuilder<Binder>.GetInstance(); 849for (Binder? binder = this; binder != null; binder = binder.Next) 909for (Binder? scope = this; scope != null; scope = scope.Next) 937static (string description, string? snippet, string locals) print(Binder scope)
Binder\Binder.IdentifierUsedAsValueFinder.cs (34)
26protected bool CheckIdentifiersInNode(CSharpSyntaxNode? node, Binder binder) 37Binder enclosingBinder = getEnclosingBinderForNode(contextNode: node, contextBinder: binder, n); 107static Binder getEnclosingBinderForNode(CSharpSyntaxNode contextNode, Binder contextBinder, SyntaxNode targetNode) 111Binder? enclosingBinder = contextBinder.GetBinder(targetNode); 171private bool CheckLambda(AnonymousFunctionExpressionSyntax lambdaSyntax, Binder enclosingBinder) 178private static ExecutableCodeBinder CreateLambdaBodyBinder(Binder enclosingBinder, UnboundLambda unboundLambda) 194private bool CheckIdentifier(Binder enclosingBinder, IdentifierNameSyntax id) 205protected abstract bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult); 208Binder enclosingBinder, 248/// Follows the logic of <see cref="Binder.BindInstanceMemberAccess"/> and <see cref="Binder.BindMemberOfType"/> 251Binder enclosingBinder, 307/// Follows the logic of <see cref="Binder.BindQuery"/> 309private bool CheckQuery(QueryExpressionSyntax query, Binder enclosingBinder) 335/// Follows the logic of <see cref="Binder.BindQueryInternal2"/> 337private bool BindQueryInternal(Binder enclosingBinder, QueryTranslationState state) 353/// Follows the logic of <see cref="Binder.FinalTranslation"/> 355private bool FinalTranslation(Binder enclosingBinder, QueryTranslationState state) 396/// Follows the logic of <see cref="Binder.ReduceQuery"/> 398private bool ReduceQuery(Binder enclosingBinder, QueryTranslationState state) 419/// Follows the logic of <see cref="Binder.ReduceWhere"/> 421private bool ReduceWhere(Binder enclosingBinder, WhereClauseSyntax where, QueryTranslationState state) 433/// Follows the logic of <see cref="Binder.ReduceJoin"/> 435private bool ReduceJoin(Binder enclosingBinder, JoinClauseSyntax join, QueryTranslationState state) 460/// Follows the logic of <see cref="Binder.ReduceOrderBy"/> 462private bool ReduceOrderBy(Binder enclosingBinder, OrderByClauseSyntax orderby, QueryTranslationState state) 489/// Follows the logic of <see cref="Binder.ReduceFrom"/> 491private bool ReduceFrom(Binder enclosingBinder, FromClauseSyntax from, QueryTranslationState state) 504/// Follows the logic of <see cref="Binder.ReduceLet"/> 506private bool ReduceLet(Binder enclosingBinder, LetClauseSyntax let, QueryTranslationState state) 529private bool MakeQueryUnboundLambda(Binder enclosingBinder, RangeVariableMap qvm, RangeVariableSymbol parameter, ExpressionSyntax expression) 531UnboundLambda unboundLambda = Binder.MakeQueryUnboundLambda( 535(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) => throw ExceptionUtilities.Unreachable()),
Binder\Binder.QueryTranslationState.cs (2)
72internal RangeVariableSymbol AddRangeVariable(Binder binder, SyntaxToken identifier, BindingDiagnosticBag diagnostics) 117internal RangeVariableSymbol TransparentRangeVariable(Binder binder)
Binder\Binder.QueryUnboundLambdaState.cs (6)
17private delegate BoundBlock LambdaBodyFactory(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics); 25public QueryUnboundLambdaState(Binder binder, RangeVariableMap rangeVariableMap, ImmutableArray<RangeVariableSymbol> parameters, LambdaBodyFactory bodyFactory, bool includeCache = true) 63public override Binder GetWithParametersBinder(LambdaSymbol lambdaSymbol, Binder binder) 78protected override BoundBlock CreateBlockFromLambdaExpressionBody(Binder lambdaBodyBinder, BoundExpression expression, BindingDiagnosticBag diagnostics) 83protected override BoundBlock BindLambdaBodyCore(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics)
Binder\Binder.WithQueryLambdaParametersBinder.cs (3)
26public WithQueryLambdaParametersBinder(LambdaSymbol lambdaSymbol, RangeVariableMap rangeVariableMap, Binder next) 105LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 120internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\Binder_Attributes.cs (12)
30ImmutableArray<Binder> binders, ImmutableArray<AttributeSyntax> attributesToBind, Symbol ownerSymbol, NamedTypeSymbol[] boundAttributeTypes, 46var binder = binders[i]; 72ImmutableArray<Binder> binders, 92Binder binder = binders[i]; 143private Binder SkipSemanticModelBinder() 145Binder result = this; 155private static BoundAttribute BindAttributeCore(Binder binder, AttributeSyntax node, NamedTypeSymbol attributeType, Symbol? attributedMember, BindingDiagnosticBag diagnostics) 754private readonly Binder _binder; 756public AttributeExpressionVisitor(Binder binder) 891Binder.Error(diagnostics, ErrorCode.ERR_BadAttributeArgument, node.Syntax); 962Binder.Error(diagnostics, ErrorCode.ERR_AttrArgWithTypeVars, node.Syntax, typeOfArgument.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 1046Binder.Error(diagnostics, ErrorCode.ERR_BadAttributeArgument, node.Syntax);
Binder\Binder_Crefs.cs (1)
961Binder parameterOrReturnTypeBinder = this.WithAdditionalFlags(BinderFlags.CrefParameterOrReturnType);
Binder\Binder_Expressions.cs (22)
453Binder initializerBinder = this.GetBinder(initializerOpt); 488internal Binder CreateBinderForParameterDefaultValue( 510Binder defaultValueBinder = this.GetBinder(defaultValueSyntax); 528Binder initializerBinder = this.GetBinder(equalsValueSyntax); 1741Binder current = this; 1793Binder binder = this; 1801if (binder is { Next: Binder withPrimaryConstructorParametersBinder }) 4778Binder argumentListBinder = null; 5263static BoundNode bindElement(CollectionElementSyntax syntax, BindingDiagnosticBag diagnostics, Binder @this, int nestingLevel) 5274static BoundNode bindSpreadElement(SpreadElementSyntax syntax, BindingDiagnosticBag diagnostics, Binder @this) 5687var objectInitializerMemberBinder = useObjectInitDiagnostics 5714Binder objectInitializerMemberBinder, 6271var collectionInitializerAddMethodBinder = this.WithAdditionalFlags(BinderFlags.CollectionInitializerAddMethod); 6330Binder collectionInitializerAddMethodBinder, 6375Binder collectionInitializerAddMethodBinder = null, 6414Binder collectionInitializerAddMethodBinder, 6465Binder collectionInitializerAddMethodBinder, 6567Binder collectionInitializerAddMethodBinder, 7409var binder = this.GetBinder(node); 8603Binder binder, 8705Binder binder, 8783Binder binder,
Binder\Binder_Flags.cs (9)
20internal BinderWithContainingMemberOrLambda(Binder next, Symbol containingMemberOrLambda) 28internal BinderWithContainingMemberOrLambda(Binder next, BinderFlags flags, Symbol containingMemberOrLambda) 50internal BinderWithConditionalReceiver(Binder next, BoundExpression receiverExpression) 64internal Binder WithFlags(BinderFlags flags) 71internal Binder WithAdditionalFlags(BinderFlags flags) 78internal Binder WithContainingMemberOrLambda(Symbol containing) 88internal Binder WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags flags, Symbol containing) 94internal Binder SetOrClearUnsafeRegionIfNecessary(SyntaxTokenList modifiers, bool isIteratorBody = false) 114internal Binder WithCheckedOrUncheckedRegion(bool @checked)
Binder\Binder_Initializers.cs (7)
107Binder parentBinder = binderFactory.GetBinder(initializerNode); 145internal Binder GetFieldInitializerBinder(FieldSymbol fieldSymbol, bool suppressBinderFlagsFieldInitializer = false) 150Binder binder = this; 206Binder scriptClassBinder = binderFactory.GetBinder(syntax); 214Binder parentBinder = new ExecutableCodeBinder( 244Binder binder, 286private static BoundFieldEqualsValue BindFieldInitializer(Binder binder, FieldSymbol fieldSymbol, EqualsValueClauseSyntax equalsValueClauseNode,
Binder\Binder_InterpolatedString.cs (1)
101alignment = GenerateConversionForAssignment(intType, BindValue(interpolation.AlignmentClause.Value, diagnostics, Binder.BindValueKind.RValue), diagnostics);
Binder\Binder_Invocation.cs (1)
2263var binder = this.GetBinder(node);
Binder\Binder_Lambda.cs (1)
425Func<Binder, TSyntax, TArg, BindingDiagnosticBag, TResult> bind)
Binder\Binder_Lookup.cs (42)
67private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 72var binder = this.LookupSymbolsInternal(result, name, arity, basesBeingResolved, options, diagnose: false, useSiteInfo: ref useSiteInfo); 79var otherBinder = this.LookupSymbolsInternal(result, name, arity, basesBeingResolved, options, diagnose: true, useSiteInfo: ref useSiteInfo); 87private Binder LookupSymbolsInternal( 93Binder binder = null; 94for (var scope = this; scope != null && !result.IsMultiViable; scope = scope.Next) 122LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 170protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 187int arity, LookupOptions options, Binder originalBinder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ref CompoundUseSiteInfo<AssemblySymbol> classicExtensionUseSiteInfo) 200string? name, int arity, LookupOptions options, Binder originalBinder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ref CompoundUseSiteInfo<AssemblySymbol> classicExtensionUseSiteInfo) 251protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 292private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 328LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 472Binder originalBinder, 515private static void LookupMembersInNamespace(LookupResult result, NamespaceSymbol ns, string name, int arity, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 536var binder = scope.Binder; 831Binder originalBinder) 843internal virtual void GetExtensionDeclarations(ArrayBuilder<NamedTypeSymbol> extensions, Binder originalBinder) 850LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 871Binder originalBinder, 886Binder originalBinder, 965Binder originalBinder, 1105Binder originalBinder, 1208Binder originalBinder, 1236private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1254private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1379internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, string name, LookupOptions options, Binder originalBinder) 1403internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1455for (var binder = this; binder != null; binder = binder.Next) 1917for (var scope = this; scope != null; scope = scope.Next) 1929internal virtual void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo info, LookupOptions options, Binder originalBinder) 1937internal void AddMemberLookupSymbolsInfo(LookupSymbolsInfo result, NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1949private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1973protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 2005LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 2024static void addAliasSymbolToResult(LookupSymbolsInfo result, AliasSymbol aliasSymbol, LookupOptions options, Binder originalBinder) 2034private static void AddMemberLookupSymbolsInfoInNamespace(LookupSymbolsInfo result, NamespaceSymbol ns, LookupOptions options, Binder originalBinder) 2046private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2058private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2073private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2104private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2119private void AddMemberLookupSymbolsInfoInTypeParameter(LookupSymbolsInfo result, TypeParameterSymbol type, LookupOptions options, Binder originalBinder)
Binder\Binder_NameConflicts.cs (1)
123for (Binder? binder = this; binder != null; binder = binder.Next)
Binder\Binder_Operators.cs (2)
1386Binder.CheckFeatureAvailability(node, MessageID.IDS_DefaultInterfaceImplementation, diagnostics); 2839var binder = kind.Operator() == UnaryOperatorKind.BitwiseComplement ?
Binder\Binder_Patterns.cs (4)
149Binder? switchBinder = this.GetBinder(node); 156Binder originalBinder, 828ConstantValue result = Binder.GetIsOperatorConstantResult(expressionType, patternType, conversion.Kind, operandConstantValue, operandCouldBeNull); 1775Binder binder,
Binder\Binder_Query.cs (4)
691LambdaBodyFactory bodyFactory = (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag d) => 725LambdaBodyFactory bodyFactory = (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag d) => 833return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, parameters, (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) => 844return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, ImmutableArray.Create(parameter), (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) =>
Binder\Binder_Statements.cs (37)
172var unsafeBinder = this.GetBinder(node); 188var fixedBinder = this.GetBinder(node); 297var lockBinder = this.GetBinder(node); 302internal virtual BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 309var usingBinder = this.GetBinder(node); 314internal virtual BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 321Binder binder; 476var binder = this.LookupSymbolsWithFallback(result, node.Identifier.ValueText, arity: 0, useSiteInfo: ref useSiteInfo, options: LookupOptions.LabelsOnly); 1885var binder = GetBinder(node); 2553static BoundStatement bindIfStatement(Binder binder, IfStatementSyntax node, BindingDiagnosticBag diagnostics) 2555var stack = ArrayBuilder<(Binder, IfStatementSyntax IfStatementSyntax, BoundExpression Condition, BoundStatement Consequence)>.GetInstance(); 2573var b = binder.GetBinder(ifStatementSyntax); 2757Binder switchBinder = this.GetBinder(node); 2761internal virtual BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 2775var loopBinder = this.GetBinder(node); 2780internal virtual BoundWhileStatement BindWhileParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2787var loopBinder = this.GetBinder(node); 2793internal virtual BoundDoStatement BindDoParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2800var loopBinder = this.GetBinder(node); 2805internal virtual BoundForStatement BindForParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2898Binder loopBinder = this.GetBinder(node); 2902internal virtual BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2910internal virtual BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 2937private static SwitchBinder GetSwitchBinder(Binder binder) 3244var catchBinder = this.GetBinder(catchSyntax); 3293var filterBinder = this.GetBinder(filter); 3343var binder = GetBinder(node); 3583Binder bodyBinder = this.GetBinder(expressionBody); 3589static BoundBlock bindExpressionBodyAsBlockInternal(ArrowExpressionClauseSyntax expressionBody, Binder bodyBinder, BindingDiagnosticBag diagnostics) 3604Binder bodyBinder = this.GetBinder(body); 3616Binder bodyBinder = this.GetBinder(body); 3704Binder initializerBinder = GetBinder(baseWithArguments); 3738Binder bodyBinder = this.GetBinder(constructor); 3881Binder outerBinder; 3925Binder initializerBinder = outerBinder.WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags.ConstructorInitializer, constructor); 3953if (Binder.ReportUseSite(baseConstructor, diagnostics, diagnosticsLocation)) 4009Binder.ReportConstructorUseSiteDiagnostics(diagnosticsLocation, diagnostics, suppressUnsupportedRequiredMembersError: constructor.HasSetsRequiredMembers, constructorUseSiteInfo);
Binder\Binder_Symbols.cs (3)
185/// Otherwise, call <see cref="Binder.BindTypeOrAlias(ExpressionSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> instead. 1366var binder = !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias) 2673internal static ContextualAttributeBinder TryGetContextualAttributeBinder(Binder binder)
Binder\BinderFactory.BinderFactoryVisitor.cs (84)
20internal sealed class BinderFactoryVisitor : CSharpSyntaxVisitor<Binder> 69private ConcurrentCache<BinderCacheKey, Binder> binderCache 85public override Binder DefaultVisit(SyntaxNode parent) 92public override Binder Visit(SyntaxNode node) 98private Binder VisitCore(SyntaxNode node) 103public override Binder VisitGlobalStatement(GlobalStatementSyntax node) 116Binder result; 135public override Binder VisitMethodDeclaration(MethodDeclarationSyntax methodDecl) 160Binder resultBinder; 196public override Binder VisitConstructorDeclaration(ConstructorDeclarationSyntax parent) 208Binder resultBinder; 235public override Binder VisitDestructorDeclaration(DestructorDeclarationSyntax parent) 245Binder resultBinder; 262public override Binder VisitAccessorDeclaration(AccessorDeclarationSyntax parent) 274Binder resultBinder; 330private Binder VisitOperatorOrConversionDeclaration(BaseMethodDeclarationSyntax parent) 342Binder resultBinder; 363public override Binder VisitOperatorDeclaration(OperatorDeclarationSyntax parent) 368public override Binder VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax parent) 373public override Binder VisitFieldDeclaration(FieldDeclarationSyntax parent) 378public override Binder VisitEventDeclaration(EventDeclarationSyntax parent) 383public override Binder VisitEventFieldDeclaration(EventFieldDeclarationSyntax parent) 388public override Binder VisitPropertyDeclaration(PropertyDeclarationSyntax parent) 398public override Binder VisitIndexerDeclaration(IndexerDeclarationSyntax parent) 408private Binder VisitPropertyOrIndexerExpressionBody(BasePropertyDeclarationSyntax parent) 412Binder resultBinder; 434private NamedTypeSymbol GetContainerType(Binder binder, CSharpSyntaxNode node) 459private static string GetMethodName(BaseMethodDeclarationSyntax baseMethodDeclarationSyntax, Binder outerBinder) 486private static string GetPropertyOrEventName(BasePropertyDeclarationSyntax basePropertyDeclarationSyntax, Binder outerBinder) 507private SourceMemberMethodSymbol GetMethodSymbol(BaseMethodDeclarationSyntax baseMethodDeclarationSyntax, Binder outerBinder) 524private SourcePropertySymbol GetPropertySymbol(BasePropertyDeclarationSyntax basePropertyDeclarationSyntax, Binder outerBinder) 543private SourceEventSymbol GetEventSymbol(EventDeclarationSyntax eventDeclarationSyntax, Binder outerBinder) 653public override Binder VisitDelegateDeclaration(DelegateDeclarationSyntax parent) 662Binder resultBinder; 665Binder outer = VisitCore(parent.Parent); // a binder for the body of the enclosing type or namespace 685public override Binder VisitEnumDeclaration(EnumDeclarationSyntax parent) 697Binder resultBinder; 700Binder outer = VisitCore(parent.Parent); // a binder for the body of the type enclosing this type 716private Binder VisitTypeDeclarationCore(TypeDeclarationSyntax parent) 749internal Binder VisitTypeDeclarationCore(TypeDeclarationSyntax parent, NodeUsage extraInfo) 753Binder resultBinder; 800public override Binder VisitClassDeclaration(ClassDeclarationSyntax node) 805public override Binder VisitStructDeclaration(StructDeclarationSyntax node) 810public override Binder VisitInterfaceDeclaration(InterfaceDeclarationSyntax node) 815public override Binder VisitRecordDeclaration(RecordDeclarationSyntax node) 818public override Binder VisitExtensionDeclaration(ExtensionDeclarationSyntax node) 821public sealed override Binder VisitNamespaceDeclaration(NamespaceDeclarationSyntax parent) 837public override Binder VisitFileScopedNamespaceDeclaration(FileScopedNamespaceDeclarationSyntax parent) 852internal Binder VisitNamespaceDeclaration(BaseNamespaceDeclarationSyntax parent, int position, bool inBody, bool inUsing) 859Binder result; 862Binder outer; 894private static Binder MakeNamespaceBinder(CSharpSyntaxNode node, NameSyntax name, Binder outer, bool inUsing) 930public override Binder VisitCompilationUnit(CompilationUnitSyntax parent) 938internal Binder VisitCompilationUnit(CompilationUnitSyntax compilationUnit, bool inUsing, bool inScript) 950Binder result; 1033private static Binder AddInImportsBinders(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool inUsing) 1100public override Binder VisitDocumentationCommentTrivia(DocumentationCommentTriviaSyntax parent) 1109public override Binder VisitCrefParameter(CrefParameterSyntax parent) 1118public override Binder VisitConversionOperatorMemberCref(ConversionOperatorMemberCrefSyntax parent) 1129public override Binder VisitXmlCrefAttribute(XmlCrefAttributeSyntax parent) 1140private Binder VisitXmlCrefAttributeInternal(XmlCrefAttributeSyntax parent, NodeUsage extraInfo) 1147Binder result; 1165public override Binder VisitXmlNameAttribute(XmlNameAttributeSyntax parent) 1196Binder result; 1201Binder outerBinder = VisitCore(GetEnclosingDocumentationComment(parent)); 1237private Binder GetParameterNameAttributeValueBinder(MemberDeclarationSyntax memberSyntax, Binder nextBinder) 1241Binder outerBinder = VisitCore(memberSyntax.Parent); 1249Binder outerBinder = VisitCore(memberSyntax); 1264Binder outerBinder = VisitCore(memberSyntax.Parent); 1286Binder outerBinder = VisitCore(memberSyntax.Parent); 1305private Binder GetTypeParameterNameAttributeValueBinder(MemberDeclarationSyntax memberSyntax, bool includeContainingSymbols, Binder nextBinder) 1309Binder outerBinder = VisitCore(memberSyntax.Parent); 1323Binder outerBinder = VisitCore(memberSyntax.Parent); 1335Binder outerBinder = VisitCore(memberSyntax.Parent); 1342Binder outerBinder = VisitCore(memberSyntax.Parent); 1370internal static Binder MakeCrefBinder(CrefSyntax crefSyntax, MemberDeclarationSyntax memberSyntax, BinderFactory factory, bool inParameterOrReturnType = false) 1375Binder binder = memberSyntax is BaseTypeDeclarationSyntax typeDeclSyntax 1381Binder getBinder(BaseTypeDeclarationSyntax baseTypeDeclaration) 1395private static Binder MakeCrefBinderInternal(CrefSyntax crefSyntax, Binder binder, bool inParameterOrReturnType)
Binder\BinderFactory.cs (11)
49private readonly ConcurrentCache<BinderCacheKey, Binder> _binderCache; 77_binderCache = new ConcurrentCache<BinderCacheKey, Binder>(50); 109internal Binder GetBinder(SyntaxNode node, CSharpSyntaxNode memberDeclarationOpt = null, Symbol memberOpt = null) 124internal Binder GetBinder(SyntaxNode node, int position, CSharpSyntaxNode memberDeclarationOpt = null, Symbol memberOpt = null) 135Binder result = visitor.Visit(node); 163if (!_binderCache.TryGetValue(key, out Binder resultBinder)) 175internal Binder GetInTypeBodyBinder(TypeDeclarationSyntax typeDecl) 178Binder resultBinder = visitor.VisitTypeDeclarationCore(typeDecl, NodeUsage.NamedTypeBodyOrTypeParameters); 184internal Binder GetInNamespaceBinder(CSharpSyntaxNode unit) 192Binder result = visitor.VisitNamespaceDeclaration((BaseNamespaceDeclarationSyntax)unit, unit.SpanStart, inBody: true, inUsing: false); 201Binder result = visitor.VisitCompilationUnit((CompilationUnitSyntax)unit, inUsing: false, inScript: InScript);
Binder\BlockBinder.cs (2)
21public BlockBinder(Binder enclosing, BlockSyntax block) 26public BlockBinder(Binder enclosing, BlockSyntax block, BinderFlags additionalFlags)
Binder\BuckStopsHereBinder.cs (10)
171internal override Binder? GetBinder(SyntaxNode node) 186internal override BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 192internal override BoundExpression BindSwitchExpressionCore(SwitchExpressionSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 210internal override BoundForStatement BindForParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 216internal override BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 222internal override BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 228internal override BoundWhileStatement BindWhileParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 234internal override BoundDoStatement BindDoParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 240internal override BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 246internal override BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\CatchClauseBinder.cs (1)
20public CatchClauseBinder(Binder enclosing, CatchClauseSyntax syntax)
Binder\CollectionInitializerAddMethodBinder.cs (1)
17internal CollectionInitializerAddMethodBinder(SyntaxNode syntax, TypeSymbol collectionType, Binder next)
Binder\ConstantFieldsInProgressBinder.cs (1)
18internal ConstantFieldsInProgressBinder(ConstantFieldsInProgress inProgress, Binder next)
Binder\ContextualAttributeBinder.cs (1)
25public ContextualAttributeBinder(Binder enclosing, Symbol symbol)
Binder\DecisionDagBuilder.cs (3)
545else if (Binder.IsZeroElementTupleType(inputType)) 1316matches = Binder.ExpressionOfTypeMatchesPatternType(_conversions, t2.Type, t1.Type, ref useSiteInfo, out _); 1544ConstantValue result = Binder.ExpressionOfTypeMatchesPatternType(_conversions, expressionType, patternType, ref useSiteInfo, out Conversion conversion);
Binder\DecisionDagBuilder_ListPatterns.cs (1)
39var lengthProperty = Binder.GetPropertySymbol(list.LengthAccess, out _, out _);
Binder\EarlyWellKnownAttributeBinder.cs (1)
21internal EarlyWellKnownAttributeBinder(Binder enclosing)
Binder\EmbeddedStatementBinder.cs (1)
24public EmbeddedStatementBinder(Binder enclosing, StatementSyntax statement)
Binder\ExecutableCodeBinder.cs (10)
29private readonly Action<Binder, SyntaxNode> _binderUpdatedHandler; 30private SmallDictionary<SyntaxNode, Binder> _lazyBinderMap; 32internal ExecutableCodeBinder(SyntaxNode root, Symbol memberSymbol, Binder next, Action<Binder, SyntaxNode> binderUpdatedHandler = null) 38internal ExecutableCodeBinder(SyntaxNode root, Symbol memberSymbol, Binder next, BinderFlags additionalFlags) 58internal override Binder GetBinder(SyntaxNode node) 60Binder binder; 66SmallDictionary<SyntaxNode, Binder> map; 83map = SmallDictionary<SyntaxNode, Binder>.Empty; 90private SmallDictionary<SyntaxNode, Binder> BinderMap
Binder\ExpressionListVariableBinder.cs (1)
20internal ExpressionListVariableBinder(SeparatedSyntaxList<ExpressionSyntax> expressions, Binder next) : base(next)
Binder\ExpressionVariableBinder.cs (1)
21internal ExpressionVariableBinder(SyntaxNode scopeDesignator, Binder next) : base(next)
Binder\ExpressionVariableFinder.cs (5)
546private Binder _scopeBinder; 547private Binder _enclosingBinder; 550Binder scopeBinder, 553Binder enclosingBinderOpt = null) 572Binder binder,
Binder\ExtensionScope.cs (9)
16public readonly Binder Binder; 18public ExtensionScope(Binder binder) 30private readonly Binder _binder; 32public ExtensionScopes(Binder binder) 48private readonly Binder _binder; 51public ExtensionScopeEnumerator(Binder binder) 70var binder = _current.Binder; 78private static ExtensionScope GetNextScope(Binder binder) 80for (var scope = binder; scope != null; scope = scope.Next)
Binder\FixedStatementBinder.cs (1)
22public FixedStatementBinder(Binder enclosing, FixedStatementSyntax syntax)
Binder\ForEachLoopBinder.cs (6)
40public ForEachLoopBinder(Binder enclosing, CommonForEachStatementSyntax syntax) 106Binder enclosingBinderOpt = null) 143Binder enclosingBinderOpt) 180internal override BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 189internal override BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 216private BoundForEachStatement BindForEachPartsWorker(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\ForLoopBinder.cs (4)
21public ForLoopBinder(Binder enclosing, ForStatementSyntax syntax) 63internal override BoundForStatement BindForParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 69private BoundForStatement BindForParts(ForStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 106var incrementBinder = originalBinder.GetBinder(scopeDesignator);
Binder\HostObjectModeBinder.cs (3)
17public HostObjectModelBinder(Binder next) 33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 52internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\ImplicitlyTypedFieldBinder.cs (1)
24public ImplicitlyTypedFieldBinder(Binder next, ConsList<FieldSymbol> fieldsBeingBound)
Binder\InContainerBinder.cs (5)
28internal InContainerBinder(NamespaceOrTypeSymbol container, Binder next) 80Binder originalBinder) 88internal override void GetExtensionDeclarations(ArrayBuilder<NamedTypeSymbol> extensions, Binder originalBinder) 112LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 139internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\InMethodBinder.cs (4)
31/// and <see cref="Binder.BindIdentifier"/> to validate some assumptions around identifiers. 40public InMethodBinder(MethodSymbol owner, Binder enclosing) 194LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 228internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\InSubmissionClassBinder.cs (4)
26internal InSubmissionClassBinder(NamedTypeSymbol submissionClass, Binder next, CompilationUnitSyntax declarationSyntax, bool inUsings) 39Binder originalBinder) 48LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 55internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\LocalBinderFactory.cs (40)
35private readonly SmallDictionary<SyntaxNode, Binder> _map; 37private Binder _enclosing; 40private void Visit(CSharpSyntaxNode syntax, Binder enclosing) 48Binder oldEnclosing = _enclosing; 55private void VisitRankSpecifiers(TypeSyntax type, Binder enclosing) 72public static SmallDictionary<SyntaxNode, Binder> BuildMap( 75Binder enclosing, 76Action<Binder, SyntaxNode> binderUpdatedHandler = null) 135private LocalBinderFactory(Symbol containingMemberOrLambda, SyntaxNode root, Binder enclosing) 140_map = new SmallDictionary<SyntaxNode, Binder>(ReferenceEqualityComparer.Instance); 156Binder enclosing = new ExpressionVariableBinder(node, _enclosing); 184Binder enclosing = new ExpressionVariableBinder(node, _enclosing).WithAdditionalFlags(BinderFlags.ConstructorInitializer); 218var oldEnclosing = _enclosing; 221Binder? withParametersBinder; 287static Symbol getAttributeTarget(Binder current) 290var contextualAttributeBinder = Binder.TryGetContextualAttributeBinder(current); 296static WithTypeParametersBinder? getExtraWithTypeParametersBinder(Binder enclosing, Symbol target) 301static Binder? getExtraWithParametersBinder(Binder enclosing, Symbol target) 408Binder binder = _enclosing; 440private static LocalFunctionSymbol FindLocalFunction(LocalFunctionStatementSyntax node, Binder enclosing) 446Binder possibleScopeBinder = enclosing; 496var binder = _enclosing.WithAdditionalFlags(BinderFlags.ConstructorInitializer); 501private void VisitConstructorInitializerArgumentList(CSharpSyntaxNode node, ArgumentListSyntax argumentList, Binder binder) 598Binder binder = new ForLoopBinder(_enclosing, node); 673Binder binder = _enclosing.WithCheckedOrUncheckedRegion(@checked: node.Kind() == SyntaxKind.CheckedExpression); 680Binder binder = _enclosing.WithCheckedOrUncheckedRegion(@checked: node.Kind() == SyntaxKind.CheckedStatement); 688Binder binder = _enclosing.WithAdditionalFlags(BinderFlags.UnsafeRegion); 721Binder statementBinder = lockBinder.WithAdditionalFlags(BinderFlags.InLockBody); 817Binder enclosing = _enclosing; 886Binder filterBinder = clauseBinder.WithAdditionalFlags(BinderFlags.InCatchFilter); 919Binder finallyBinder; 952var enclosing = _enclosing; 1009private void AddToMap(SyntaxNode node, Binder binder) 1023Binder existing; 1037private Binder GetBinderForPossibleEmbeddedStatement(StatementSyntax statement, Binder enclosing, out CSharpSyntaxNode embeddedScopeDesignator) 1069private Binder GetBinderForPossibleEmbeddedStatement(StatementSyntax statement, Binder enclosing) 1087private void VisitPossibleEmbeddedStatement(StatementSyntax statement, Binder enclosing)
Binder\LocalInProgressBinder.cs (1)
24internal LocalInProgressBinder(EqualsValueClauseSyntax initializerSyntax, Binder next)
Binder\LocalScopeBinder.cs (12)
25internal LocalScopeBinder(Binder next) 30internal LocalScopeBinder(Binder next, BinderFlags flags) 148protected ImmutableArray<LocalSymbol> BuildLocals(SyntaxList<StatementSyntax> statements, Binder enclosingBinder) 151Binder currentBinder = enclosingBinder; 173internal void BuildLocals(Binder enclosingBinder, StatementSyntax statement, ArrayBuilder<LocalSymbol> locals) 188Binder localDeclarationBinder = enclosingBinder.GetBinder(innerStatement) ?? enclosingBinder; 227Binder localFunctionDeclarationBinder = enclosingBinder.GetBinder(innerStatement) ?? enclosingBinder; 275Binder statementBinder = enclosingBinder.GetBinder(innerStatement); 287static void findExpressionVariablesInRankSpecifier(ExpressionSyntax expression, (LocalScopeBinder localScopeBinder, ArrayBuilder<LocalSymbol> locals, Binder localDeclarationBinder) args) 331protected SourceLocalSymbol MakeLocal(VariableDeclarationSyntax declaration, VariableDeclaratorSyntax declarator, LocalDeclarationKind kind, bool allowScoped, Binder initializerBinderOpt = null) 422LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 462internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\LockBinder.cs (2)
20public LockBinder(Binder enclosing, LockStatementSyntax syntax) 34internal override BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\LockOrUsingBinder.cs (3)
24internal LockOrUsingBinder(Binder enclosing) 78protected BoundExpression BindTargetExpression(BindingDiagnosticBag diagnostics, Binder originalBinder, TypeSymbol targetTypeOpt = null) 84BoundExpression boundExpression = originalBinder.BindValue(TargetExpressionSyntax, expressionDiagnostics, Binder.BindValueKind.RValueOrMethodGroup);
Binder\LoopBinderContext.cs (1)
18protected LoopBinder(Binder enclosing)
Binder\NameofBinder.cs (5)
26private readonly Binder? _withParametersBinder; 31internal NameofBinder(ExpressionSyntax nameofArgument, Binder next, WithTypeParametersBinder? withTypeParametersBinder, Binder? withParametersBinder) 60internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 92internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo info, LookupOptions options, Binder originalBinder)
Binder\ParamsCollectionTypeInProgressBinder.cs (1)
19internal ParamsCollectionTypeInProgressBinder(NamedTypeSymbol inProgress, Binder next, MethodSymbol? constructorInProgress = null)
Binder\ScriptLocalScopeBinder.cs (1)
19internal ScriptLocalScopeBinder(Labels labels, Binder next) : base(next)
Binder\Semantics\Conversions\Conversions.cs (9)
17private readonly Binder _binder; 19public Conversions(Binder binder) 24private Conversions(Binder binder, int currentRecursionDepth, bool includeNullability, Conversions otherNullabilityOpt) 65Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 86Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 97Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 251private static MethodGroupResolution ResolveDelegateOrFunctionPointerMethodGroup(Binder binder, BoundMethodGroup source, MethodSymbol delegateInvokeMethodOpt, bool isFunctionPointer, in CallingConventionInfo callingConventionInfo, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 300public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 473if (!(method.GetIsNewExtensionMember() && method.IsStatic) && !Binder.GetReceiverParameter(method).Type.IsReferenceType)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (15)
171Binder binder, 580private MethodTypeInferenceResult InferTypeArgs(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 598private void InferTypeArgsFirstPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 619private void MakeExplicitParameterTypeInferences(Binder binder, BoundExpression argument, TypeWithAnnotations target, ExactOrBoundsKind kind, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 661Binder binder, 718private bool MakeExplicitParameterTypeInferences(Binder binder, BoundTupleLiteral argument, TypeWithAnnotations target, ExactOrBoundsKind kind, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 762private bool InferTypeArgsSecondPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 812private InferenceResult DoSecondPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 860private void MakeOutputTypeInferences(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 874private void MakeOutputTypeInferences(Binder binder, BoundExpression argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 897private void MakeOutputTypeInferences(Binder binder, BoundUnconvertedCollectionExpression argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 918private void MakeOutputTypeInferences(Binder binder, BoundTupleLiteral argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1366private void OutputTypeInference(Binder binder, BoundExpression expression, TypeWithAnnotations target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1435private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1502Binder binder, BoundMethodGroup source,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (11)
31private readonly Binder _binder; 33public OverloadResolution(Binder binder) 587if (Binder.IsTypeOrValueExpression(receiverOpt)) 592bool isImplicitReceiver = Binder.WasImplicitReceiver(receiverOpt); 602bool keepStatic = isImplicitReceiver && isStaticContext || Binder.IsMemberAccessedThroughType(receiverOpt); 1296public static bool IsValidParams(Binder binder, Symbol member, bool disallowExpandedNonArrayParams, out TypeWithAnnotations definitionElementType) 1324public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 3836Binder binder, 3874Binder binder, 3943Binder binder, 4035Binder binder,
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
189Binder binder, 643Binder binder, 680? Binder.WasImplicitReceiver(receiverOpt) && binder.InFieldInitializer && !binder.BindingTopLevelScriptCode 738Binder binder, 751Binder.ReportQueryInferenceFailed(queryClause, inferenceFailed.Member.Name, receiver, arguments, symbols, diagnostics); 1081Binder binder, 1151Binder binder,
Binder\SimpleLocalScopeBinder.cs (1)
19public SimpleLocalScopeBinder(ImmutableArray<LocalSymbol> locals, Binder next) :
Binder\SimpleProgramBinder.cs (1)
20public SimpleProgramBinder(Binder enclosing, SynthesizedSimpleProgramEntryPointSymbol entryPoint)
Binder\SimpleProgramUnitBinder.cs (1)
20public SimpleProgramUnitBinder(Binder enclosing, SimpleProgramBinder scope)
Binder\SwitchBinder.cs (4)
28private SwitchBinder(Binder next, SwitchStatementSyntax switchSyntax) 200private void BuildSwitchLabels(SyntaxList<SwitchLabelSyntax> labelsSyntax, Binder sectionBinder, ArrayBuilder<LabelSymbol> labels, BindingDiagnosticBag tempDiagnosticBag) 376var binder = this.GetBinder(node); 472internal BoundStatement BindGotoCaseOrDefault(GotoStatementSyntax node, Binder gotoBinder, BindingDiagnosticBag diagnostics)
Binder\SwitchBinder_Patterns.cs (6)
21internal static SwitchBinder Create(Binder next, SwitchStatementSyntax switchSyntax) 29internal override BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 161Binder originalBinder, 182Binder originalBinder, 188Binder sectionBinder = originalBinder.GetBinder(node); // this binder can bind pattern variables from the section. 228Binder sectionBinder,
Binder\SwitchExpressionArmBinder.cs (1)
39Binder armBinder = this.GetRequiredBinder(node);
Binder\SwitchExpressionBinder.cs (4)
20internal SwitchExpressionBinder(SwitchExpressionSyntax switchExpressionSyntax, Binder next) 26internal override BoundExpression BindSwitchExpressionCore(SwitchExpressionSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 175private ImmutableArray<BoundSwitchExpressionArm> BindSwitchExpressionArms(SwitchExpressionSyntax node, Binder originalBinder, BoundExpression inputExpression, BindingDiagnosticBag diagnostics) 181var armBinder = originalBinder.GetRequiredBinder(arm);
Binder\TypeofBinder.cs (1)
27internal TypeofBinder(ExpressionSyntax typeExpression, Binder next)
Binder\UsingStatementBinder.cs (3)
21public UsingStatementBinder(Binder enclosing, UsingStatementSyntax syntax) 76internal override BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 90internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNode syntax, SyntaxToken usingKeyword, SyntaxToken awaitKeyword, Binder originalBinder, UsingStatementBinder? usingBinderOpt, BindingDiagnosticBag diagnostics)
Binder\WhileBinder.cs (3)
21public WhileBinder(Binder enclosing, StatementSyntax syntax) 28internal override BoundWhileStatement BindWhileParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 38internal override BoundDoStatement BindDoParts(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\WithClassTypeParametersBinder.cs (2)
23internal WithClassTypeParametersBinder(NamedTypeSymbol container, Binder next) 52internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\WithCrefTypeParametersBinder.cs (2)
24internal WithCrefTypeParametersBinder(CrefSyntax crefSyntax, Binder next) 139internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\WithExtensionParameterBinder.cs (3)
18internal WithExtensionParameterBinder(NamedTypeSymbol type, Binder next) 24internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAliasesBinder.cs (7)
22internal WithExternAliasesBinder(Binder next) 33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 50internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 72internal static WithExternAliasesBinder Create(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next) 77internal static WithExternAliasesBinder Create(ImmutableArray<AliasAndExternAliasDirective> externAliases, Binder next) 88internal FromSyntax(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next) 114internal FromSymbols(ImmutableArray<AliasAndExternAliasDirective> externAliases, Binder next)
Binder\WithExternAndUsingAliasesBinder.cs (3)
37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 54internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 93internal static new WithExternAndUsingAliasesBinder Create(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next)
Binder\WithLambdaParametersBinder.cs (3)
22public WithLambdaParametersBinder(LambdaSymbol lambdaSymbol, Binder enclosing) 87LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 102internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\WithMethodTypeParametersBinder.cs (2)
22internal WithMethodTypeParametersBinder(MethodSymbol methodSymbol, Binder next) 65internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder)
Binder\WithNullableContextBinder.cs (1)
16internal WithNullableContextBinder(SyntaxTree syntaxTree, int position, Binder next)
Binder\WithParametersBinder.cs (3)
24internal WithParametersBinder(ImmutableArray<ParameterSymbol> parameters, Binder next) 31internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 46LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (3)
21internal WithPrimaryConstructorParametersBinder(NamedTypeSymbol type, Binder next) 27internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 64LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (2)
16internal WithTypeParametersBinder(Binder next) 38LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (11)
25protected WithUsingNamespacesAndTypesBinder(Binder next, bool withImportChainEntry) 79Binder originalBinder) 132internal override void GetExtensionDeclarations(ArrayBuilder<NamedTypeSymbol> extensions, Binder originalBinder) 158LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 166ImmutableArray<Symbol> candidates = Binder.GetCandidateMembers(typeOrNamespace.NamespaceOrType, name, options, originalBinder: originalBinder); 223internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 279internal static WithUsingNamespacesAndTypesBinder Create(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withPreviousSubmissionImports = false, bool withImportChainEntry = false) 289internal static WithUsingNamespacesAndTypesBinder Create(ImmutableArray<NamespaceOrTypeAndUsingDirective> namespacesOrTypes, Binder next, bool withImportChainEntry = false) 300internal FromSyntax(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withImportChainEntry) 330internal FromSyntaxWithPreviousSubmissionImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withImportChainEntry) 365internal FromNamespacesOrTypes(ImmutableArray<NamespaceOrTypeAndUsingDirective> namespacesOrTypes, Binder next, bool withImportChainEntry)
BoundTree\BoundDagEvaluation.cs (1)
64return Binder.GetIndexerOrImplicitIndexerSymbol(indexerAccess);
BoundTree\BoundDiscardExpression.cs (2)
19public BoundDiscardExpression FailInference(Binder binder, BindingDiagnosticBag? diagnosticsOpt) 23Binder.Error(diagnosticsOpt, ErrorCode.ERR_DiscardTypeInferenceFailed, this.Syntax);
BoundTree\BoundExpressionExtensions.cs (1)
168public static void GetExpressionSymbols(this BoundExpression node, ArrayBuilder<Symbol> symbols, BoundNode parent, Binder binder)
BoundTree\BoundListPattern.cs (1)
16Debug.Assert(Binder.GetIndexerOrImplicitIndexerSymbol(IndexerAccess) is var _);
BoundTree\BoundMethodGroup.cs (2)
21Binder binder, 28private static FunctionTypeSymbol? GetFunctionType(Binder binder, SyntaxNode syntax)
BoundTree\BoundSlicePattern.cs (1)
14Debug.Assert(Binder.GetIndexerOrImplicitIndexerSymbol(IndexerAccess) is var _);
BoundTree\Constructors.cs (1)
132Binder binder)
BoundTree\OutDeconstructVarPendingInference.cs (1)
22public BoundDeconstructValuePlaceholder FailInference(Binder binder)
BoundTree\UnboundLambda.cs (21)
82public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 186BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 193UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 203BoundNode node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions, bool withDependencies) 243Binder binder, 392Binder binder, 464public Binder GetWithParametersBinder(LambdaSymbol lambdaSymbol, Binder binder) 521internal readonly Binder Binder; 535public UnboundLambdaState(Binder binder, bool includeCache) 588protected BoundBlock BindLambdaBody(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) 595Binder.RecordLambdaBinding(UnboundLambda.Syntax); 599protected abstract BoundBlock BindLambdaBodyCore(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics); 610protected abstract BoundBlock CreateBlockFromLambdaExpressionBody(Binder lambdaBodyBinder, BoundExpression expression, BindingDiagnosticBag diagnostics); 803Binder lambdaBodyBinder; 873if (Binder.MethodOrLambdaRequiresValue(lambdaSymbol, this.Binder.Compilation)) 1155public virtual Binder GetWithParametersBinder(LambdaSymbol lambdaSymbol, Binder binder) 1463Binder binder, 1600protected override BoundBlock CreateBlockFromLambdaExpressionBody(Binder lambdaBodyBinder, BoundExpression expression, BindingDiagnosticBag diagnostics) 1605protected override BoundBlock BindLambdaBodyCore(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics)
BoundTree\VariablePendingInference.cs (4)
34internal BoundExpression SetInferredTypeWithAnnotations(TypeWithAnnotations type, Binder? binderOpt, BindingDiagnosticBag? diagnosticsOpt) 65Binder.CheckRestrictedTypeInAsyncMethod(localSymbol.ContainingSymbol, type.Type, diagnosticsOpt, typeOrDesignationSyntax); 114internal BoundExpression FailInference(Binder binder, BindingDiagnosticBag? diagnosticsOpt) 134Binder.Error(
CodeGen\EmitArrayInitializer.cs (3)
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); 779rosArrayCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Array, _diagnostics, syntax: syntax, isOptional: true);
CodeGen\EmitExpression.cs (3)
18using static Microsoft.CodeAnalysis.CSharp.Binder; 3497if (Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_Text_Encoding__get_UTF8, _diagnostics, syntax: syntaxNode) == null | 3498Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_Text_Encoding__GetString, _diagnostics, syntax: syntaxNode) == null)
CodeGen\EmitOperators.cs (2)
786return IsUnsigned(Binder.GetEnumPromotedType(op.Left.Type.GetEnumUnderlyingType().SpecialType)); 789return IsUnsigned(Binder.GetEnumPromotedType(op.Right.Type.GetEnumUnderlyingType().SpecialType));
CodeGen\EmitStackAllocInitializer.cs (2)
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)
CodeGen\EmitStatement.cs (9)
21using static Microsoft.CodeAnalysis.CSharp.Binder; 1393var int32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Int32, syntaxNode, _diagnostics); 1418var charType = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics); 1518var UInt32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_UInt32, syntaxNode, _diagnostics); 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); 1628var spanTLengthMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation, 1652var spanTIndexerMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_module.Compilation,
Compilation\AttributeSemanticModel.cs (6)
26Binder rootBinder, 39public static AttributeSemanticModel Create(PublicSemanticModel containingSemanticModel, AttributeSyntax syntax, NamedTypeSymbol attributeType, AliasSymbol aliasOpt, Symbol? attributeTarget, Binder rootBinder, ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt) 48public static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, AttributeSyntax syntax, NamedTypeSymbol attributeType, AliasSymbol aliasOpt, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, int position) 85internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 104Binder binder, 113protected override void AnalyzeBoundNodeNullability(BoundNode boundRoot, Binder binder, DiagnosticBag diagnostics, bool createSnapshots)
Compilation\CSharpCompilation.cs (8)
31using static Microsoft.CodeAnalysis.CSharp.Binder; 2191var binder = GetBinder(syntax); 2605internal Binder GetBinder(CSharpSyntaxNode syntax) 4286var binaryKind = Binder.SyntaxKindToBinaryOperatorKind(SyntaxFacts.GetBinaryExpression(syntaxKind)); 4510var unaryKind = Binder.SyntaxKindToUnaryOperatorKind(SyntaxFacts.GetPrefixUnaryExpression(syntaxKind)); 4693return Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctor, diagnostics, location) is object && 4694Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctorTransformFlags, diagnostics, location) is object; 4698Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_TupleElementNamesAttribute__ctorTransformNames, diagnostics, location) is object;
Compilation\CSharpSemanticModel.cs (48)
167internal abstract BoundExpression GetSpeculativelyBoundExpression(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, out Binder binder, out ImmutableArray<Symbol> crefSymbols); 202internal Binder GetSpeculativeBinder(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 216Binder binder = this.GetEnclosingBinder(position); 238private Binder GetSpeculativeBinderForAttribute(int position, AttributeSyntax attribute) 242var binder = this.GetEnclosingBinder(position); 251private static BoundExpression GetSpeculativelyBoundExpressionHelper(Binder binder, ExpressionSyntax expression, SpeculativeBindingOption bindingOption) 279protected BoundExpression GetSpeculativelyBoundExpressionWithoutNullability(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, out Binder binder, out ImmutableArray<Symbol> crefSymbols) 324internal static ImmutableArray<Symbol> BindCref(CrefSyntax crefSyntax, Binder binder) 333var binder = this.GetEnclosingBinder(position); 399private BoundAttribute GetSpeculativelyBoundAttribute(int position, AttributeSyntax attribute, out Binder binder) 720Binder binder; 751Binder binder; 807var binder = memberModel.GetEnclosingBinder(position); 822private static SymbolInfo GetSymbolInfoFromBoundConstructorInitializer(MemberSemanticModel memberModel, Binder binder, BoundExpressionStatement bnode) 880var binder = memberModel.GetEnclosingBinder(LookupPosition.IsBetweenTokens(position, argumentList.OpenParenToken, argumentList.CloseParenToken) ? position : argumentList.OpenParenToken.SpanStart); 1197Binder binder; 1217internal Binder GetEnclosingBinder(int position) 1219Binder result = GetEnclosingBinderInternal(position); 1224internal abstract Binder GetEnclosingBinderInternal(int position); 1582var binder = GetEnclosingBinder(position); 1695private void AppendSymbolsWithName(ArrayBuilder<ISymbol> results, string name, Binder binder, NamespaceOrTypeSymbol container, LookupOptions options, LookupSymbolsInfo info) 1732Binder binder, 1830var binder = this.GetEnclosingBinder(position); 1879Binder binderOpt) 2216var binder = this.GetEnclosingBinder(boundExpr.Syntax.Span.Start); 2284Binder binderOpt) 2305Binder binderOpt) 2396internal virtual BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 2772var binder = GetSpeculativeBinderForAttribute(position, attribute); 2859var binder = this.GetEnclosingBinder(position); 2911var binder = this.GetEnclosingBinder(position); 3274Binder enclosingBinder = this.GetEnclosingBinder(GetAdjustedNodePosition(forEachStatement)); 3281Binder foreachBinder = enclosingBinder.GetBinder(forEachStatement); 3312Binder enclosingBinder = this.GetEnclosingBinder(GetAdjustedNodePosition(catchClause)); 3319Binder catchBinder = enclosingBinder.GetBinder(catchClause); 3352Binder binderOpt, 3690Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 3973Binder binderOpt, 4026Binder binderOpt, 4041Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(lowestBoundNode.Syntax)); 4090private ImmutableArray<IPropertySymbol> GetIndexerGroupSemanticSymbols(BoundExpression boundNode, Binder binderOpt) 4101Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 4244Binder binderOpt, 4262Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 4397Binder binderOpt, 4570internal static ImmutableArray<Symbol> GetReducedAndFilteredMethodGroupSymbols(Binder binder, BoundMethodGroup node) 4911var binder = GetEnclosingBinder(position); 5409var binder = GetEnclosingBinder(position);
Compilation\InitializerSemanticModel.cs (10)
28Binder rootBinder, 39internal static InitializerSemanticModel Create(SyntaxTreeSemanticModel containingSemanticModel, CSharpSyntaxNode syntax, FieldSymbol fieldSymbol, Binder rootBinder) 49internal static InitializerSemanticModel Create(SyntaxTreeSemanticModel containingSemanticModel, CSharpSyntaxNode syntax, PropertySymbol propertySymbol, Binder rootBinder) 59internal static InitializerSemanticModel Create(PublicSemanticModel containingSemanticModel, ParameterSyntax syntax, ParameterSymbol parameterSymbol, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt) 69internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, Symbol owner, EqualsValueClauseSyntax syntax, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, int position) 111internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 146private BoundEqualsValue BindEqualsValue(Binder binder, EqualsValueClauseSyntax equalsValue, BindingDiagnosticBag diagnostics) 205var binder = this.GetEnclosingBinder(position); 255Binder binder, 266protected override void AnalyzeBoundNodeNullability(BoundNode boundRoot, Binder binder, DiagnosticBag diagnostics, bool createSnapshots)
Compilation\MemberSemanticModel.cs (38)
39internal readonly Binder RootBinder; 48Binder rootBinder, 173var binder = this.GetSpeculativeBinder(position, expression, bindingOption); 191internal override BoundExpression GetSpeculativelyBoundExpression(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, out Binder binder, out ImmutableArray<Symbol> crefSymbols) 214private Binder GetEnclosingBinderInternalWithinRoot(SyntaxNode node, int position) 220private static Binder GetEnclosingBinderInternalWithinRoot(SyntaxNode node, int position, Binder rootBinder, SyntaxNode root) 232Binder binder = null; 385private static Binder AdjustBinderForPositionWithinStatement(int position, Binder binder, StatementSyntax stmt) 473var binder = this.GetEnclosingBinderInternal(expression, GetAdjustedNodePosition(expression)); 497var binder = this.GetEnclosingBinderInternal(expression, GetAdjustedNodePosition(expression)); 694for (var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(declarationSyntax)); binder != null; binder = binder.Next) 735private static LocalFunctionSymbol GetDeclaredLocalFunction(Binder enclosingBinder, SyntaxToken declaredIdentifier) 737for (var binder = enclosingBinder; binder != null; binder = binder.Next) 755var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(declarationSyntax)); 781var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(declarationSyntax)); 1574internal override Binder GetEnclosingBinderInternal(int position) 1593private Binder GetEnclosingBinderInternal(CSharpSyntaxNode node, int position) 1648Binder lambdaRecoveryBinder; 1688Binder incrementalBinder = new IncrementalBinder(this, lambdaRecoveryBinder); 1738private Binder GetEnclosingBinderInLambdaOrQuery(int position, CSharpSyntaxNode node, CSharpSyntaxNode innerLambdaOrQuery, ref BoundNode boundInnerLambdaOrQuery) 1741Binder result; 1765private static Binder GetQueryEnclosingBinder(int position, CSharpSyntaxNode startingNode, BoundQueryClause queryClause) 1897private static Binder GetLambdaEnclosingBinder(int position, CSharpSyntaxNode startingNode, CSharpSyntaxNode containingLambda, Binder lambdaBinder) 1961Binder binder; 1985BoundNode bind(CSharpSyntaxNode root, out Binder binder) 2010private Binder GetBinderToBindNode(CSharpSyntaxNode nodeToBind) 2012Binder binder; 2041Binder binder, 2053protected abstract void AnalyzeBoundNodeNullability(BoundNode boundRoot, Binder binder, DiagnosticBag diagnostics, bool createSnapshots); 2109var statementBinder = GetBinderToBindNode(nodeToBind); 2110Binder incrementalBinder = new IncrementalBinder(this, statementBinder); 2130var binder = GetBinderToBindNode(node); 2395internal IncrementalBinder(MemberSemanticModel semanticModel, Binder next) 2405internal override Binder GetBinder(SyntaxNode node) 2407Binder binder = this.Next.GetBinder(node);
Compilation\MemberSemanticModel.SpeculativeMemberSemanticModel.cs (3)
30Binder rootBinder, 45Binder binder, 55protected override void AnalyzeBoundNodeNullability(BoundNode boundRoot, Binder binder, DiagnosticBag diagnostics, bool createSnapshots)
Compilation\MethodBodySemanticModel.cs (18)
23internal readonly Binder? Binder; 30Binder? binder = null, 45Binder rootBinder, 74internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 115Binder rootBinder, 127Binder rootBinder, 138internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ArrowExpressionClauseSyntax syntax, Binder rootBinder, int position) 146internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ConstructorInitializerSyntax syntax, Binder rootBinder, int position) 154internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, PrimaryConstructorBaseTypeSyntax syntax, Binder rootBinder, int position) 172Binder binder = this.RootBinder; 188Binder executablebinder = new WithNullableContextBinder(SyntaxTree, position, binder ?? this.RootBinder); 190var blockBinder = executablebinder.GetBinder(body).WithAdditionalFlags(GetSemanticModelBinderFlags()); 206var binder = this.GetEnclosingBinder(position); 224var binder = this.GetEnclosingBinder(position); 244var binder = this.GetEnclosingBinder(position); 266var binder = this.GetEnclosingBinder(position); 289Binder binder, 299protected override void AnalyzeBoundNodeNullability(BoundNode boundRoot, Binder binder, DiagnosticBag diagnostics, bool createSnapshots)
Compilation\PublicSemanticModel.cs (1)
17protected AttributeSemanticModel CreateModelForAttribute(Binder enclosingBinder, AttributeSyntax attribute, MemberSemanticModel containingModel)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (7)
47Binder rootBinder, 76Binder rootBinder, 92Binder rootBinder, 105Binder rootBinder, 495internal override Binder GetEnclosingBinderInternal(int position) 515internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 565internal override BoundExpression GetSpeculativelyBoundExpression(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, out Binder binder, out ImmutableArray<Symbol> crefSymbols)
Compilation\SpeculativeSyntaxTreeSemanticModel.cs (7)
23private readonly Binder _rootBinder; 27public static SpeculativeSyntaxTreeSemanticModel Create(SyntaxTreeSemanticModel parentSemanticModel, TypeSyntax root, Binder rootBinder, int position, SpeculativeBindingOption bindingOption) 32public static SpeculativeSyntaxTreeSemanticModel Create(SyntaxTreeSemanticModel parentSemanticModel, CrefSyntax root, Binder rootBinder, int position) 37private static SpeculativeSyntaxTreeSemanticModel CreateCore(SyntaxTreeSemanticModel parentSemanticModel, CSharpSyntaxNode root, Binder rootBinder, int position, SpeculativeBindingOption bindingOption) 49private SpeculativeSyntaxTreeSemanticModel(SyntaxTreeSemanticModel parentSemanticModel, CSharpSyntaxNode root, Binder rootBinder, int position, SpeculativeBindingOption bindingOption) 91internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 96internal override Binder GetEnclosingBinderInternal(int position)
Compilation\SyntaxTreeSemanticModel.cs (14)
148internal override Binder GetEnclosingBinderInternal(int position) 225var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(node)); 251var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(node)); 334var binder = this.GetEnclosingBinder(GetAdjustedNodePosition(node)); 604Binder binder = GetSpeculativeBinder(position, type, bindingOption); 619Binder binder = GetEnclosingBinder(position); 738internal override BoundExpression GetSpeculativelyBoundExpression(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption, out Binder binder, out ImmutableArray<Symbol> crefSymbols) 760internal PublicSemanticModel CreateSpeculativeAttributeSemanticModel(int position, AttributeSyntax attribute, Binder binder, AliasSymbol aliasOpt, NamedTypeSymbol attributeType) 1074Binder defaultOuter() => _binderFactory.GetBinder(node).WithAdditionalFlags(this.IgnoresAccessibility ? BinderFlags.IgnoreAccessibility : BinderFlags.None); 1279private Binder GetFieldOrPropertyInitializerBinder(FieldSymbol symbol, Binder outer, EqualsValueClauseSyntax initializer) 1890Binder binder = GetEnclosingBinder(declarationSyntax.Position); 1950Binder binder = _binderFactory.GetInNamespaceBinder(declarationSyntax.Parent); 1983var binder = _binderFactory.GetInNamespaceBinder(declarationSyntax.Parent);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
39BoundExpression call = Binder.GenerateBaseParameterlessConstructorInitializer(this, diagnostics);
Compiler\DocumentationCommentCompiler.cs (2)
1058private static string GetDocumentationCommentId(CrefSyntax crefSyntax, Binder binder, BindingDiagnosticBag diagnostics) 1121Binder binder,
Compiler\DocumentationCommentCompiler.DocumentationCommentWalker.cs (2)
150Binder binder = factory.GetBinder(cref); 187Binder binder = factory.GetBinder(nameAttr, nameAttr.Identifier.SpanStart);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
516Binder binder = BinderFactory.MakeCrefBinder(crefSyntax, memberDeclSyntax, _compilation.GetBinderFactory(memberDeclSyntax.SyntaxTree)); 539Binder binder = MakeNameBinder(isParameter, isTypeParameterRef, _memberSymbol, _compilation, originatingSyntax.SyntaxTree); 547private static Binder MakeNameBinder(bool isParameter, bool isTypeParameterRef, Symbol memberSymbol, CSharpCompilation compilation, SyntaxTree syntaxTree) 549Binder binder = new BuckStopsHereBinder(compilation, FileIdentifier.Create(syntaxTree, compilation.Options.SourceReferenceResolver));
Compiler\MethodBodySynthesizer.cs (4)
245MethodSymbol getOrCreateMethod = (MethodSymbol)Binder.GetWellKnownTypeMember( 263MethodSymbol processHandlerMethod = (MethodSymbol)Binder.GetWellKnownTypeMember( 374Binder.ReportUseSite(updateMethod, diagnostics, syntax); 423Binder.ReportUseSite(compareExchangeMethod, diagnostics, syntax);
Compiler\MethodCompiler.cs (13)
476var processedStaticInitializers = new Binder.ProcessedFieldInitializers(); 477var processedInstanceInitializers = new Binder.ProcessedFieldInitializers(); 484Binder.BindFieldInitializers(_compilation, scriptInitializer, sourceTypeSymbol.StaticInitializers, _diagnostics, ref processedStaticInitializers); 487Binder.BindFieldInitializers(_compilation, scriptInitializer, sourceTypeSymbol.InstanceInitializers, _diagnostics, ref processedInstanceInitializers); 534Binder.ProcessedFieldInitializers processedInitializers = 537default(Binder.ProcessedFieldInitializers); 595var processedInitializers = default(Binder.ProcessedFieldInitializers); 650var processedInitializers = new Binder.ProcessedFieldInitializers() { BoundInitializers = ImmutableArray<BoundInitializer>.Empty }; 903ref Binder.ProcessedFieldInitializers processedInitializers, 1876Binder bodyBinder = sourceMethod.TryGetBodyBinder(); 2078CSharpSyntaxNode syntaxNode, Binder bodyBinder, 2090Binder current = bodyBinder; 2441var initializerInvocation = Binder.BindImplicitConstructorInitializer(method, diagnostics, compilation);
Emitter\Model\PEAssemblyBuilder.cs (5)
627Binder.ReportUseSite(result, diagnostics, Location.None); 634Binder.ReportUseSite(result, diagnostics, Location.None); 641Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__ctor, diagnostics, Location.None); 642Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, diagnostics, Location.None); 643Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__Inherited, diagnostics, Location.None);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
95var symbol = (MethodSymbol)Binder.GetWellKnownTypeMember(ModuleBeingBuilt.Compilation,
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (2)
46public static void AddAll(Binder binder, SyntaxToken questionToken, TypeWithAnnotations? type, DiagnosticBag diagnostics) 61private static void GetRawDiagnosticInfos(Binder binder, SyntaxToken questionToken, ArrayBuilder<DiagnosticInfo> infos)
Errors\LazyUseSiteDiagnosticsInfoForNullableType.cs (1)
37return Binder.GetNullableUnconstrainedTypeParameterDiagnosticIfNecessary(_languageVersion, _possiblyNullableTypeSymbol);
FlowAnalysis\AbstractFlowPass.cs (4)
572if (Binder.AccessingAutoPropertyFromConstructor(access, _symbol)) 1557if (method is null || Binder.GetCorrespondingParameter(i, method.Parameters, argsToParamsOpt, expanded)?.RefKind.IsWritableReference() != false) 2136return !Binder.AccessingAutoPropertyFromConstructor((BoundPropertyAccess)expr, _symbol); 2272if (Binder.AccessingAutoPropertyFromConstructor(node, _symbol))
FlowAnalysis\DefiniteAssignment.cs (4)
1119if (Binder.AccessingAutoPropertyFromConstructor(propAccess, this.CurrentSymbol)) 1451if (Binder.AccessingAutoPropertyFromConstructor(propertyAccess, this.CurrentSymbol)) 1611Binder.InferConstantIndexFromSystemIndex(compilation, elementAccess.Argument, length, out _) is 0)) 2751if (Binder.AccessingAutoPropertyFromConstructor(node, this.CurrentSymbol))
FlowAnalysis\NullableWalker.cs (14)
170private readonly Binder _binder; 462Binder binder, 1451var binder = method is SynthesizedSimpleProgramEntryPointSymbol entryPoint ? 1482Binder.ProcessedFieldInitializers discardedInitializers = default; 1483Binder.BindFieldInitializers(compilation, null, method.IsStatic ? containingType.StaticInitializers : containingType.InstanceInitializers, BindingDiagnosticBag.Discarded, ref discardedInitializers); 1548Binder binder, 1563Binder binder, 1579Binder binder, 1638Binder binder, 1716Binder binder, 1799Binder binder, 4820Binder binder, 6827var nameSyntax = Binder.GetNameSyntax(syntax, out _); 7928var parameter = Binder.GetCorrespondingParameter(argumentOrdinal, parametersOpt, argsToParamsOpt, expanded);
Generated\BoundNodes.xml.Generated.cs (9)
6281public BoundUnconvertedObjectCreationExpression(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<(string Name, Location Location)?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, InitializerExpressionSyntax? initializerOpt, Binder binder, bool hasErrors = false) 6300public Binder Binder { get; } 6305public BoundUnconvertedObjectCreationExpression Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<(string Name, Location Location)?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, InitializerExpressionSyntax? initializerOpt, Binder binder) 7591public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7612public Binder Binder { get; } 7617public BoundLambda Update(UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7675public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7696public Binder Binder { get; } 7702public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type)
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
132return Binder.GetWellKnownTypeMember(F.Compilation, member, bag, body.Syntax.Location);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
586var possiblePromote = Binder.GetEnumPromotedType(underlying.SpecialType);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
278Binder.ReportDiagnosticsIfObsolete(_diagnostics, node.EventSymbol.AssociatedField, node.Syntax, hasBaseReceiver, _containingSymbol, _containingSymbol.ContainingType, BinderFlags.None); 292Binder.ReportDiagnosticsIfObsolete(_diagnostics, node.Event, ((AssignmentExpressionSyntax)node.Syntax).Left, hasBaseReceiver, _containingSymbol, _containingSymbol.ContainingType, BinderFlags.None);
Lowering\DiagnosticsPass_Warnings.cs (1)
452if (!Binder.CheckConstantBounds(conversion.Operand.Type.SpecialType, constantValue, out _))
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
566return (MethodSymbol)Binder.GetWellKnownTypeMember(compilation, overload, diagnostics, syntax: syntax);
Lowering\Instrumentation\Instrumenter.cs (1)
19/// - original bound node produced by the <see cref="Binder"/> for the relevant portion of the code;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (2)
269=> (MethodSymbol?)Binder.GetWellKnownTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax, isOptional: false); 272=> (MethodSymbol?)Binder.GetSpecialTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax);
Lowering\IteratorRewriter\IteratorRewriter.cs (3)
142Binder.TryGetSpecialTypeMember(F.Compilation, member, body.Syntax, bag, out symbol); 148Binder.GetSpecialType(F.Compilation, type, body.Syntax, bag); 162Binder.Error(bag, ErrorCode.ERR_PropertyLacksGet, body.Syntax, symbol);
Lowering\LocalRewriter\LocalRewriter.cs (2)
600symbol = (TSymbol?)Binder.GetWellKnownTypeMember(_compilation, member, _diagnostics, syntax: syntax, isOptional: isOptional, location: location); 643return Binder.TryGetSpecialTypeMember(compilation, specialMember, syntax, diagnostics, out method, isOptional);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
395var operatorType = Binder.RelationalOperatorType(comparisonType);
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
51ConstantValue constantValue = Binder.GetAsOperatorConstantResult(rewrittenOperand.Type, rewrittenType, conversion.Kind, rewrittenOperand.ConstantValueOpt);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
138var iteratorBody = Binder.GetUnderlyingCollectionExpressionElement(node, ((BoundExpressionStatement)spreadElement.IteratorBody).Expression, throwOnErrors: true); 151var result = Binder.GetUnderlyingCollectionExpressionElement(node, (BoundExpression)element, throwOnErrors: true);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (7)
626if (Binder.TryFindImplicitOperatorFromArray(destinationType.OriginalDefinition) is not { } methodDefinition) 649if (Binder.TryFindImplicitOperatorFromSpan(sourceType.OriginalDefinition, destinationType.OriginalDefinition) is not { } implicitOperatorDefinition) 659if (Binder.NeedsSpanCastUp(sourceType, destinationType)) 661if (Binder.TryFindCastUpMethod(implicitOperator.ReturnType.OriginalDefinition, destinationType.OriginalDefinition) is not { } castUpMethodDefinition) 680Debug.Assert(Binder.NeedsSpanCastUp(sourceType, destinationType)); 682if (Binder.TryFindCastUpMethod(sourceType.OriginalDefinition, destinationType.OriginalDefinition) is not { } methodDefinition) 700if (Binder.TryFindAsSpanCharMethod(_compilation, destinationType) is not { } method)
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (10)
41ArrayBuilder<Binder.DeconstructionVariable> lhsTargets = GetAssignmentTargetsAndSideEffects(left, lhsTemps, lhsEffects); 44Binder.DeconstructionVariable.FreeDeconstructionVariables(lhsTargets); 56ArrayBuilder<Binder.DeconstructionVariable> lhsTargets, 152static bool canReorderTargetAssignments(ArrayBuilder<Binder.DeconstructionVariable> targets, ref PooledHashSet<Symbol>? visitedSymbols) 211ArrayBuilder<Binder.DeconstructionVariable> leftTargets, 443private ArrayBuilder<Binder.DeconstructionVariable> GetAssignmentTargetsAndSideEffects(BoundTupleExpression variables, ArrayBuilder<LocalSymbol> temps, ArrayBuilder<BoundExpression> effects) 445var assignmentTargets = ArrayBuilder<Binder.DeconstructionVariable>.GetInstance(variables.Arguments.Length); 452assignmentTargets.Add(new Binder.DeconstructionVariable(variable, variable.Syntax)); 458assignmentTargets.Add(new Binder.DeconstructionVariable(GetAssignmentTargetsAndSideEffects(tuple, temps, effects), tuple.Syntax)); 465assignmentTargets.Add(new Binder.DeconstructionVariable(temp, variable.Syntax));
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (3)
294disposeMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_IAsyncDisposable__DisposeAsync, _diagnostics, syntax: forEachSyntax); 298return Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, forEachSyntax, _diagnostics, out disposeMethod); 345Binder.ReportDiagnosticsIfObsolete(_diagnostics, disposeMethod, forEachSyntax,
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (1)
58ConstantValue constantValue = Binder.GetIsOperatorConstantResult(operandType, targetType, conversionKind, rewrittenOperand.ConstantValueOpt);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
225var toStringAndClear = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_Runtime_CompilerServices_DefaultInterpolatedStringHandler__ToStringAndClear, _diagnostics, syntax: syntax);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (2)
69Binder.CheckRequiredMembersInObjectInitializer(smallestConstructor, initializers: ImmutableArray<BoundExpression>.Empty, syntax, _diagnostics); 83Binder.CheckRequiredMembersInObjectInitializer(tuple8Ctor, initializers: ImmutableArray<BoundExpression>.Empty, syntax, _diagnostics);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
134var upconvertSpecialType = Binder.GetEnumPromotedType(underlyingType.SpecialType);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
451Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, resourceTypeSyntax, _diagnostics, out disposeMethod);
Lowering\SyntheticBoundNodeFactory.cs (8)
269Binder.ReportUseSite(propertySym, Diagnostics, Syntax); 299Binder.ReportUseSite(specialType, Diagnostics, Syntax); 311Binder.ReportUseSite(wellKnownType, Diagnostics, Syntax); 325Symbol? wellKnownMember = Binder.GetWellKnownTypeMember(Compilation, wm, Diagnostics, syntax: Syntax, isOptional: true); 814Binder.ReportUseSite(methodSymbol, Diagnostics, Syntax); 822Binder.ReportUseSite(methodSymbol, Diagnostics, Syntax); 1227return Throw(Null(Binder.GetWellKnownType(Compilation, Microsoft.CodeAnalysis.WellKnownType.System_Exception, Diagnostics, Syntax.Location))); 1310return new BoundSizeOfOperator(Syntax, Type(type), Binder.GetConstantSizeOf(type), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true };
Operations\CSharpOperationFactory.cs (7)
1262Create(Binder.GetUnderlyingCollectionExpressionElement(expr, (BoundExpression)element, throwOnErrors: false)); 1268Binder.GetUnderlyingCollectionExpressionElement(expr, ((BoundExpressionStatement)iteratorBody).Expression, throwOnErrors: false) : 1648var lengthSymbol = Binder.GetPropertySymbol(boundIndexerAccess.LengthOrCountAccess, out _, out _).GetPublicSymbol(); 1649var indexerSymbol = Binder.GetIndexerOrImplicitIndexerSymbol(boundIndexerAccess).GetPublicSymbol(); 2609Binder.GetIndexerOrImplicitIndexerSymbol(boundNode.IndexerAccess).GetPublicSymbol(), 2621lengthSymbol: Binder.GetPropertySymbol(boundNode.LengthAccess, out _, out _).GetPublicSymbol(), 2622indexerSymbol: Binder.GetIndexerOrImplicitIndexerSymbol(boundNode.IndexerAccess).GetPublicSymbol(),
Symbols\AliasSymbol.cs (1)
400var declarationBinder = ContainingSymbol.DeclaringCompilation
Symbols\Compilation_WellKnownMembers.cs (5)
394var ctorSymbol = (MethodSymbol)Binder.GetWellKnownTypeMember(this, constructor, useSiteInfo: out _, isOptional: true); 418var wellKnownMember = Binder.GetWellKnownTypeMember(this, arg.Key, useSiteInfo: out _, isOptional: true); 675var errorReported = Binder.ReportUseSite(userDefinedAttribute, diagnosticsOpt, locationOpt); 687var member = Binder.GetWellKnownTypeMember(this, attributeCtor, 691Binder.GetWellKnownTypeMember(this, secondAttributeCtor.Value, diagnosticsOpt, locationOpt);
Symbols\ConstantValueUtils.cs (4)
38var binder = binderFactory.GetBinder(equalsValueNode); 56Binder binder, 62Binder collisionDetector = new LocalScopeBinder(binder); 158Binder.CheckFeatureAvailability(node.Syntax, MessageID.IDS_FeatureConstantInterpolatedStrings, diagnostics);
Symbols\ConstraintsHelper.cs (4)
102Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureAllowsRefStructConstraint, diagnostics, location); 346Binder withTypeParametersBinder, 376Binder withTypeParametersBinder, 593Binder.CheckManagedAddr(args.CurrentCompilation, ((PointerTypeSymbol)type).PointedAtType, args.Location, args.Diagnostics);
Symbols\Extensions\SynthesizedExtensionMarker.cs (3)
52return (TypeWithAnnotations.Create(Binder.GetSpecialType(DeclaringCompilation, SpecialType.System_Void, GetFirstLocation(), diagnostics)), 66var withTypeParamsBinder = binderFactory.GetBinder(parameterList); 69var signatureBinder = withTypeParamsBinder.WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags.SuppressConstraintChecks, this);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
23public static FunctionPointerMethodSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 523Binder typeBinder,
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
18public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics)
Symbols\FunctionTypeSymbol.cs (6)
39private readonly Binder? _binder; 40private readonly Func<Binder, BoundExpression, NamedTypeSymbol?>? _calculateDelegate; 45internal static FunctionTypeSymbol? CreateIfFeatureEnabled(SyntaxNode syntax, Binder binder, Func<Binder, BoundExpression, NamedTypeSymbol?> calculateDelegate) 52private FunctionTypeSymbol(Binder binder, Func<Binder, BoundExpression, NamedTypeSymbol?> calculateDelegate)
Symbols\MemberSymbolExtensions.cs (1)
573&& !Binder.IsUserDefinedRecordCopyConstructor(methodSymbol);
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
23Binder binder, 35Binder binder,
Symbols\Source\GlobalExpressionVariable.cs (3)
88var binder = binderFactory.GetBinder(typeSyntax ?? SyntaxNode); 157protected virtual void InferFieldType(ConsList<FieldSymbol> fieldsBeingBound, Binder binder) 184protected override void InferFieldType(ConsList<FieldSymbol> fieldsBeingBound, Binder binder)
Symbols\Source\LambdaSymbol.cs (4)
17private readonly Binder _binder; 42Binder binder, 269internal override Binder OuterBinder => _binder; 271internal override Binder WithTypeParametersBinder => _binder;
Symbols\Source\LocalFunctionSymbol.cs (5)
19private readonly Binder _binder; 39Binder binder, 96internal Binder ScopeBinder { get; } 98internal override Binder OuterBinder => _binder; 100internal override Binder WithTypeParametersBinder
Symbols\Source\ModifierUtils.cs (2)
117=> ((result & modifier) != 0) && !Binder.CheckFeatureAvailability(errorLocation.SourceTree, featureID, diagnostics, errorLocation); 182Binder.CheckFeatureAvailability(errorLocation.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, errorLocation);
Symbols\Source\ParameterHelpers.cs (22)
21Binder withTypeParametersBinder, 41parameterCreationFunc: static (Binder context, Symbol owner, TypeWithAnnotations parameterType, 65Binder withTypeParametersBinder, 70var parameterCreationFunc = static (Binder context, Symbol owner, TypeWithAnnotations parameterType, 116Binder binder, 133parameterCreationFunc: static (Binder binder, FunctionPointerMethodSymbol owner, TypeWithAnnotations parameterType, 167Binder withTypeParametersBinder, 177Func<Binder, TOwningSymbol, TypeWithAnnotations, TParameterSyntax, RefKind, int, SyntaxToken, SyntaxToken, bool, ScopedKind, BindingDiagnosticBag, TParameterSymbol> parameterCreationFunc, 247Binder withTypeParametersBinder, 257Func<Binder, TOwningSymbol, TypeWithAnnotations, TParameterSyntax, RefKind, int, SyntaxToken, SyntaxToken, bool, ScopedKind, BindingDiagnosticBag, TParameterSymbol> parameterCreationFunc, 543Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureExtensionMethod, diagnostics); 547Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 576Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 674Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureReadOnlyReferences, diagnostics); 678Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 724Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics); 831Binder binder, 1119internal static ImmutableArray<CustomModifier> ConditionallyCreateInModifiers(RefKind refKind, bool addRefReadOnlyModifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1131internal static ImmutableArray<CustomModifier> CreateInModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1137private static ImmutableArray<CustomModifier> CreateRefReadonlyParameterModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1143internal static ImmutableArray<CustomModifier> CreateOutModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1148private static ImmutableArray<CustomModifier> CreateModifiers(WellKnownType modifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
Symbols\Source\SourceAssemblySymbol.cs (13)
655Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 664Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 667Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 701Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 720Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 724Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 794Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(_compilation, 841Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(_compilation, 1669Func<AttributeSyntax, Binder?, bool> attributeMatches = attribute switch 1681bool isPossibleAssemblySignatureKeyAttribute(AttributeSyntax node, Binder? rootBinderOpt) 1687bool isPossibleAssemblyKeyNameAttribute(AttributeSyntax node, Binder? rootBinderOpt) 1693bool isPossibleAssemblyKeyFileAttribute(AttributeSyntax node, Binder? rootBinderOpt) 1759private bool IsPossibleForwardedTypesAttribute(AttributeSyntax node, Binder rootBinderOpt)
Symbols\Source\SourceComplexParameterSymbol.cs (13)
82private Binder WithTypeParametersBinderOpt => (ContainingSymbol as SourceMethodSymbol)?.WithTypeParametersBinder; 238MakeDefaultExpression(BindingDiagnosticBag.Discarded, out var _, out var parameterEqualsValue); 252MakeDefaultExpression(diagnostics, out var binder, out var parameterEqualsValue), 274Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 294private Binder GetDefaultParameterValueBinder(SyntaxNode syntax) 296var binder = WithTypeParametersBinderOpt; 337var binder = GetDefaultParameterValueBinder(parameterSyntax); 360private ConstantValue MakeDefaultExpression(BindingDiagnosticBag diagnostics, out Binder? binder, out BoundParameterEqualsValue? parameterEqualsValue) 406valueBeforeConversion, diagnostics, Binder.ConversionForAssignmentFlags.DefaultParameter); 1564var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1622var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1654bool isAtLeastAsVisible(ParameterSyntax syntax, Binder binder, MethodSymbol method, BindingDiagnosticBag diagnostics) 1665void checkIsAtLeastAsVisible(ParameterSyntax syntax, Binder binder, MethodSymbol method, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceConstructorSymbolBase.cs (2)
42var bodyBinder = binderFactory.GetBinder(parameterList, syntax, this).WithContainingMemberOrLambda(this); 49var signatureBinder = bodyBinder.WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags.SuppressConstraintChecks, this);
Symbols\Source\SourceCustomEventSymbol.cs (2)
26internal SourceCustomEventSymbol(SourceMemberContainerTypeSymbol containingType, Binder binder, EventDeclarationSyntax syntax, BindingDiagnosticBag diagnostics) : 151Binder.CheckFeatureAvailability(syntax, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, this.GetFirstLocation());
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
51Binder binder = delegateType.GetBinder(syntax.ParameterList); 260Binder binder,
Symbols\Source\SourceDestructorSymbol.cs (1)
84var bodyBinder = this.DeclaringCompilation.GetBinderFactory(syntaxReferenceOpt.SyntaxTree).GetBinder(syntax, syntax, this);
Symbols\Source\SourceEventAccessorSymbol.cs (3)
116Binder.ReportUseSite(eventTokenType, diagnostics, this.Location); 132Binder.ReportUseSite(voidType, diagnostics, this.Location); 143Binder.ReportUseSite(voidType, diagnostics, this.Location);
Symbols\Source\SourceEventSymbol.cs (1)
809protected TypeWithAnnotations BindEventType(Binder binder, TypeSyntax typeSyntax, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
30internal SourceFieldLikeEventSymbol(SourceMemberContainerTypeSymbol containingType, Binder binder, SyntaxTokenList modifiers, VariableDeclaratorSyntax declaratorSyntax, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceFixedFieldSymbol.cs (2)
86Binder binder = binderFactory.GetBinder(sizeExpression); 92binder.BindValue(sizeExpression, diagnostics, Binder.BindValueKind.RValue),
Symbols\Source\SourceLocalSymbol.cs (24)
26private readonly Binder _scopeBinder; 43Binder scopeBinder, 77/// Binder that owns the scope for the local, the one that returns it in its <see cref="Binder.Locals"/> array. 79internal Binder ScopeBinder 94internal Binder TypeSyntaxBinder 124/// Binder that owns the scope for the local, the one that returns it in its <see cref="Binder.Locals"/> array. 137Binder scopeBinder, 138Binder nodeBinder, 157Binder scopeBinder, 158Binder nodeBinder, 188/// Binder that owns the scope for the local, the one that returns it in its <see cref="Binder.Locals"/> array. 202Binder scopeBinder, 209Binder initializerBinderOpt = null) 344Binder typeBinder = this.TypeSyntaxBinder; 515private readonly Binder _initializerBinder; 526Binder scopeBinder, 530Binder initializerBinder, 548for (var binder = _initializerBinder; binder != null; binder = binder.Next) 663private readonly Binder _nodeBinder; 667Binder scopeBinder, 668Binder nodeBinder, 726private readonly Binder _nodeBinder; 731Binder scopeBinder, 732Binder nodeBinder,
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1374Binder.CheckFeatureAvailability(t.DeclaringSyntaxReferences[0].GetSyntax(), MessageID.IDS_DefaultInterfaceImplementation, diagnostics, t.GetFirstLocation()); 1875Binder.ReportMissingTupleElementNamesAttributesIfNeeded(compilation, location, diagnostics);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1039if (Binder.ReportUseSite(overriddenMember, diagnostics, overridingMember.GetFirstLocation()))
Symbols\Source\SourceMemberFieldSymbol.cs (4)
150Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 373Binder.CheckFeatureAvailability(declarator, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, ErrorLocation); 479Binder.ReportUseSite(tokenTableType, diagnosticsForFirstDeclarator, this.ErrorLocation); 493var binder = binderFactory.GetBinder(typeSyntax);
Symbols\Source\SourceMemberMethodSymbol.cs (5)
765private Binder TryGetInMethodBinder(BinderFactory binderFactoryOpt = null) 773Binder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(contextNode.SyntaxTree)).GetBinder(contextNode); 775Binder current = result; 796Binder inMethod = TryGetInMethodBinder(binderFactoryOpt); 1061Binder.CheckFeatureAvailability(declarationSyntax, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, location);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
71internal virtual Binder? OuterBinder => null; 73internal virtual Binder? WithTypeParametersBinder => null;
Symbols\Source\SourceNamedTypeSymbol.cs (5)
51var baseBinder = this.DeclaringCompilation.GetBinder(bases); 338Binder binder; 419Binder binder; 1864Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Reflection_DefaultMemberAttribute__ctor, diagnostics, indexerSymbol.TryGetFirstLocation() ?? GetFirstLocation()); 1900if (Binder.MethodHasValidSliceSignature(slice))
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
219var baseBinder = this.DeclaringCompilation.GetBinder(bases); 448var baseBinder = this.DeclaringCompilation.GetBinder(bases); 572Binder.CheckFeatureAvailability(typeSyntax, MessageID.IDS_FeatureRefStructInterfaces, diagnostics);
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (2)
61var baseBinder = compilation.GetBinder(bases); 77Binder.ReportUseSite(defaultUnderlyingType, diagnostics, this.GetFirstLocation());
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
646Binder? declarationBinder = null;
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (1)
120var modifierType = Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, ReturnTypeLocation);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (8)
24Binder bodyBinder, 116var withTypeParamsBinder = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree).GetBinder(syntax.ReturnType, syntax, this); 123var signatureBinder = withTypeParamsBinder.WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags.SuppressConstraintChecks, this); 166Binder.CheckFeatureAvailability( 254var attributeConstructor = Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_Runtime_CompilerServices_ExtensionAttribute__ctor, out var useSiteInfo); 829Binder.CheckFeatureAvailability(SyntaxNode, MessageID.IDS_FeatureExtendedPartialMethods, diagnostics, location); 1065var withTypeParametersBinder = 1092var withTypeParametersBinder =
Symbols\Source\SourceParameterSymbol.cs (2)
31Binder context, 52Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(context.Compilation,
Symbols\Source\SourcePropertyAccessorSymbol.cs (4)
201Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeatureInitOnlySetters, diagnostics, location); 386var binder = GetBinder(); 391var isInitOnlyType = Binder.GetWellKnownType(this.DeclaringCompilation, 403private Binder GetBinder()
Symbols\Source\SourcePropertySymbol.cs (10)
19internal static SourcePropertySymbol Create(SourceMemberContainerTypeSymbol containingType, Binder bodyBinder, PropertyDeclarationSyntax syntax, BindingDiagnosticBag diagnostics) 26internal static SourcePropertySymbol Create(SourceMemberContainerTypeSymbol containingType, Binder bodyBinder, IndexerDeclarationSyntax syntax, BindingDiagnosticBag diagnostics) 34Binder binder, 147Binder.CheckFeatureAvailability( 554private Binder CreateBinderForTypeAndParameters() 560var binder = binderFactory.GetBinder(syntax, syntax, this); 568Binder binder = CreateBinderForTypeAndParameters(); 574private TypeWithAnnotations ComputeType(Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 622Binder binder, SourcePropertySymbolBase owner, BaseParameterListSyntax? parameterSyntaxOpt, BindingDiagnosticBag diagnostics, bool addRefReadOnlyModifier) 662private ImmutableArray<ParameterSymbol> ComputeParameters(Binder binder, CSharpSyntaxNode syntax, BindingDiagnosticBag diagnostics)
Symbols\Source\SourcePropertySymbolBase.cs (5)
271var modifierType = Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, TypeLocation); 473Binder rootBinder = GetAttributeBinder(indexerNameAttributeLists, DeclaringCompilation); 495static bool isPossibleIndexerNameAttribute(AttributeSyntax node, Binder? rootBinderOpt) 502static bool isPossibleIndexerNameAttributeInExtension(AttributeSyntax node, Binder? rootBinderOpt) 901Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation,
Symbols\Source\SourceUserDefinedConversionSymbol.cs (1)
18Binder bodyBinder,
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (1)
19Binder bodyBinder,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (4)
193Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, location); 224var binder = this.DeclaringCompilation. 229var signatureBinder = binder.WithAdditionalFlags(BinderFlags.SuppressConstraintChecks); 730Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureRelaxedShiftOperator, diagnostics, location);
Symbols\Symbol_Attributes.cs (21)
304Binder? binderOpt = null, 305Func<AttributeSyntax, Binder?, bool>? attributeMatchesOpt = null, 312ImmutableArray<Binder> binders; 335Binder.BindAttributeTypes(binders, attributesToBind, this, attributeTypesBuilder, beforeAttributePartBound, afterAttributePartBound, diagnostics); 373Binder.GetAttributes(binders, attributesToBind, boundAttributeTypes, attributeDataArray, boundAttributeArray, beforeAttributePartBound, afterAttributePartBound, diagnostics); 422Binder attributeBinder = binders[i]; 425Binder.CheckRequiredMembersInObjectInitializer(ctor, ImmutableArray<BoundExpression>.CastUp(boundAttribute.NamedArguments), boundAttribute.Syntax, diagnostics); 540protected ImmutableArray<(CSharpAttributeData, BoundAttribute)> BindAttributes(OneOrMany<SyntaxList<AttributeListSyntax>> attributeDeclarations, Binder? rootBinder) 545var binder = GetAttributeBinder(attributeListSyntaxList, DeclaringCompilation, rootBinder); 589Func<AttributeSyntax, Binder, bool> attributeMatchesOpt, 590Binder rootBinderOpt, 591out ImmutableArray<Binder> binders) 596ArrayBuilder<Binder> bindersBuilder = null; 614bindersBuilder = new ArrayBuilder<Binder>(); 641var binder = GetAttributeBinder(attributeDeclarationSyntaxList, compilation, rootBinderOpt); 658binders = ImmutableArray<Binder>.Empty; 669protected Binder GetAttributeBinder(SyntaxList<AttributeListSyntax> attributeDeclarationSyntaxList, CSharpCompilation compilation, Binder? rootBinder = null) 766ImmutableArray<Binder> binders, 838ImmutableArray<Binder> binders, 861Binder binder = binders[i];
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
245var symbol = Binder.GetWellKnownTypeMember(compilation, member, out var useSiteInfo);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
136Interlocked.CompareExchange(ref _capturedParameters, Binder.CapturedParametersFinder.GetCapturedParameters(this), null);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
29return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
35return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Void, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
82return (TypeWithAnnotations.Create(Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Type, diagnostics, Location), NullableAnnotation.NotAnnotated),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
69return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
37return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
34return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Int32, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (2)
32return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 35TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Object, location, diagnostics), annotation),
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
94return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 97TypeWithAnnotations.Create(Binder.GetWellKnownType(compilation, WellKnownType.System_Text_StringBuilder, diagnostics, location), annotation),
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
43return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, location, diagnostics), annotation),
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (4)
33var systemObject = Binder.GetSpecialType(compilation, SpecialType.System_Object, DummySyntax(), diagnostics); 43var systemVoid = Binder.GetSpecialType(compilation, SpecialType.System_Void, DummySyntax(), diagnostics); 350var binder = compilation.GetBinder(_userMainReturnTypeSyntax); 473Binder binder = WithUsingNamespacesAndTypesBinder.Create(compilation.GlobalImports, next: new BuckStopsHereBinder(compilation, null), withImportChainEntry: true);
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
297var baseConstructorCall = Binder.GenerateBaseParameterlessConstructorInitializer(this, diagnostics);
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (7)
42_returnType = Binder.GetWellKnownType(compilation, WellKnownType.System_Threading_Tasks_Task, diagnostics, NoLocation.Singleton); 45_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Void, NoLocation.Singleton, diagnostics); 48_returnType = Binder.GetWellKnownType(compilation, WellKnownType.System_Threading_Tasks_Task_T, diagnostics, NoLocation.Singleton). 49Construct(Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics)); 52_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics); 59TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args")); 222Binder result = new BuckStopsHereBinder(compilation, FileIdentifier.Create(syntaxNode.SyntaxTree, compilation.Options.SourceReferenceResolver));
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
406boundInitializersOpt = Binder.BindFieldInitializers(
Symbols\Tuples\TupleTypeSymbol.cs (3)
254Binder.ReportUseSite(firstTupleType, diagnostics, syntax); 255Binder.ReportDiagnosticsIfObsoleteInternal(diagnostics, firstTupleType, syntax, firstTupleType.ContainingType, BinderFlags.None); 494Binder.Error(diagnostics, ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly, syntax, relativeDescriptor.Name, type, type.ContainingAssembly);
Symbols\TypeWithAnnotations.cs (6)
539public void ReportDiagnosticsIfObsolete(Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) => 547private void ReportDiagnosticsIfObsoleteCore(Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 877internal abstract void ReportDiagnosticsIfObsolete(TypeWithAnnotations type, Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics); 940internal override void ReportDiagnosticsIfObsolete(TypeWithAnnotations type, Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 1033internal override void ReportDiagnosticsIfObsolete(TypeWithAnnotations type, Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 1176internal override void ReportDiagnosticsIfObsolete(TypeWithAnnotations type, Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (12)
Semantics\PatternMatchingTestBase.cs (1)
461var binder = model.GetEnclosingBinder(node.SpanStart);
Semantics\PatternMatchingTests4.cs (11)
4019var binder = model.GetEnclosingBinder(@switch.SpanStart); 4088var binder = model.GetEnclosingBinder(@switch.SpanStart); 4161var binder = model.GetEnclosingBinder(@switch.SpanStart); 4233var binder = model.GetEnclosingBinder(@is.SpanStart); 4277var binder = model.GetEnclosingBinder(@switch.SpanStart); 4324var binder = model.GetEnclosingBinder(@switch.SpanStart); 4406var binder = model.GetEnclosingBinder(@switch.SpanStart); 4488var binder = model.GetEnclosingBinder(@switch.SpanStart); 4570var binder = model.GetEnclosingBinder(@switch.SpanStart); 4652var binder = model.GetEnclosingBinder(@switch.SpanStart); 4736var binder = model.GetEnclosingBinder(@switch.SpanStart);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ImportsTests.cs (1)
113var binder = comp.GetBinderFactory(tree).GetInNamespaceBinder((CSharpSyntaxNode)tree.GetRoot());
Semantics\LookupTests.cs (2)
428var binder = ((CSharpSemanticModel)model).GetEnclosingBinder(position); 584var binder = ((CSharpSemanticModel)model).GetEnclosingBinder(position);
Semantics\OperatorTests.cs (2)
7332var binder = model.GetEnclosingBinder(methodBody.SpanStart); 8815var binder = model.GetEnclosingBinder(methodBody.SpanStart);
Semantics\UnsafeTests.cs (1)
5200var binder = ((CSharpSemanticModel)model).GetEnclosingBinder(methodBody.SpanStart);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\SemanticModelAPITests.cs (1)
2271var binder = ((CSharpSemanticModel)speculativeModel).GetEnclosingBinder(initializer.SpanStart);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2171var binder = ((CSharpSemanticModel)model).GetEnclosingBinder(pos);
DocumentationComments\CrefTests.cs (2)
5517var binder = factory.GetBinder(cref); 6636var binder = binderFactory.GetBinder(crefSyntax);