18 instantiations of LexicalSortKey
Microsoft.CodeAnalysis.CSharp (18)
Symbols\LexicalSortKey.cs (5)
39public static readonly LexicalSortKey NotInSource = new LexicalSortKey() { _treeOrdinal = -1, _position = 0 }; 41public static readonly LexicalSortKey NotInitialized = new LexicalSortKey() { _treeOrdinal = -1, _position = -1 }; 44public static LexicalSortKey GetSynthesizedMemberKey(int offset) => new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 2 - offset }; 51public static readonly LexicalSortKey SynthesizedCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 1 }; 52public static readonly LexicalSortKey SynthesizedCCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue };
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
243return new LexicalSortKey(this.syntaxReferenceOpt.GetLocation(), this.DeclaringCompilation); 306return new LexicalSortKey(this.syntaxReferenceOpt.GetLocation(), this.DeclaringCompilation);
Symbols\Source\SourceEventSymbol.cs (1)
111return new LexicalSortKey(_location, this.DeclaringCompilation);
Symbols\Source\SourceFieldSymbol.cs (1)
214=> new LexicalSortKey(_syntaxReference, this.DeclaringCompilation);
Symbols\Source\SourceMemberContainerSymbol.cs (7)
3012Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0); 3017Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0); 3022Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0); 3082if (LexicalSortKey.Compare(sortKey, new LexicalSortKey(declaredMembers.InstanceInitializers[insertAt][0].Syntax, compilation)) < 0)
Symbols\Source\SourcePropertySymbolBase.cs (1)
521return new LexicalSortKey(Location, this.DeclaringCompilation);
Symbols\Symbol.cs (1)
409return new LexicalSortKey(firstLocation, declaringCompilation);
48 references to LexicalSortKey
Microsoft.CodeAnalysis.CSharp (48)
Compilation\LexicalOrderSymbolComparer.cs (3)
34var xSortKey = x.GetLexicalSortKey(); 35var ySortKey = y.GetLexicalSortKey(); 38comparison = LexicalSortKey.Compare(xSortKey, ySortKey);
Declarations\MergedNamespaceDeclaration.cs (3)
46public LexicalSortKey GetLexicalSortKey(CSharpCompilation compilation) 48LexicalSortKey sortKey = new LexicalSortKey(_declarations[0].NameLocation, compilation); 51sortKey = LexicalSortKey.First(sortKey, new LexicalSortKey(_declarations[i].NameLocation, compilation));
Declarations\MergedTypeDeclaration.cs (3)
160public LexicalSortKey GetLexicalSortKey(CSharpCompilation compilation) 162LexicalSortKey sortKey = new LexicalSortKey(Declarations[0].NameLocation, compilation); 165sortKey = LexicalSortKey.First(sortKey, new LexicalSortKey(Declarations[i].NameLocation, compilation));
Symbols\LexicalSortKey.cs (11)
39public static readonly LexicalSortKey NotInSource = new LexicalSortKey() { _treeOrdinal = -1, _position = 0 }; 41public static readonly LexicalSortKey NotInitialized = new LexicalSortKey() { _treeOrdinal = -1, _position = -1 }; 44public static LexicalSortKey GetSynthesizedMemberKey(int offset) => new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 2 - offset }; 51public static readonly LexicalSortKey SynthesizedCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 1 }; 52public static readonly LexicalSortKey SynthesizedCCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue }; 98public static int Compare(LexicalSortKey xSortKey, LexicalSortKey ySortKey) 121public static LexicalSortKey First(LexicalSortKey xSortKey, LexicalSortKey ySortKey) 135public void SetFrom(LexicalSortKey other)
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
235internal override LexicalSortKey GetLexicalSortKey() 298internal override LexicalSortKey GetLexicalSortKey()
Symbols\Source\SourceEventSymbol.cs (1)
109internal override LexicalSortKey GetLexicalSortKey()
Symbols\Source\SourceFieldSymbol.cs (1)
213internal override LexicalSortKey GetLexicalSortKey()
Symbols\Source\SourceMemberContainerSymbol.cs (8)
216private LexicalSortKey _lazyLexicalSortKey = LexicalSortKey.NotInitialized; 979internal override LexicalSortKey GetLexicalSortKey() 3012Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0); 3017Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0); 3022Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0); 3076var sortKey = new LexicalSortKey(InstanceInitializersForPositionalMembers.First().Syntax, compilation); 3082if (LexicalSortKey.Compare(sortKey, new LexicalSortKey(declaredMembers.InstanceInitializers[insertAt][0].Syntax, compilation)) < 0)
Symbols\Source\SourceNamespaceSymbol.cs (3)
51private LexicalSortKey _lazyLexicalSortKey = LexicalSortKey.NotInitialized; 79internal override LexicalSortKey GetLexicalSortKey()
Symbols\Source\SourcePropertySymbolBase.cs (1)
519internal override LexicalSortKey GetLexicalSortKey()
Symbols\Symbol.cs (2)
401internal virtual LexicalSortKey GetLexicalSortKey() 405return LexicalSortKey.NotInSource;
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (2)
38internal override LexicalSortKey GetLexicalSortKey() => LexicalSortKey.GetSynthesizedMemberKey(_memberOffset);
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (2)
50internal sealed override LexicalSortKey GetLexicalSortKey() => LexicalSortKey.GetSynthesizedMemberKey(_memberOffset);
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (2)
49internal sealed override LexicalSortKey GetLexicalSortKey() => LexicalSortKey.GetSynthesizedMemberKey(_memberOffset);
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
137internal override LexicalSortKey GetLexicalSortKey() 141return LexicalSortKey.SynthesizedCtor;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (2)
104internal override LexicalSortKey GetLexicalSortKey() 108return LexicalSortKey.SynthesizedCCtor;