25 types derived from Binder
Microsoft.CodeAnalysis.CSharp (25)
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)
18internal sealed class LocalInProgressBinder : Binder
Binder\LocalScopeBinder.cs (1)
17internal partial class LocalScopeBinder : Binder
Binder\NameofBinder.cs (1)
20internal 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\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);
1143 references to Binder
Microsoft.CodeAnalysis.CSharp (1121)
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)
37internal Binder(Binder next, Conversions? conversions = null) 46protected Binder(Binder next, BinderFlags flags) 83protected internal Binder? Next { get; } 88protected internal Binder NextRequired 164internal virtual Binder? GetBinder(SyntaxNode node) 174internal Binder GetRequiredBinder(SyntaxNode node) 176var binder = GetBinder(node); 838internal Binder[] GetAllBinders() 840var binders = ArrayBuilder<Binder>.GetInstance(); 841for (Binder? binder = this; binder != null; binder = binder.Next) 901for (Binder? scope = this; scope != null; scope = scope.Next) 929static (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) 116internal 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_Conversions.cs (10)
536SyntaxNode syntax, InitializerExpressionSyntax? initializerOpt, Binder binder, 762Binder? current = this; 835var binder = WithAdditionalFlags(BinderFlags.CollectionExpressionConversionValidation); 920Binder binder, 963Binder? current = this; 998var addMethodBinder = WithAdditionalFlags(BinderFlags.CollectionInitializerAddMethod | BinderFlags.CollectionExpressionConversionValidation); 1015Binder addMethodBinder, 1033Binder addMethodBinder, 1073Binder addMethodBinder, 1088Binder addMethodBinder,
Binder\Binder_Crefs.cs (1)
961Binder parameterOrReturnTypeBinder = this.WithAdditionalFlags(BinderFlags.CrefParameterOrReturnType);
Binder\Binder_Expressions.cs (19)
448Binder initializerBinder = this.GetBinder(initializerOpt); 483internal Binder CreateBinderForParameterDefaultValue( 503Binder defaultValueBinder = this.GetBinder(defaultValueSyntax); 521Binder initializerBinder = this.GetBinder(equalsValueSyntax); 1651Binder current = this; 1703Binder binder = this; 1711if (binder is { Next: Binder withPrimaryConstructorParametersBinder }) 4686Binder argumentListBinder = null; 5171static BoundNode bindElement(CollectionElementSyntax syntax, BindingDiagnosticBag diagnostics, Binder @this, int nestingLevel) 5182static BoundNode bindSpreadElement(SpreadElementSyntax syntax, BindingDiagnosticBag diagnostics, Binder @this) 5586var objectInitializerMemberBinder = useObjectInitDiagnostics 5613Binder objectInitializerMemberBinder, 6112var collectionInitializerAddMethodBinder = this.WithAdditionalFlags(BinderFlags.CollectionInitializerAddMethod); 6171Binder collectionInitializerAddMethodBinder, 6216Binder collectionInitializerAddMethodBinder = null, 6255Binder collectionInitializerAddMethodBinder, 6306Binder collectionInitializerAddMethodBinder, 6408Binder collectionInitializerAddMethodBinder, 7252var binder = this.GetBinder(node);
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)
2260var binder = this.GetBinder(node);
Binder\Binder_Lambda.cs (1)
434Func<Binder, TSyntax, TArg, BindingDiagnosticBag, TResult> bind)
Binder\Binder_Lookup.cs (39)
61private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 66var binder = this.LookupSymbolsInternal(result, name, arity, basesBeingResolved, options, diagnose: false, useSiteInfo: ref useSiteInfo); 73var otherBinder = this.LookupSymbolsInternal(result, name, arity, basesBeingResolved, options, diagnose: true, useSiteInfo: ref useSiteInfo); 81private Binder LookupSymbolsInternal( 87Binder binder = null; 88for (var scope = this; scope != null && !result.IsMultiViable; scope = scope.Next) 116LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 164protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 180protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 220private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 256LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 400Binder originalBinder, 443private static void LookupMembersInNamespace(LookupResult result, NamespaceSymbol ns, string name, int arity, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 463var binder = scope.Binder; 758Binder originalBinder) 764LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 785Binder originalBinder, 800Binder originalBinder, 879Binder originalBinder, 1019Binder originalBinder, 1122Binder originalBinder, 1150private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1168private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1293internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, string name, LookupOptions options, Binder originalBinder) 1317internal static ImmutableArray<Symbol> GetCandidateMembers(NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1369for (var binder = this; binder != null; binder = binder.Next) 1831for (var scope = this; scope != null; scope = scope.Next) 1843internal virtual void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo info, LookupOptions options, Binder originalBinder) 1851internal void AddMemberLookupSymbolsInfo(LookupSymbolsInfo result, NamespaceOrTypeSymbol nsOrType, LookupOptions options, Binder originalBinder) 1863private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1887protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 1919LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 1938static void addAliasSymbolToResult(LookupSymbolsInfo result, AliasSymbol aliasSymbol, LookupOptions options, Binder originalBinder) 1948private static void AddMemberLookupSymbolsInfoInNamespace(LookupSymbolsInfo result, NamespaceSymbol ns, LookupOptions options, Binder originalBinder) 1960private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1972private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1987private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2018private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2033private void AddMemberLookupSymbolsInfoInTypeParameter(LookupSymbolsInfo result, TypeParameterSymbol type, LookupOptions options, Binder originalBinder)
Binder\Binder_NameConflicts.cs (1)
102for (Binder? binder = this; binder != null; binder = binder.Next)
Binder\Binder_Operators.cs (2)
1381Binder.CheckFeatureAvailability(node, MessageID.IDS_DefaultInterfaceImplementation, diagnostics); 2834var binder = kind.Operator() == UnaryOperatorKind.BitwiseComplement ?
Binder\Binder_Patterns.cs (3)
149Binder? switchBinder = this.GetBinder(node); 156Binder originalBinder, 828ConstantValue result = Binder.GetIsOperatorConstantResult(expressionType, patternType, conversion.Kind, operandConstantValue, operandCouldBeNull);
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 (34)
171var unsafeBinder = this.GetBinder(node); 187var fixedBinder = this.GetBinder(node); 296var lockBinder = this.GetBinder(node); 301internal virtual BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 308var usingBinder = this.GetBinder(node); 313internal virtual BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 320Binder binder; 475var binder = this.LookupSymbolsWithFallback(result, node.Identifier.ValueText, arity: 0, useSiteInfo: ref useSiteInfo, options: LookupOptions.LabelsOnly); 1851var binder = GetBinder(node); 2645Binder switchBinder = this.GetBinder(node); 2649internal virtual BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 2663var loopBinder = this.GetBinder(node); 2668internal virtual BoundWhileStatement BindWhileParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2675var loopBinder = this.GetBinder(node); 2681internal virtual BoundDoStatement BindDoParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2688var loopBinder = this.GetBinder(node); 2693internal virtual BoundForStatement BindForParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2786Binder loopBinder = this.GetBinder(node); 2790internal virtual BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2798internal virtual BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 2825private static SwitchBinder GetSwitchBinder(Binder binder) 3132var catchBinder = this.GetBinder(catchSyntax); 3181var filterBinder = this.GetBinder(filter); 3231var binder = GetBinder(node); 3469Binder bodyBinder = this.GetBinder(expressionBody); 3475static BoundBlock bindExpressionBodyAsBlockInternal(ArrowExpressionClauseSyntax expressionBody, Binder bodyBinder, BindingDiagnosticBag diagnostics) 3490Binder bodyBinder = this.GetBinder(body); 3502Binder bodyBinder = this.GetBinder(body); 3590Binder initializerBinder = GetBinder(baseWithArguments); 3624Binder bodyBinder = this.GetBinder(constructor); 3767Binder outerBinder; 3811Binder initializerBinder = outerBinder.WithAdditionalFlagsAndContainingMemberOrLambda(BinderFlags.ConstructorInitializer, constructor); 3839if (Binder.ReportUseSite(baseConstructor, diagnostics, diagnosticsLocation)) 3895if (Binder.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. 1358var binder = !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias) 2648internal static ContextualAttributeBinder TryGetContextualAttributeBinder(Binder binder)
Binder\BinderFactory.BinderFactoryVisitor.cs (83)
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) 662public override Binder VisitDelegateDeclaration(DelegateDeclarationSyntax parent) 671Binder resultBinder; 674Binder outer = VisitCore(parent.Parent); // a binder for the body of the enclosing type or namespace 694public override Binder VisitEnumDeclaration(EnumDeclarationSyntax parent) 706Binder resultBinder; 709Binder outer = VisitCore(parent.Parent); // a binder for the body of the type enclosing this type 725private Binder VisitTypeDeclarationCore(TypeDeclarationSyntax parent) 758internal Binder VisitTypeDeclarationCore(TypeDeclarationSyntax parent, NodeUsage extraInfo) 762Binder resultBinder; 804public override Binder VisitClassDeclaration(ClassDeclarationSyntax node) 809public override Binder VisitStructDeclaration(StructDeclarationSyntax node) 814public override Binder VisitInterfaceDeclaration(InterfaceDeclarationSyntax node) 819public override Binder VisitRecordDeclaration(RecordDeclarationSyntax node) 822public sealed override Binder VisitNamespaceDeclaration(NamespaceDeclarationSyntax parent) 838public override Binder VisitFileScopedNamespaceDeclaration(FileScopedNamespaceDeclarationSyntax parent) 853internal Binder VisitNamespaceDeclaration(BaseNamespaceDeclarationSyntax parent, int position, bool inBody, bool inUsing) 860Binder result; 863Binder outer; 895private static Binder MakeNamespaceBinder(CSharpSyntaxNode node, NameSyntax name, Binder outer, bool inUsing) 931public override Binder VisitCompilationUnit(CompilationUnitSyntax parent) 939internal Binder VisitCompilationUnit(CompilationUnitSyntax compilationUnit, bool inUsing, bool inScript) 951Binder result; 1034private static Binder AddInImportsBinders(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool inUsing) 1101public override Binder VisitDocumentationCommentTrivia(DocumentationCommentTriviaSyntax parent) 1110public override Binder VisitCrefParameter(CrefParameterSyntax parent) 1119public override Binder VisitConversionOperatorMemberCref(ConversionOperatorMemberCrefSyntax parent) 1130public override Binder VisitXmlCrefAttribute(XmlCrefAttributeSyntax parent) 1141private Binder VisitXmlCrefAttributeInternal(XmlCrefAttributeSyntax parent, NodeUsage extraInfo) 1148Binder result; 1166public override Binder VisitXmlNameAttribute(XmlNameAttributeSyntax parent) 1197Binder result; 1202Binder outerBinder = VisitCore(GetEnclosingDocumentationComment(parent)); 1238private Binder GetParameterNameAttributeValueBinder(MemberDeclarationSyntax memberSyntax, Binder nextBinder) 1242Binder outerBinder = VisitCore(memberSyntax.Parent); 1250Binder outerBinder = VisitCore(memberSyntax); 1265Binder outerBinder = VisitCore(memberSyntax.Parent); 1287Binder outerBinder = VisitCore(memberSyntax.Parent); 1306private Binder GetTypeParameterNameAttributeValueBinder(MemberDeclarationSyntax memberSyntax, bool includeContainingSymbols, Binder nextBinder) 1310Binder outerBinder = VisitCore(memberSyntax.Parent); 1324Binder outerBinder = VisitCore(memberSyntax.Parent); 1336Binder outerBinder = VisitCore(memberSyntax.Parent); 1343Binder outerBinder = VisitCore(memberSyntax.Parent); 1371internal static Binder MakeCrefBinder(CrefSyntax crefSyntax, MemberDeclarationSyntax memberSyntax, BinderFactory factory, bool inParameterOrReturnType = false) 1376Binder binder = memberSyntax is BaseTypeDeclarationSyntax typeDeclSyntax 1382Binder getBinder(BaseTypeDeclarationSyntax baseTypeDeclaration) 1396private 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)) 1290matches = Binder.ExpressionOfTypeMatchesPatternType(_conversions, t2.Type, t1.Type, ref useSiteInfo, out _); 1518ConstantValue 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)
524private Binder _scopeBinder; 525private Binder _enclosingBinder; 528Binder scopeBinder, 531Binder enclosingBinderOpt = null) 550Binder binder,
Binder\ExtensionMethodScope.cs (9)
16public readonly Binder Binder; 18public ExtensionMethodScope(Binder binder) 30private readonly Binder _binder; 32public ExtensionMethodScopes(Binder binder) 48private readonly Binder _binder; 51public ExtensionMethodScopeEnumerator(Binder binder) 70var binder = _current.Binder; 78private static ExtensionMethodScope 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 (4)
28internal InContainerBinder(NamespaceOrTypeSymbol container, Binder next) 80Binder originalBinder) 104LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 131internal 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 (36)
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); 850Binder filterBinder = clauseBinder.WithAdditionalFlags(BinderFlags.InCatchFilter); 883Binder finallyBinder; 962private void AddToMap(SyntaxNode node, Binder binder) 976Binder existing; 990private Binder GetBinderForPossibleEmbeddedStatement(StatementSyntax statement, Binder enclosing, out CSharpSyntaxNode embeddedScopeDesignator) 1022private void VisitPossibleEmbeddedStatement(StatementSyntax statement, Binder enclosing)
Binder\LocalInProgressBinder.cs (1)
22internal LocalInProgressBinder(LocalSymbol inProgress, 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)
24private readonly Binder? _withParametersBinder; 27internal NameofBinder(SyntaxNode nameofArgument, Binder next, WithTypeParametersBinder? withTypeParametersBinder, Binder? withParametersBinder) 52internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 84internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo info, LookupOptions options, Binder originalBinder)
Binder\ParamsCollectionTypeInProgressBinder.cs (1)
18internal ParamsCollectionTypeInProgressBinder(NamedTypeSymbol inProgress, Binder next)
Binder\ScriptLocalScopeBinder.cs (1)
19internal ScriptLocalScopeBinder(Labels labels, Binder next) : base(next)
Binder\Semantics\Conversions\Conversions.cs (8)
17private readonly Binder _binder; 19public Conversions(Binder binder) 24private Conversions(Binder binder, int currentRecursionDepth, bool includeNullability, Conversions otherNullabilityOpt) 65Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 86Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 97Binder.AddUseSiteDiagnosticForSynthesizedAttribute( 249private static MethodGroupResolution ResolveDelegateOrFunctionPointerMethodGroup(Binder binder, BoundMethodGroup source, MethodSymbol delegateInvokeMethodOpt, bool isFunctionPointer, in CallingConventionInfo callingConventionInfo, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 295public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (15)
167Binder binder, 555private MethodTypeInferenceResult InferTypeArgs(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 573private void InferTypeArgsFirstPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 594private void MakeExplicitParameterTypeInferences(Binder binder, BoundExpression argument, TypeWithAnnotations target, ExactOrBoundsKind kind, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 636Binder binder, 693private bool MakeExplicitParameterTypeInferences(Binder binder, BoundTupleLiteral argument, TypeWithAnnotations target, ExactOrBoundsKind kind, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 737private bool InferTypeArgsSecondPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 787private InferenceResult DoSecondPhase(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 835private void MakeOutputTypeInferences(Binder binder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 849private void MakeOutputTypeInferences(Binder binder, BoundExpression argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 872private void MakeOutputTypeInferences(Binder binder, BoundUnconvertedCollectionExpression argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 893private void MakeOutputTypeInferences(Binder binder, BoundTupleLiteral argument, TypeWithAnnotations formalType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1341private void OutputTypeInference(Binder binder, BoundExpression expression, TypeWithAnnotations target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1410private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1477Binder binder, BoundMethodGroup source,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (11)
31private readonly Binder _binder; 33public OverloadResolution(Binder binder) 475if (arguments.IsExtensionMethodInvocation || Binder.IsTypeOrValueExpression(receiverOpt)) 480bool isImplicitReceiver = Binder.WasImplicitReceiver(receiverOpt); 490bool keepStatic = isImplicitReceiver && isStaticContext || Binder.IsMemberAccessedThroughType(receiverOpt); 1166public static bool IsValidParams(Binder binder, Symbol member, bool disallowExpandedNonArrayParams, out TypeWithAnnotations definitionElementType) 1194public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 3498Binder binder, 3536Binder binder, 3596Binder binder, 3688Binder 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\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)
21internal WithMethodTypeParametersBinder(MethodSymbol methodSymbol, Binder next) 64internal 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) 39LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (10)
25protected WithUsingNamespacesAndTypesBinder(Binder next, bool withImportChainEntry) 77Binder originalBinder) 131LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 139ImmutableArray<Symbol> candidates = Binder.GetCandidateMembers(typeOrNamespace.NamespaceOrType, name, options, originalBinder: originalBinder); 196internal override void AddLookupSymbolsInfoInSingleBinder(LookupSymbolsInfo result, LookupOptions options, Binder originalBinder) 252internal static WithUsingNamespacesAndTypesBinder Create(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withPreviousSubmissionImports = false, bool withImportChainEntry = false) 262internal static WithUsingNamespacesAndTypesBinder Create(ImmutableArray<NamespaceOrTypeAndUsingDirective> namespacesOrTypes, Binder next, bool withImportChainEntry = false) 273internal FromSyntax(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withImportChainEntry) 303internal FromSyntaxWithPreviousSubmissionImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, Binder next, bool withImportChainEntry) 338internal 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)
15Debug.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) 500internal readonly Binder Binder; 514public UnboundLambdaState(Binder binder, bool includeCache) 567protected BoundBlock BindLambdaBody(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) 574Binder.RecordLambdaBinding(UnboundLambda.Syntax); 578protected abstract BoundBlock BindLambdaBodyCore(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics); 589protected abstract BoundBlock CreateBlockFromLambdaExpressionBody(Binder lambdaBodyBinder, BoundExpression expression, BindingDiagnosticBag diagnostics); 781Binder lambdaBodyBinder; 851if (Binder.MethodOrLambdaRequiresValue(lambdaSymbol, this.Binder.Compilation)) 1133public virtual Binder GetWithParametersBinder(LambdaSymbol lambdaSymbol, Binder binder) 1441Binder binder, 1578protected override BoundBlock CreateBlockFromLambdaExpressionBody(Binder lambdaBodyBinder, BoundExpression expression, BindingDiagnosticBag diagnostics) 1583protected 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\EmitAddress.cs (2)
15using static Microsoft.CodeAnalysis.CSharp.Binder; 469=> Binder.HasHome(expression, addressKind, _method, IsPeVerifyCompatEnabled(), _stackLocals);
CodeGen\EmitArrayInitializer.cs (6)
464var rosPointerCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Pointer, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true); 553EmitAddress(inPlaceTarget, Binder.AddressKind.Writeable); 610MethodSymbol? createSpan = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__CreateSpanRuntimeFieldHandle, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true); 705EmitAddress(inPlaceTarget, Binder.AddressKind.Writeable); 761EmitAddress(inPlaceTarget, Binder.AddressKind.Writeable); 779rosArrayCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(_module.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Array, _diagnostics, syntax: syntax, isOptional: true);
CodeGen\EmitExpression.cs (1)
18using static Microsoft.CodeAnalysis.CSharp.Binder;
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; 2193var binder = GetBinder(syntax); 2587internal Binder GetBinder(CSharpSyntaxNode syntax) 4242var binaryKind = Binder.SyntaxKindToBinaryOperatorKind(SyntaxFacts.GetBinaryExpression(syntaxKind)); 4466var unaryKind = Binder.SyntaxKindToUnaryOperatorKind(SyntaxFacts.GetPrefixUnaryExpression(syntaxKind)); 4649return Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctor, diagnostics, location) is object && 4650Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctorTransformFlags, diagnostics, location) is object; 4654Binder.GetWellKnownTypeMember(this, WellKnownMember.System_Runtime_CompilerServices_TupleElementNamesAttribute__ctorTransformNames, diagnostics, location) is object;
Compilation\CSharpSemanticModel.cs (49)
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); 1687private void AppendSymbolsWithName(ArrayBuilder<ISymbol> results, string name, Binder binder, NamespaceOrTypeSymbol container, LookupOptions options, LookupSymbolsInfo info) 1724Binder binder, 1822var binder = this.GetEnclosingBinder(position); 1871Binder binderOpt) 2208var binder = this.GetEnclosingBinder(boundExpr.Syntax.Span.Start); 2276Binder binderOpt) 2297Binder binderOpt) 2388internal virtual BoundNode Bind(Binder binder, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 2764var binder = GetSpeculativeBinderForAttribute(position, attribute); 2851var binder = this.GetEnclosingBinder(position); 2903var binder = this.GetEnclosingBinder(position); 3266Binder enclosingBinder = this.GetEnclosingBinder(GetAdjustedNodePosition(forEachStatement)); 3273Binder foreachBinder = enclosingBinder.GetBinder(forEachStatement); 3304Binder enclosingBinder = this.GetEnclosingBinder(GetAdjustedNodePosition(catchClause)); 3311Binder catchBinder = enclosingBinder.GetBinder(catchClause); 3344Binder binderOpt, 3681Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 3964Binder binderOpt, 4017Binder binderOpt, 4032Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(lowestBoundNode.Syntax)); 4081private ImmutableArray<IPropertySymbol> GetIndexerGroupSemanticSymbols(BoundExpression boundNode, Binder binderOpt) 4092Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 4235Binder binderOpt, 4253Binder binder = binderOpt ?? GetEnclosingBinder(GetAdjustedNodePosition(boundNode.Syntax)); 4381Binder binderOpt, 4554internal static ImmutableArray<MethodSymbol> GetReducedAndFilteredMethodGroupSymbols(Binder binder, BoundMethodGroup node) 4622var otherBinder = scope.Binder; 4903var binder = GetEnclosingBinder(position); 5401var 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) 114Binder rootBinder, 126Binder rootBinder, 137internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ArrowExpressionClauseSyntax syntax, Binder rootBinder, int position) 145internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, ConstructorInitializerSyntax syntax, Binder rootBinder, int position) 153internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, MethodSymbol owner, PrimaryConstructorBaseTypeSyntax syntax, Binder rootBinder, int position) 171Binder binder = this.RootBinder; 187Binder executablebinder = new WithNullableContextBinder(SyntaxTree, position, binder ?? this.RootBinder); 189var blockBinder = executablebinder.GetBinder(body).WithAdditionalFlags(GetSemanticModelBinderFlags()); 205var binder = this.GetEnclosingBinder(position); 223var binder = this.GetEnclosingBinder(position); 243var binder = this.GetEnclosingBinder(position); 265var binder = this.GetEnclosingBinder(position); 288Binder binder, 298protected 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) 1072Binder defaultOuter() => _binderFactory.GetBinder(node).WithAdditionalFlags(this.IgnoresAccessibility ? BinderFlags.IgnoreAccessibility : BinderFlags.None); 1276private Binder GetFieldOrPropertyInitializerBinder(FieldSymbol symbol, Binder outer, EqualsValueClauseSyntax initializer) 1866Binder binder = GetEnclosingBinder(declarationSyntax.Position); 1926Binder binder = _binderFactory.GetInNamespaceBinder(declarationSyntax.Parent); 1959var binder = _binderFactory.GetInNamespaceBinder(declarationSyntax.Parent);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
39BoundExpression call = Binder.GenerateBaseParameterlessConstructorInitializer(this, diagnostics);
Compiler\DocumentationCommentCompiler.cs (2)
1064private static string GetDocumentationCommentId(CrefSyntax crefSyntax, Binder binder, BindingDiagnosticBag diagnostics) 1127Binder 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)
467var processedStaticInitializers = new Binder.ProcessedFieldInitializers(); 468var processedInstanceInitializers = new Binder.ProcessedFieldInitializers(); 475Binder.BindFieldInitializers(_compilation, scriptInitializer, sourceTypeSymbol.StaticInitializers, _diagnostics, ref processedStaticInitializers); 478Binder.BindFieldInitializers(_compilation, scriptInitializer, sourceTypeSymbol.InstanceInitializers, _diagnostics, ref processedInstanceInitializers); 525Binder.ProcessedFieldInitializers processedInitializers = 528default(Binder.ProcessedFieldInitializers); 576var processedInitializers = default(Binder.ProcessedFieldInitializers); 631var processedInitializers = new Binder.ProcessedFieldInitializers() { BoundInitializers = ImmutableArray<BoundInitializer>.Empty }; 881ref Binder.ProcessedFieldInitializers processedInitializers, 1769Binder bodyBinder = sourceMethod.TryGetBodyBinder(); 1971CSharpSyntaxNode syntaxNode, Binder bodyBinder, 1983Binder current = bodyBinder; 2246var initializerInvocation = Binder.BindImplicitConstructorInitializer(method, diagnostics, compilation);
Emitter\Model\PEAssemblyBuilder.cs (5)
611Binder.ReportUseSite(result, diagnostics, Location.None); 618Binder.ReportUseSite(result, diagnostics, Location.None); 625Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__ctor, diagnostics, Location.None); 626Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, diagnostics, Location.None); 627Binder.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 (3)
573if (Binder.AccessingAutoPropertyFromConstructor(access, _symbol)) 2039return !Binder.AccessingAutoPropertyFromConstructor((BoundPropertyAccess)expr, _symbol); 2175if (Binder.AccessingAutoPropertyFromConstructor(node, _symbol))
FlowAnalysis\DefiniteAssignment.cs (4)
1096if (Binder.AccessingAutoPropertyFromConstructor(propAccess, this.CurrentSymbol)) 1428if (Binder.AccessingAutoPropertyFromConstructor(propertyAccess, this.CurrentSymbol)) 1588Binder.InferConstantIndexFromSystemIndex(compilation, elementAccess.Argument, length, out _) is 0)) 2679if (Binder.AccessingAutoPropertyFromConstructor(node, this.CurrentSymbol))
FlowAnalysis\NullableWalker.cs (14)
170private readonly Binder _binder; 455Binder binder, 1366var binder = method is SynthesizedSimpleProgramEntryPointSymbol entryPoint ? 1396Binder.ProcessedFieldInitializers discardedInitializers = default; 1397Binder.BindFieldInitializers(compilation, null, method.IsStatic ? containingType.StaticInitializers : containingType.InstanceInitializers, BindingDiagnosticBag.Discarded, ref discardedInitializers); 1462Binder binder, 1477Binder binder, 1493Binder binder, 1551Binder binder, 1628Binder binder, 1708Binder binder, 4584Binder binder, 6582var nameSyntax = Binder.GetNameSyntax(syntax, out _); 7639var parameter = Binder.GetCorrespondingParameter(argumentOrdinal, parametersOpt, argsToParamsOpt, expanded);
Generated\BoundNodes.xml.Generated.cs (9)
6282public BoundUnconvertedObjectCreationExpression(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<(string Name, Location Location)?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, InitializerExpressionSyntax? initializerOpt, Binder binder, bool hasErrors = false) 6301public Binder Binder { get; } 6306public BoundUnconvertedObjectCreationExpression Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<(string Name, Location Location)?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, InitializerExpressionSyntax? initializerOpt, Binder binder) 7590public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7611public Binder Binder { get; } 7616public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7674public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7695public Binder Binder { get; } 7701public 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)
518var 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_Call.cs (5)
289&& !Binder.HasHome( 291thisRefKind == RefKind.Ref ? Binder.AddressKind.Writeable : Binder.AddressKind.ReadOnlyStrict, 705Binder.HasHome(rewrittenReceiver, 706Binder.AddressKind.Constrained,
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_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)
374var 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)
452Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, resourceTypeSyntax, _diagnostics, out disposeMethod);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (2)
550var hasHome = Binder.HasHome(loweredReceiver, 551Binder.AddressKind.Writeable,
Lowering\SyntheticBoundNodeFactory.cs (10)
97private Binder? _binder; 312Binder.ReportUseSite(propertySym, Diagnostics, Syntax); 342Binder.ReportUseSite(specialType, Diagnostics, Syntax); 354Binder.ReportUseSite(wellKnownType, Diagnostics, Syntax); 368Symbol? wellKnownMember = Binder.GetWellKnownTypeMember(Compilation, wm, Diagnostics, syntax: Syntax, isOptional: true); 868Binder.ReportUseSite(methodSymbol, Diagnostics, Syntax); 1265return Throw(Null(Binder.GetWellKnownType(Compilation, Microsoft.CodeAnalysis.WellKnownType.System_Exception, Diagnostics, Syntax.Location))); 1348return new BoundSizeOfOperator(Syntax, Type(type), Binder.GetConstantSizeOf(type), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1711if (!Binder.HasHome(argument, 1712Binder.AddressKind.ReadOnly,
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(); 2574Binder.GetIndexerOrImplicitIndexerSymbol(boundNode.IndexerAccess).GetPublicSymbol(), 2586lengthSymbol: Binder.GetPropertySymbol(boundNode.LengthAccess, out _, out _).GetPublicSymbol(), 2587indexerSymbol: 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\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)
401&& !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)
18private readonly Binder _binder; 38Binder binder, 95internal Binder ScopeBinder { get; } 97internal override Binder OuterBinder => _binder; 99internal override Binder WithTypeParametersBinder
Symbols\Source\ModifierUtils.cs (2)
115=> ((result & modifier) != 0) && !Binder.CheckFeatureAvailability(errorLocation.SourceTree, featureID, diagnostics, errorLocation); 180Binder.CheckFeatureAvailability(errorLocation.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, errorLocation);
Symbols\Source\ParameterHelpers.cs (18)
21Binder withTypeParametersBinder, 41parameterCreationFunc: (Binder context, Symbol owner, TypeWithAnnotations parameterType, 64Binder binder, 81parameterCreationFunc: (Binder binder, FunctionPointerMethodSymbol owner, TypeWithAnnotations parameterType, 114Binder withTypeParametersBinder, 124Func<Binder, TOwningSymbol, TypeWithAnnotations, TParameterSyntax, RefKind, int, SyntaxToken, SyntaxToken, bool, ScopedKind, BindingDiagnosticBag, TParameterSymbol> parameterCreationFunc, 442Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureExtensionMethod, diagnostics); 446Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 474Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 563Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureReadOnlyReferences, diagnostics); 567Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 613Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics); 708Binder binder, 986internal static ImmutableArray<CustomModifier> ConditionallyCreateInModifiers(RefKind refKind, bool addRefReadOnlyModifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 998internal static ImmutableArray<CustomModifier> CreateInModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1004private static ImmutableArray<CustomModifier> CreateRefReadonlyParameterModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1010internal static ImmutableArray<CustomModifier> CreateOutModifiers(Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 1015private static ImmutableArray<CustomModifier> CreateModifiers(WellKnownType modifier, Binder binder, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
Symbols\Source\SourceAssemblySymbol.cs (8)
655Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 664Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 667Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 701Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 720Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 724Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(compilation, 794Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(_compilation, 841Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(_compilation,
Symbols\Source\SourceComplexParameterSymbol.cs (13)
82private Binder WithTypeParametersBinderOpt => (ContainingSymbol as SourceMethodSymbolWithAttributes)?.WithTypeParametersBinder; 237MakeDefaultExpression(BindingDiagnosticBag.Discarded, out var _, out var parameterEqualsValue); 251MakeDefaultExpression(diagnostics, out var binder, out var parameterEqualsValue), 273Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 293private Binder GetDefaultParameterValueBinder(SyntaxNode syntax) 295var binder = WithTypeParametersBinderOpt; 336var binder = GetDefaultParameterValueBinder(parameterSyntax); 359private ConstantValue MakeDefaultExpression(BindingDiagnosticBag diagnostics, out Binder? binder, out BoundParameterEqualsValue? parameterEqualsValue) 405valueBeforeConversion, diagnostics, Binder.ConversionForAssignmentFlags.DefaultParameter); 1568var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1627var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1659bool isAtLeastAsVisible(ParameterSyntax syntax, Binder binder, MethodSymbol method, BindingDiagnosticBag diagnostics) 1670void 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)
738protected TypeWithAnnotations BindEventType(Binder binder, TypeSyntax typeSyntax, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
28internal 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 (23)
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, 645private readonly Binder _nodeBinder; 649Binder scopeBinder, 650Binder nodeBinder, 708private readonly Binder _nodeBinder; 713Binder scopeBinder, 714Binder nodeBinder,
Symbols\Source\SourceMemberContainerSymbol.cs (9)
1362Binder.CheckFeatureAvailability(t.DeclaringSyntaxReferences[0].GetSyntax(), MessageID.IDS_DefaultInterfaceImplementation, diagnostics, t.GetFirstLocation()); 1852Binder.ReportMissingTupleElementNamesAttributesIfNeeded(compilation, location, diagnostics); 2608_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor, diagnostics, GetFirstLocation()); 2613_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_CompilerFeatureRequiredAttribute__ctor, diagnostics, GetFirstLocation()); 2618_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Diagnostics_CodeAnalysis_SetsRequiredMembersAttribute__ctor, diagnostics, GetFirstLocation()); 3288Binder.Error(diagnostics, ErrorCode.ERR_SimpleProgramMultipleUnitsWithTopLevelStatements, singleDecl.NameLocation); 3565internal Binder GetBinder(CSharpSyntaxNode syntaxNode) 4504Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeaturePositionalFieldsInRecords, diagnostics); 4850var bodyBinder = this.GetBinder(firstMember);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1038if (Binder.ReportUseSite(overriddenMember, diagnostics, overridingMember.GetFirstLocation()))
Symbols\Source\SourceMemberFieldSymbol.cs (4)
140Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 363Binder.CheckFeatureAvailability(declarator, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, ErrorLocation); 469Binder.ReportUseSite(tokenTableType, diagnosticsForFirstDeclarator, this.ErrorLocation); 483var binder = binderFactory.GetBinder(typeSyntax);
Symbols\Source\SourceMemberMethodSymbol.cs (5)
737private Binder TryGetInMethodBinder(BinderFactory binderFactoryOpt = null) 745Binder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(contextNode.SyntaxTree)).GetBinder(contextNode); 747Binder current = result; 768Binder inMethod = TryGetInMethodBinder(binderFactoryOpt); 1101Binder.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 (4)
50var baseBinder = this.DeclaringCompilation.GetBinder(bases); 335Binder binder; 416Binder binder; 1853if (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( 246var attributeConstructor = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_ExtensionAttribute__ctor, out var useSiteInfo); 804Binder.CheckFeatureAvailability(SyntaxNode, MessageID.IDS_FeatureExtendedPartialMethods, diagnostics, location); 1036var withTypeParametersBinder = 1063var 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, 131Binder.CheckFeatureAvailability( 482private Binder CreateBinderForTypeAndParameters() 488var binder = binderFactory.GetBinder(syntax, syntax, this); 496Binder binder = CreateBinderForTypeAndParameters(); 502private TypeWithAnnotations ComputeType(Binder binder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 541Binder binder, SourcePropertySymbolBase owner, BaseParameterListSyntax? parameterSyntaxOpt, BindingDiagnosticBag diagnostics, bool addRefReadOnlyModifier) 581private ImmutableArray<ParameterSymbol> ComputeParameters(Binder binder, CSharpSyntaxNode syntax, BindingDiagnosticBag diagnostics)
Symbols\Source\SourcePropertySymbolBase.cs (2)
254var modifierType = Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, TypeLocation); 720Binder.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 (19)
304Binder? binderOpt = 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); 590Binder rootBinderOpt, 591out ImmutableArray<Binder> binders) 596ArrayBuilder<Binder> bindersBuilder = null; 614bindersBuilder = new ArrayBuilder<Binder>(); 641var binder = GetAttributeBinder(attributeDeclarationSyntaxList, compilation, rootBinderOpt); 658binders = ImmutableArray<Binder>.Empty; 669private 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)
80return (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)
452var 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);