1 write to declaration
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
234
this.
declaration
= declaration;
59 references to declaration
Microsoft.CodeAnalysis.CSharp (59)
Symbols\Source\SourceMemberContainerSymbol.cs (39)
393
var partCount =
declaration
.Declarations.Length;
398
var decl =
declaration
.Declarations[i];
410
mods, allowedModifiers,
declaration
.Declarations[i].NameLocation, diagnostics,
453
: ErrorCode.ERR_DuplicateNameInNS,
declaration
.Declarations[i].NameLocation, this.Name, this.ContainingSymbol);
462
diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass,
declaration
.Declarations[i].NameLocation, this.ContainingSymbol, this.Name);
472
var singleDeclaration =
declaration
.Declarations[i];
795
return this.
declaration
;
862
private SyntaxTree? AssociatedSyntaxTree => IsFileLocal ?
declaration
.Declarations[0].Location.SourceTree : null;
918
var kind = this.
declaration
.Declarations[0].Kind;
927
return this.
declaration
.Declarations[0].Kind == DeclarationKind.ImplicitClass;
935
return this.
declaration
.Declarations[0].Kind == DeclarationKind.Record;
943
return this.
declaration
.Declarations[0].Kind == DeclarationKind.RecordStruct;
959
return
declaration
.Arity;
967
return
declaration
.Name;
983
_lazyLexicalSortKey.SetFrom(
declaration
.GetLexicalSortKey(this.DeclaringCompilation));
989
=> ImmutableArray<Location>.CastUp(
declaration
.NameLocations.ToImmutable());
992
=>
declaration
.Declarations[0].NameLocation;
998
return this.
declaration
.SyntaxReferences;
1013
var declarations =
declaration
.Declarations;
1099
foreach (var declaration in this.
declaration
.Declarations)
1119
if (
declaration
.Declarations.Length >= 1 && position ==
declaration
.Declarations[0].Location.SourceSpan.Start)
1270
return (IsTupleType || IsRecord || IsRecordStruct) ? GetMembers().Select(m => m.Name) : this.
declaration
.MemberNames;
1329
foreach (var childDeclaration in
declaration
.Children)
1406
hasDeclaredMembers =
declaration
.Declarations.Any(static decl => decl.HasRequiredMembers);
1500
if (_lazyMembersDictionary != null ||
declaration
.MemberNames.Contains(name) ||
declaration
.Kind is DeclarationKind.Record or DeclarationKind.RecordStruct)
1879
var tree =
declaration
.Declarations[0].SyntaxReference.SyntaxTree;
1928
if (
declaration
.Kind != DeclarationKind.Record &&
1929
declaration
.Kind != DeclarationKind.RecordStruct)
3319
foreach (var singleDecl in
declaration
.Declarations)
3518
foreach (var decl in this.
declaration
.Declarations)
4175
if (
declaration
.Kind is not (DeclarationKind.Record or DeclarationKind.RecordStruct) && declaredMembersAndInitializers.PrimaryConstructor is null)
4183
if (
declaration
.Kind is not (DeclarationKind.Record or DeclarationKind.RecordStruct))
4227
bool isRecordClass =
declaration
.Kind == DeclarationKind.Record;
4274
diagnostics.Add(ErrorCode.WRN_RecordEqualsWithoutGetHashCode, thisEquals.GetFirstLocation(),
declaration
.Name);
5379
bool containsExtensionMethods = ((this.IsStatic && !this.IsGenericType) || this.IsScriptClass) && this.
declaration
.ContainsExtensionMethods;
5393
bool anyMemberHasAttributes = this.
declaration
.AnyMemberHasAttributes;
5418
if (!
declaration
.AnyMemberHasAttributes)
Symbols\Source\SourceNamedTypeSymbol.cs (14)
104
return new SourceNamedTypeSymbol(ContainingType,
declaration
, BindingDiagnosticBag.Discarded, newData);
140
if (
declaration
.Arity == 0)
146
var typeParameterNames = new string[
declaration
.Arity];
147
var typeParameterVarianceKeywords = new string[
declaration
.Arity];
240
declaration
.NameLocations.First(),
248
declaration
.NameLocations.First(),
324
foreach (var decl in
declaration
.Declarations)
383
foreach (var decl in
declaration
.Declarations)
405
foreach (var decl in
declaration
.Declarations)
788
return
declaration
.GetAttributeDeclarations(quickAttributes: null);
793
return
declaration
.GetAttributeDeclarations(quickAttributes);
1077
foreach (var decl in this.
declaration
.Declarations)
1719
if (this.
declaration
.Declarations.All(d => d.IsSimpleProgram))
1780
return this.
declaration
.Declarations.Any(static d => d.IsSimpleProgram);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (5)
128
if (
declaration
.Kind == DeclarationKind.Record)
214
foreach (var decl in this.
declaration
.Declarations)
243
foreach (var singleDeclaration in this.
declaration
.Declarations)
298
foreach (var decl in this.
declaration
.Declarations)
370
if (
declaration
.Kind is DeclarationKind.Record or DeclarationKind.RecordStruct)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
52
var decl = this.
declaration
.Declarations[0];