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