Binder\Binder_Attributes.cs (5)
407Error(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type);
672namedArgumentNameSymbol.Name));
685namedArgumentNameSymbol.Name));
824visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors));
829visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors));
Binder\Binder_Conversions.cs (8)
494if (SyntaxFacts.IsCheckedOperator(method.Name) &&
853return binder.BindClassCreationExpression(syntax, type.Name, typeNode: syntax, (NamedTypeSymbol)type, arguments, diagnostics, initializerOpt, wasTargetTyped: true);
1362var methodName = collectionBuilderMethods[0].Name;
1363Debug.Assert(collectionBuilderMethods.All(t => t.Name == methodName));
1420argumentNames = argumentNames.Add(readonlySpanParameter.Name);
2225Debug.Assert(call.Method.Name == "Add");
3319diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, receiverOpt.Type, memberSymbol.Name);
3335else if (node.Kind() == SyntaxKind.AwaitExpression && memberSymbol.Name == WellKnownMemberNames.GetAwaiter)
Binder\Binder_Expressions.cs (18)
2102Error(diagnostics, ErrorCode.ERR_ExtensionParameterInStaticContext, node, parameter.Name);
2124Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name);
2133Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name);
2147Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name);
2156Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name);
2281localSymbol.Name,
3890parameter.Name,
3891correspondingParameter.Name);
3909parameter.Name,
3910correspondingParameter.Name);
6359if (!requiredMembersBuilder.TryGetValue(memberSymbol.Name, out var requiredMember))
6369requiredMembersBuilder.Remove(memberSymbol.Name);
7762if (leftType.Name == leftName || IsUsingAliasInScope(leftName))
7794return (type.Name == name || IsUsingAliasInScope(name)) &&
10460var name = candidate.IsIndexer ? SyntaxFacts.GetText(SyntaxKind.ThisKeyword) : candidate.Name;
10773syntax, typeArgumentsOpt: default, method.Name, ImmutableArray.Create(method),
10777indexerOrSliceAccess = BindMethodGroupInvocation(syntax, syntax, method.Name, boundMethodGroup, analyzedArguments,
10876return new ErrorPropertySymbol(candidate.ContainingType, propertyType, candidate.Name, candidate.IsIndexer, candidate.IsIndexedProperty);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
544Debug.Assert(firstSupported.Member is MethodSymbol { Name: "Add" });
685diagnostics.Add(ErrorCode.ERR_QueryNoProvider, location, receiverOpt.Type, symbol.Name);
691else if (nodeOpt?.Kind() == SyntaxKind.AwaitExpression && symbol.Name == WellKnownMemberNames.GetAwaiter)
774Binder.ReportQueryInferenceFailed(queryClause, inferenceFailed.Member.Name, receiver, arguments, symbols, diagnostics);
796binder.ReportQueryLookupFailed(queryClause, instanceArgument, inferenceFailed.Member.Name, symbols, diagnostics);
813new object[] { instanceArgument.Type, inferenceFailed.Member.Name },
944badParamName = parameters[badParamIndex].Name;
FlowAnalysis\DefiniteAssignment.cs (13)
474Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
493Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
645diagnostics.Add(ErrorCode.ERR_LocalCantBeFixedAndHoisted, location, captured.Name);
1180string symbolName = symbol.Name;
1263var symbolName = hasAssociatedProperty ? associatedSymbol.Name : fieldSymbol.Name;
1918parameter.GetFirstLocationOrNone(), parameter.Name);
2282if (symbol.DeclarationKind != LocalDeclarationKind.PatternVariable && !string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2284Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2301if (!string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2303Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2809string.IsNullOrEmpty(id.Symbol.Name) ? "<anon>" + id.Symbol.GetHashCode() :
2810id.Symbol.Name);
FlowAnalysis\NullableWalker.cs (21)
794if ((symbol.IsRequired() || membersWithStateEnforcedByRequiredMembers.Contains(symbol.Name)) && constructor.ShouldCheckRequiredMembers())
828var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1093Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1162Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1334Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1361Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1412if (inputParamNames.Contains(inputParam.Name)
1420Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1425Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
5353if ((leftType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[0].Name)) ||
5354(rightType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[1].Name)))
7068|| (method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__Equals).Name
7069&& method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__ReferenceEquals).Name
7676if (returnNotNullIfParameterNotNull?.Contains(parameter.Name) == true)
7951Name: WellKnownMemberNames.TryGetValueMethodName,
8395if (notNullIfParameterNotNull.Contains(notNullParameter.Name))
8446Name: WellKnownMemberNames.TryGetValueMethodName,
10474var returnNotNull = operandState.IsNotNull() && method.ReturnNotNullIfParameterNotNull.Contains(parameter.Name);
12202if (member is PropertySymbol { Name: WellKnownMemberNames.HasValuePropertyName } property &&
14228var name = id.Symbol.Name;
Lowering\SynthesizedMethodBaseSymbol.cs (1)
127p.Name,
Symbols\Source\SourceComplexParameterSymbol.cs (5)
711&& extensionParameter.Name.Equals(parameterName, StringComparison.Ordinal))
722if (parameters[i].Name.Equals(parameterName, StringComparison.Ordinal))
1405if (string.Equals(extensionParameter?.Name, name, StringComparison.Ordinal))
1417var parameter = containingSymbolParameters.FirstOrDefault(static (param, name) => string.Equals(param.Name, name, StringComparison.Ordinal), name);
1437diagnostics.Add(ErrorCode.WRN_ParameterOccursAfterInterpolatedStringHandlerParameter, arguments.AttributeSyntaxOpt.Location, parameter.Name, this.Name);
Symbols\Source\SourceMemberContainerSymbol.cs (22)
1299return (IsTupleType || IsRecord || IsRecordStruct || this.declaration.ContainsExtensionDeclarations) ? GetMembers().Select(m => m.Name) : this.declaration.MemberNames;
1441if (member.Name == typeName)
1449if (member.Name == typeName)
1668{ symbol.Name.AsMemory(), ImmutableArray.Create(symbol) },
1685ImmutableArrayExtensions.AddToMultiValueDictionaryBuilder(accumulator, item.Name.AsMemory(), item);
2143diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, symbol.GetFirstLocation(), containerForDiagnostics, symbol.Name);
2286(method1.IsConstructor() ? method1.ContainingType.Name : method1.Name);
2332typeParameterNames.Add(typeParameter.Name);
2581foreach (var dup in GetMembers(tp.Name))
2583diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, dup.GetFirstLocation(), this, tp.Name);
3626(member.IsIndexer() ? WellKnownMemberNames.Indexer : member.Name).AsMemory(),
3842if (member.Name == name)
4414accessorName = accessor.Name;
4418string propertyName = propertySymbol.IsIndexer ? propertySymbol.MetadataName : propertySymbol.Name;
4461string accessorName = SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAdder);
4909memberNames.Add(member.Name);
4916case FieldSymbol { Name: var fieldName }:
5249var targetProperty = new SignatureOnlyPropertySymbol(param.Name,
5258&& !fieldsByName.TryGetValue(param.Name, out existingMember))
5300param.Name);
5324if (memberNames.Contains(symbol.Name) || this.GetTypeMembersDictionary().ContainsKey(symbol.Name.AsMemory()))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (8)
253else if (ContainingType is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
592return !definition.Parameters.SequenceEqual(implementation.Parameters, (a, b) => a.Name == b.Name) ||
593!definition.TypeParameters.SequenceEqual(implementation.TypeParameters, (a, b) => a.Name == b.Name);
624diagnostics.Add(ErrorCode.ERR_PartialMethodInconsistentConstraints, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
628diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
1196if (name == result[i].Name)
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
42param.Name,
Symbols\TypeSymbol.cs (7)
1608correspondingImplementingAccessor.Name,
1732foreach (Symbol member in implicitImpl.ContainingType.GetMembers(implicitImpl.Name))
2148diagnostics.Add(ErrorCode.ERR_ImplBadConstraints, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2153typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2207foreach (Symbol member in currType.GetMembers(interfaceMember.Name))
Symbols\TypeSymbolExtensions.cs (16)
601if ((object)symbol == null || symbol.Name != names[i]) return false;
1421ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1434ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1442ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1453ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1464ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1769if (name == tpEnclosing.Name)
1804if (typeParameter.Name == name)
1870var name = @namespace.Name;
2199if (typeSymbol.Name != name || typeSymbol.ContainingType is object)
2209if (typeSymbol.Name != name)
2221=> type.Name == "SetsRequiredMembersAttribute" && type.IsWellKnownDiagnosticsCodeAnalysisTopLevelType();
2240if (innerNamespace?.Name != innerNS)
2251if (midNamespace?.Name != midNS)
2257if (outerNamespace?.Name != outerNS)
2324switch (GeneratedNameParser.GetKind(type.Name))