108 references to SpecializedCollections
Microsoft.CodeAnalysis (108)
AdditionalTextFile.cs (1)
32
_diagnostics =
SpecializedCollections
.EmptyList<DiagnosticInfo>();
CodeGen\ArrayMembers.cs (1)
352
=>
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
CodeGen\PrivateImplementationDetails.cs (13)
425
return
SpecializedCollections
.SingletonEnumerable(_compilerGeneratedAttribute);
428
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
670
=>
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
788
=>
SpecializedCollections
.EmptyEnumerable<Cci.IEventDefinition>();
791
=>
SpecializedCollections
.EmptyEnumerable<Cci.MethodImplementation>();
794
=>
SpecializedCollections
.EmptyEnumerable<Cci.IFieldDefinition>();
797
=>
SpecializedCollections
.EmptyEnumerable<Cci.IGenericTypeParameter>();
804
=>
SpecializedCollections
.EmptyEnumerable<Cci.TypeReferenceWithAttributes>();
831
=>
SpecializedCollections
.EmptyEnumerable<Cci.IMethodDefinition>();
834
=>
SpecializedCollections
.EmptyEnumerable<Cci.INestedTypeDefinition>();
837
=>
SpecializedCollections
.EmptyEnumerable<Cci.IPropertyDefinition>();
840
=>
SpecializedCollections
.EmptyEnumerable<Cci.SecurityAttribute>();
845
=>
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
Collections\TopologicalSort.cs (1)
27
return TryIterativeSort(
SpecializedCollections
.SingletonEnumerable(node), addSuccessors, out result);
Collections\UnionCollection.cs (1)
55
return
SpecializedCollections
.EmptyCollection<T>();
CommandLine\CommandLineParser.cs (1)
61
return
SpecializedCollections
.EmptyEnumerable<string>();
CommandLine\CommonCompiler.cs (2)
491
return
SpecializedCollections
.EmptyReadOnlySet<string>();
502
return
SpecializedCollections
.StronglyTypedReadOnlySet(set);
Compilation\Compilation.cs (1)
857
return CommonWithReferences(
SpecializedCollections
.EmptyEnumerable<MetadataReference>());
Diagnostic\Diagnostic.cs (1)
483
get { return
SpecializedCollections
.EmptyReadOnlyList<object?>(); }
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
50
_additionalLocations = additionalLocations?.ToImmutableArray() ??
SpecializedCollections
.EmptyReadOnlyList<Location>();
Diagnostic\DiagnosticBag.cs (1)
265
return _lazyBag ??
SpecializedCollections
.EmptyEnumerable<Diagnostic>();
Diagnostic\DiagnosticInfo.cs (1)
294
return
SpecializedCollections
.EmptyReadOnlyList<Location>();
DiagnosticAnalyzer\AnalysisResult.cs (1)
77
return GetDiagnostics(
SpecializedCollections
.SingletonEnumerable(analyzer));
DiagnosticAnalyzer\AnalyzerManager.cs (1)
39
_analyzerExecutionContextMap = CreateAnalyzerExecutionContextMap(
SpecializedCollections
.SingletonEnumerable(analyzer));
Emit\CommonPEModuleBuilder.cs (2)
44
private IEnumerable<EmbeddedText> _embeddedTexts =
SpecializedCollections
.EmptyEnumerable<EmbeddedText>();
303
IEnumerable<Cci.ICustomAttribute> Cci.IReference.GetAttributes(EmitContext context) =>
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
Emit\EditAndContinue\SymbolChanges.cs (1)
466
replacedSymbols = lazyReplacedSymbolsBuilder ??
SpecializedCollections
.EmptySet<ISymbolInternal>();
Emit\ErrorType.cs (2)
170
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
234
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
Emit\NoPia\CommonEmbeddedMethod.cs (2)
226
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
236
SpecializedCollections
.EmptyEnumerable<Cci.SecurityAttribute>();
Emit\NoPia\CommonEmbeddedType.cs (4)
269
return
SpecializedCollections
.EmptyEnumerable<Cci.MethodImplementation>();
300
return
SpecializedCollections
.EmptyEnumerable<Cci.IGenericTypeParameter>();
488
return
SpecializedCollections
.EmptyEnumerable<Cci.INestedTypeDefinition>();
520
return
SpecializedCollections
.EmptyEnumerable<Cci.SecurityAttribute>();
Emit\NoPia\CommonEmbeddedTypeParameter.cs (1)
206
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
Emit\NoPia\VtblGap.cs (4)
35
get { return
SpecializedCollections
.EmptyEnumerable<Cci.IGenericMethodParameter>(); }
125
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
145
get { return
SpecializedCollections
.EmptyEnumerable<Cci.SecurityAttribute>(); }
174
return
SpecializedCollections
.EmptyEnumerable<Cci.ICustomAttribute>();
InternalUtilities\EnumerableExtensions.cs (4)
85
return
SpecializedCollections
.EmptyBoxedImmutableArray<T>();
90
return array.IsDefaultOrEmpty ?
SpecializedCollections
.EmptyBoxedImmutableArray<T>() : (IReadOnlyList<T>)items;
95
return
SpecializedCollections
.EmptyBoxedImmutableArray<T>();
345
return
SpecializedCollections
.EmptyEnumerable<T>();
InternalUtilities\SetWithInsertionOrder.cs (2)
90
=> _elements is null ?
SpecializedCollections
.EmptyEnumerator<T>() : ((IEnumerable<T>)_elements).GetEnumerator();
99
=> (IReadOnlySet<T>?)_set ??
SpecializedCollections
.EmptyReadOnlySet<T>();
MetadataReader\PEAssembly.cs (1)
170
return result ??
SpecializedCollections
.EmptyEnumerable<ImmutableArray<byte>>();
MetadataReader\PEModule.cs (1)
682
result.Add(new Grouping<string, TypeDefinitionHandle>(pair.Key, pair.Value ??
SpecializedCollections
.EmptyEnumerable<TypeDefinitionHandle>()));
Operations\IOperation.OperationList.cs (1)
60
return
SpecializedCollections
.EmptyEnumerator<IOperation>();
Operations\IOperation.OperationList.Reversed.cs (1)
74
return
SpecializedCollections
.EmptyEnumerator<IOperation>();
PEWriter\ManagedResource.cs (1)
91
get { return
SpecializedCollections
.EmptyEnumerable<ICustomAttribute>(); }
PEWriter\ModifiedTypeReference.cs (1)
72
return
SpecializedCollections
.EmptyEnumerable<ICustomAttribute>();
PEWriter\RootModuleStaticConstructor.cs (3)
37
public IEnumerable<IGenericMethodParameter> GenericParameters =>
SpecializedCollections
.EmptyEnumerable<IGenericMethodParameter>();
112
public IEnumerable<ICustomAttribute> GetAttributes(EmitContext context) =>
SpecializedCollections
.EmptyEnumerable<ICustomAttribute>();
122
public IEnumerable<ICustomAttribute> GetReturnValueAttributes(EmitContext context) =>
SpecializedCollections
.EmptyEnumerable<ICustomAttribute>();
PEWriter\RootModuleType.cs (9)
32
_methods =
SpecializedCollections
.SingletonReadOnlyList(
38
return _methods ??=
SpecializedCollections
.EmptyReadOnlyList<IMethodDefinition>();
53
return
SpecializedCollections
.EmptyEnumerable<ICustomAttribute>();
83
return
SpecializedCollections
.EmptyEnumerable<IEventDefinition>();
88
return
SpecializedCollections
.EmptyEnumerable<MethodImplementation>();
93
return
SpecializedCollections
.EmptyEnumerable<IFieldDefinition>();
103
return
SpecializedCollections
.EmptyEnumerable<Cci.TypeReferenceWithAttributes>();
170
return
SpecializedCollections
.EmptyEnumerable<INestedTypeDefinition>();
175
return
SpecializedCollections
.EmptyEnumerable<IPropertyDefinition>();
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
850
localBoundReferenceDirectives =
SpecializedCollections
.EmptyDictionary<(string, string), MetadataReference>();
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
34
return GetDeclarationInfo(model, node, getSymbol,
SpecializedCollections
.SingletonEnumerable(executableCodeBlock), cancellationToken);
Syntax\ChildSyntaxList.cs (2)
428
return
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>();
438
return
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>();
Syntax\ChildSyntaxList.Reversed.cs (2)
37
return
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>();
47
return
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>();
Syntax\GreenNode.cs (1)
50
private static readonly IEnumerable<SyntaxAnnotation> s_noAnnotationsEnumerable =
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
Syntax\SeparatedSyntaxList.cs (2)
614
return
SpecializedCollections
.EmptyEnumerator<TNode>();
624
return
SpecializedCollections
.EmptyEnumerator<TNode>();
Syntax\SyntaxDiffer.cs (2)
41
return
SpecializedCollections
.EmptyList<TextChange>();
76
return
SpecializedCollections
.EmptyList<TextSpan>();
Syntax\SyntaxList`1.cs (2)
447
return
SpecializedCollections
.EmptyEnumerator<TNode>();
457
return
SpecializedCollections
.EmptyEnumerator<TNode>();
Syntax\SyntaxNode.cs (1)
803
SpecializedCollections
.EmptyEnumerable<SyntaxNode>();
Syntax\SyntaxNodeExtensions_Tracking.cs (2)
134
return
SpecializedCollections
.EmptyReadOnlyList<SyntaxNode>();
232
return
SpecializedCollections
.EmptyReadOnlyList<SyntaxNode>();
Syntax\SyntaxNodeOrToken.cs (4)
477
return
SpecializedCollections
.EmptyEnumerable<Diagnostic>();
592
return
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
610
return
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
865
directives = buffer ??
SpecializedCollections
.EmptyList<TDirective>();
Syntax\SyntaxNodeOrTokenList.cs (3)
315
return InsertRange(index,
SpecializedCollections
.SingletonEnumerable(nodeOrToken));
454
?
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>()
467
?
SpecializedCollections
.EmptyEnumerator<SyntaxNodeOrToken>()
Syntax\SyntaxToken.cs (5)
270
return Node?.GetAnnotations(annotationKind) ??
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
286
return Node?.GetAnnotations(annotationKinds) ??
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
529
return
SpecializedCollections
.EmptyEnumerable<SyntaxTrivia>();
660
return
SpecializedCollections
.EmptyEnumerable<Diagnostic>();
670
?
SpecializedCollections
.EmptyEnumerable<Diagnostic>()
Syntax\SyntaxTokenList.cs (2)
457
return
SpecializedCollections
.EmptyEnumerator<SyntaxToken>();
467
return
SpecializedCollections
.EmptyEnumerator<SyntaxToken>();
Syntax\SyntaxTokenList.Reversed.cs (2)
38
return
SpecializedCollections
.EmptyEnumerator<SyntaxToken>();
48
return
SpecializedCollections
.EmptyEnumerator<SyntaxToken>();
Syntax\SyntaxTrivia.cs (2)
181
:
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
191
:
SpecializedCollections
.EmptyEnumerable<SyntaxAnnotation>();
Syntax\SyntaxTriviaList.cs (2)
431
return
SpecializedCollections
.EmptyEnumerator<SyntaxTrivia>();
441
return
SpecializedCollections
.EmptyEnumerator<SyntaxTrivia>();
Syntax\SyntaxTriviaList.Reversed.cs (2)
37
return
SpecializedCollections
.EmptyEnumerator<SyntaxTrivia>();
48
return
SpecializedCollections
.EmptyEnumerator<SyntaxTrivia>();
Text\TextChange.cs (1)
97
public static IReadOnlyList<TextChange> NoChanges =>
SpecializedCollections
.EmptyReadOnlyList<TextChange>();
Text\TextChangeRange.cs (1)
93
public static IReadOnlyList<TextChangeRange> NoChanges =>
SpecializedCollections
.EmptyReadOnlyList<TextChangeRange>();
TreeDumper.cs (1)
242
this.Children = children ??
SpecializedCollections
.EmptyEnumerable<TreeDumperNode>();