110 references to Name
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
20
Name
: IdentifierNameSyntax
HubServerProxyGenerator.Parser.cs (1)
20
Name
: IdentifierNameSyntax
Microsoft.CodeAnalysis.CSharp (79)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2010
=> node.Update((NameSyntax?)Visit(node.
Name
) ?? throw new ArgumentNullException("name"), (AttributeArgumentListSyntax?)Visit(node.ArgumentList));
_generated\2\Syntax.xml.Syntax.Generated.cs (2)
10060
if (name != this.
Name
|| argumentList != this.ArgumentList)
10071
public AttributeSyntax WithArgumentList(AttributeArgumentListSyntax? argumentList) => Update(this.
Name
, argumentList);
Binder\Binder_Attributes.cs (3)
54
var boundType = binder.BindType(attributeToBind.
Name
, diagnostics);
60
binder.CheckDisallowedAttributeDependentType(boundType, attributeToBind.
Name
, diagnostics);
302
ValidateTypeForAttributeParameters(attributeConstructor.Parameters, ((AttributeSyntax)boundAttribute.Syntax).
Name
, diagnostics, ref hasErrors);
Binder\Binder_Expressions.cs (1)
6387
AttributeSyntax {
Name
: { } name } => name.Location,
Binder\Binder_Symbols.cs (1)
1014
case AttributeSyntax parent when parent.
Name
== node: // [nint]
Compilation\CSharpSemanticModel.cs (3)
417
NamedTypeSymbol attributeType = (NamedTypeSymbol)binder.BindType(attribute.
Name
, BindingDiagnosticBag.Discarded, out aliasOpt).Type;
2783
var attributeType = (NamedTypeSymbol)binder.BindType(attribute.
Name
, BindingDiagnosticBag.Discarded, out aliasOpt).Type;
4001
parentSyntax.Kind() == SyntaxKind.Attribute && ((AttributeSyntax)parentSyntax).
Name
== boundNode.Syntax)
Compilation\PublicSemanticModel.cs (1)
20
var attributeType = (NamedTypeSymbol)enclosingBinder.BindType(attribute.
Name
, BindingDiagnosticBag.Discarded, out aliasOpt).Type;
Declarations\DeclarationTreeBuilder.cs (1)
914
result |= QuickAttributeHelpers.GetQuickAttributes(attribute.
Name
.GetUnqualifiedName().Identifier.ValueText, inAttribute: true);
Errors\MessageProvider.cs (2)
293
diagnostics.Add(ErrorCode.ERR_AttributeParameterRequired1, node.
Name
.Location, parameterName);
299
diagnostics.Add(ErrorCode.ERR_AttributeParameterRequired2, node.
Name
.Location, parameterName1, parameterName2);
SourceGeneration\CSharpSyntaxHelper.cs (1)
33
=> ((AttributeSyntax)node).
Name
;
Symbols\Attributes\AttributeData.cs (1)
375
diagnostics.Add(ErrorCode.ERR_SecurityAttributeMissingAction, nodeOpt != null ? nodeOpt.
Name
.Location : NoLocation.Singleton);
Symbols\Attributes\SourceAttributeData.cs (1)
154
return attributeSyntax.
Name
;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (2)
191
diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadField, arguments.AttributeSyntaxOpt.
Name
.Location);
339
diagnostics.Add(ErrorCode.ERR_StructOffsetOnBadStruct, allAttributeSyntaxNodes[i].
Name
.Location);
Symbols\Source\QuickAttributeChecker.cs (1)
128
string name = attr.
Name
.GetUnqualifiedName().Identifier.ValueText;
Symbols\Source\SourceComplexParameterSymbol.cs (33)
792
diagnostics.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, arguments.AttributeSyntaxOpt.
Name
.Location);
798
diagnostics.Add(ErrorCode.ERR_ExplicitParamArrayOrCollection, arguments.AttributeSyntaxOpt.
Name
.Location);
986
diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueUsedWithAttributes, node.
Name
.Location);
1024
diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.
Name
.Location);
1034
diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueBadValueType, node.
Name
.Location, arg.TypeInternal);
1044
diagnosticsOpt.Add(ErrorCode.ERR_DefaultValueTypeMustMatch, node.
Name
.Location);
1045
diagnosticsOpt.Add(node.
Name
, useSiteInfo);
1052
diagnosticsOpt.Add(node.
Name
, useSiteInfo);
1092
diagnostics.Add(ErrorCode.WRN_CallerLineNumberParamForUnconsumedLocation, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1098
diagnostics.Add(ErrorCode.ERR_NoConversionForCallerLineNumberParam, node.
Name
.Location, intType, TypeWithAnnotations.Type);
1105
diagnostics.Add(ErrorCode.ERR_BadCallerLineNumberParamWithoutDefaultValue, node.
Name
.Location);
1108
diagnostics.Add(node.
Name
, useSiteInfo);
1120
diagnostics.Add(ErrorCode.WRN_CallerFilePathParamForUnconsumedLocation, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1126
diagnostics.Add(ErrorCode.ERR_NoConversionForCallerFilePathParam, node.
Name
.Location, stringType, TypeWithAnnotations.Type);
1133
diagnostics.Add(ErrorCode.ERR_BadCallerFilePathParamWithoutDefaultValue, node.
Name
.Location);
1138
diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerFilePath, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1141
diagnostics.Add(node.
Name
, useSiteInfo);
1153
diagnostics.Add(ErrorCode.WRN_CallerMemberNameParamForUnconsumedLocation, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1159
diagnostics.Add(ErrorCode.ERR_NoConversionForCallerMemberNameParam, node.
Name
.Location, stringType, TypeWithAnnotations.Type);
1166
diagnostics.Add(ErrorCode.ERR_BadCallerMemberNameParamWithoutDefaultValue, node.
Name
.Location);
1171
diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerMemberName, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1176
diagnostics.Add(ErrorCode.WRN_CallerFilePathPreferredOverCallerMemberName, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1179
diagnostics.Add(node.
Name
, useSiteInfo);
1194
diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionParamForUnconsumedLocation, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1200
diagnostics.Add(ErrorCode.ERR_NoConversionForCallerArgumentExpressionParam, node.
Name
.Location, stringType, TypeWithAnnotations.Type);
1207
diagnostics.Add(ErrorCode.ERR_BadCallerArgumentExpressionParamWithoutDefaultValue, node.
Name
.Location);
1212
diagnostics.Add(ErrorCode.WRN_CallerLineNumberPreferredOverCallerArgumentExpression, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1217
diagnostics.Add(ErrorCode.WRN_CallerFilePathPreferredOverCallerArgumentExpression, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1222
diagnostics.Add(ErrorCode.WRN_CallerMemberNamePreferredOverCallerArgumentExpression, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1228
diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionAttributeHasInvalidParameterName, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1233
diagnostics.Add(ErrorCode.WRN_CallerArgumentExpressionAttributeSelfReferential, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
1236
diagnostics.Add(node.
Name
, useSiteInfo);
1259
diagnostics.Add(ErrorCode.WRN_UnconsumedEnumeratorCancellationAttributeUsage, node.
Name
.Location, ParameterSyntax.Identifier.ValueText);
Symbols\Source\SourceFieldSymbol.cs (1)
126
((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttr, arguments.AttributeSyntaxOpt.
Name
.Location);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (6)
716
diagnostics.Add(ErrorCode.ERR_AttributeNotOnEventAccessor, arguments.AttributeSyntaxOpt.
Name
.Location, description.FullName, attributeUsage.GetValidTargetsErrorArgument());
738
diagnostics.Add(ErrorCode.ERR_AttributeNotOnAccessor, node.
Name
.Location, node.GetErrorDisplayName(), attributeUsage.GetValidTargetsErrorArgument());
844
diagnostics.Add(ErrorCode.ERR_DllImportOnInvalidMethod, arguments.AttributeSyntaxOpt.
Name
.Location);
860
diagnostics.Add(ErrorCode.ERR_DllImportOnGenericMethod, arguments.AttributeSyntaxOpt.
Name
.Location);
1028
var attributeNameSyntax = arguments.AttributeSyntaxOpt.
Name
; // used for reporting diagnostics
1397
bool reportedError = CheckAndReportValidUnmanagedCallersOnlyTarget(arguments.AttributeSyntaxOpt.
Name
, diagnostics);
Symbols\Source\SourceNamedTypeSymbol.cs (8)
1180
diagnostics.Add(ErrorCode.ERR_CantUseRequiredAttribute, arguments.AttributeSyntaxOpt.
Name
.Location);
1202
diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidType, arguments.AttributeSyntaxOpt.
Name
.Location);
1212
diagnostics.Add(ErrorCode.ERR_CollectionBuilderAttributeInvalidMethodName, arguments.AttributeSyntaxOpt.
Name
.Location);
1230
diagnostics.Add(ErrorCode.ERR_AttributeOnBadSymbolType, arguments.AttributeSyntaxOpt.
Name
.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName(), "struct");
1234
diagnostics.Add(ErrorCode.ERR_InlineArrayAttributeOnRecord, arguments.AttributeSyntaxOpt.
Name
.Location);
1328
diagnosticsOpt.Add(ErrorCode.ERR_AttributeUsageOnNonAttributeClass, node.
Name
.Location, node.GetErrorDisplayName());
1655
diagnostics.Add(ErrorCode.ERR_ComImportWithoutUuidAttribute, allAttributeSyntaxNodes[index].
Name
.Location);
1712
diagnostics.Add(ErrorCode.ERR_DefaultMemberOnIndexedType, allAttributeSyntaxNodes[index].
Name
.Location);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1772
diagnostics.Add(ErrorCode.ERR_BadIndexerNameAttr, node.
Name
.Location, node.GetErrorDisplayName());
Symbols\Symbol_Attributes.cs (5)
555
var boundType = binder.BindType(attributeSyntax.
Name
, BindingDiagnosticBag.Discarded);
913
diagnostics.Add(ErrorCode.ERR_AttributesNotAllowed, node.
Name
.Location);
920
diagnostics.Add(ErrorCode.ERR_DuplicateAttribute, node.
Name
.Location, node.GetErrorDisplayName());
940
diagnostics.Add(ErrorCode.ERR_AttributeOnBadSymbolType, node.
Name
.Location, node.GetErrorDisplayName(), attributeUsageInfo.GetValidTargetsErrorArgument());
955
diagnostics.Add(ErrorCode.ERR_SecurityAttributeInvalidTarget, node.
Name
.Location, node.GetErrorDisplayName());
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
261
((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.ERR_DoNotUseFixedBufferAttrOnProperty, arguments.AttributeSyntaxOpt.
Name
.Location);
Syntax\AttributeSyntax.cs (1)
20
return
Name
.ErrorDisplayName();
Syntax\SyntaxFacts.cs (2)
48
return p != null && p.
Name
== node;
91
return ((AttributeSyntax)parent).
Name
== node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
58
var attributeName = attribute.
Name
.GetRightmostName()?.Identifier.ValueText;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1516
name = attribute.
Name
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
54
AttributeSyntax attributeNode => attributeNode.
Name
,
Microsoft.CodeAnalysis.CSharp.Features (5)
EditAndContinue\SyntaxComparer.cs (1)
1511
return ((AttributeSyntax)node).
Name
;
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
98
Name
: var attributeName
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
58
var attributeName = attribute.
Name
.GetRightmostName()?.Identifier.ValueText;
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
54
AttributeSyntax attributeNode => attributeNode.
Name
,
Testing\CSharpTestMethodFinder.cs (1)
46
var attributeName = attribute.
Name
.GetNameToken().Text;
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\CSharpConstantExpectedAnalyzer.cs (1)
30
var attributeName = attributeSyntax.
Name
;
Microsoft.NetCore.Analyzers\Resources\CSharpMarkAssembliesWithNeutralResourcesLanguage.cs (1)
45
return attribute?.
Name
?.GetLastToken().Text?.Equals(GeneratedCodeAttribute, StringComparison.Ordinal) == true &&
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
2070
AttributeListSyntax attributeList when attributeList.Attributes.Count == 1 => attributeList.Attributes[0].
Name
.ToString(),
2071
AttributeSyntax attribute => attribute.
Name
.ToString(),
2103
ReplaceWithTrivia(declaration, attributeList.Attributes[0].
Name
, this.DottedName(name)),
2105
AttributeSyntax attribute => ReplaceWithTrivia(declaration, attribute.
Name
, this.DottedName(name)),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1516
name = attribute.
Name
;
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.Logging (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
92
if (attr.
Name
is IdentifierNameSyntax id)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
439
dllImportSyntax.
Name
,
QuarantineTools.Tests (4)
ActiveIssueTests.cs (2)
376
string lastId = attr.
Name
switch
381
_ => attr.
Name
.ToString().Split('.').Last()
QuarantineScriptTests.cs (2)
320
string lastId = attr.
Name
switch
325
_ => attr.
Name
.ToString().Split('.').Last()
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1516
name = attribute.
Name
;
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
70
.Any(a => a.
Name
.ToString() == DesignerSerializationVisibilityAttributeName))