134 references to CreateRange
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
809var expected = ImmutableArray.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 });
Microsoft.CodeAnalysis (14)
AssemblyUtilities.cs (1)
89return ImmutableArray.CreateRange(assemblyReferences);
Collections\ImmutableArrayExtensions.cs (3)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items);
InternalUtilities\EnumerableExtensions.cs (2)
78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
MetadataReference\AssemblyMetadata.cs (1)
245return Create(ImmutableArray.CreateRange(modules));
MetadataReference\CompilationReference.cs (1)
54return this.WithAliases(ImmutableArray.CreateRange(aliases));
MetadataReference\MetadataReference.cs (1)
52return WithAliases(ImmutableArray.CreateRange(aliases));
MetadataReference\ModuleMetadata.cs (1)
157return CreateFromImage(ImmutableArray.CreateRange(peImage));
MetadataReference\PortableExecutableReference.cs (1)
81return this.WithAliases(ImmutableArray.CreateRange(aliases));
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
436return ImmutableArray.CreateRange(referenceMap);
ResourceDescription.cs (1)
121return ImmutableArray.CreateRange(algorithm.ComputeHash(stream));
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
220_idToNodeMap = map.ToImmutableSegmentedDictionary(kv => kv.Key, kv => (IReadOnlyList<SyntaxNode>)ImmutableArray.CreateRange(kv.Value));
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (3)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
180return ImmutableArray.CreateRange(leadingTrivia.Take(index));
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return ImmutableArray.CreateRange(_constructedFrom.TypeMembers.Cast<INamedTypeSymbol>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (6)
148return ImmutableArray.CreateRange(_typeParameters); 158return ImmutableArray.CreateRange(_interfaces); 163=> ImmutableArray.CreateRange(_members.Concat(this.TypeMembers)); 166=> ImmutableArray.CreateRange(this.TypeMembers.Cast<INamedTypeSymbol>()); 173return ImmutableArray.CreateRange( 183return ImmutableArray.CreateRange(
Microsoft.CodeAnalysis.CSharp (6)
FlowAnalysis\AbstractFlowPass.PendingBranchesCollection.cs (1)
57ImmutableArray.CreateRange(AsEnumerable());
FlowAnalysis\CSharpDataFlowAnalysis.cs (2)
392return ImmutableArray.CreateRange(data.Where(s => s.CanBeReferencedByName).OrderBy(s => s, LexicalOrderSymbolComparer.Instance).GetPublicSymbols()); 397return ImmutableArray.CreateRange(data.Where(s => s.CanBeReferencedByName).OrderBy(s => s, LexicalOrderSymbolComparer.Instance).Select(p => p.GetPublicSymbol()));
Symbols\MergedNamespaceSymbol.cs (2)
236return ImmutableArray.CreateRange<NamedTypeSymbol>(GetMembersUnordered().OfType<NamedTypeSymbol>()); 241return ImmutableArray.CreateRange<NamedTypeSymbol>(GetMembers().OfType<NamedTypeSymbol>());
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
871return ImmutableArray.CreateRange(names);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (2)
21siblingStatements = ImmutableArray.CreateRange(block.Statements); 25siblingStatements = ImmutableArray.CreateRange(switchSection.Statements);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenTupleTest.cs (1)
6925ImmutableArray.CreateRange(Enumerable.Range(0, n).Select(_ => annotation));
Emit\CompilationEmitTests.cs (2)
2664MetadataReaderUtils.AssertNotThrowNull(ImmutableArray.CreateRange(output.GetBuffer())); 2665MetadataReaderUtils.AssertEmptyOrThrowNull(ImmutableArray.CreateRange(metadataOutput.GetBuffer()));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\LocalStateTracing\LocalStateTracingTests.cs (1)
34var options = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.CreateRange(kinds));
Microsoft.CodeAnalysis.CSharp.Features (3)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
77return ImmutableArray.CreateRange(block.Statements);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (2)
21siblingStatements = ImmutableArray.CreateRange(block.Statements); 25siblingStatements = ImmutableArray.CreateRange(switchSection.Statements);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\GetImportScopesTests.cs (1)
404return comp.ReplaceReference(reference, reference.WithAliases(ImmutableArray.CreateRange(aliases)));
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.TextBufferContainer.cs (1)
113var changes = ImmutableArray.CreateRange(args.Changes.Select(c => new TextChangeRange(new TextSpan(c.OldSpan.Start, c.OldSpan.Length), c.NewLength)));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Completion\TestFileSystemCompletionHelper.cs (3)
36_drives = ImmutableArray.CreateRange(drives); 37_directories = ImmutableArray.CreateRange(directories); 38_files = ImmutableArray.CreateRange(files);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Native.cs (1)
278return ImmutableArray.CreateRange(namespaces.Select(n => n.GetName()));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (5)
FunctionResolverTestBase.cs (1)
69return ImmutableArray.CreateRange(handles.Select(h => reader.GetString(reader.GetGenericParameter(h).Name)));
ParsingTestBase.cs (3)
34return new RequestSignature(name, ImmutableArray.CreateRange(parameters)); 45return new GenericName(name, ImmutableArray.CreateRange(typeArguments)); 61return new GenericTypeSignature(name, ImmutableArray.CreateRange(typeArguments));
Request.cs (1)
52return ImmutableArray.CreateRange(_resolvedAddresses);
Microsoft.CodeAnalysis.Features (3)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
41_members = ImmutableArray.CreateRange(filteredMembers);
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (1)
315_lookupTable = ImmutableArray.CreateRange(lookupTable);
QuickInfo\QuickInfoUtilities.cs (1)
155var tags = ImmutableArray.CreateRange(GlyphTags.GetTags(symbol.GetGlyph()));
Microsoft.CodeAnalysis.Scripting (6)
Hosting\CommandLine\CommandLineRunner.cs (3)
168references: ImmutableArray.CreateRange(resolvedReferences), 328var newReferenceSearchPaths = ImmutableArray.CreateRange(globals.ReferencePaths); 329var newSourceSearchPaths = ImmutableArray.CreateRange(globals.SourcePaths);
Script.cs (2)
367return ImmutableArray.CreateRange(GetCompilation().GetDiagnostics(cancellationToken).Where(d => d.Severity == DiagnosticSeverity.Warning)); 371return ImmutableArray.CreateRange(e.Diagnostics.Where(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning));
ScriptOptions.cs (1)
76return ImmutableArray.CreateRange(files.Select(CreateUnresolvedReference));
Microsoft.CodeAnalysis.Test.Utilities (10)
Diagnostics\TestDiagnosticAnalyzer.cs (1)
30return ImmutableArray.CreateRange(Enum.GetValues(typeof(T)).Cast<T>());
MarkedSource\SourceWithMarkedNodes.cs (1)
47MarkedSpans = ImmutableArray.CreateRange(GetSpansRecursive(markedSource, 0, getSyntaxKind));
Metadata\AggregatedMetadataReader.cs (1)
29Readers = ImmutableArray.CreateRange(readers);
TargetFrameworkUtil.cs (7)
101public static ImmutableArray<Net70.ReferenceInfo> AllReferenceInfos { get; } = ImmutableArray.CreateRange(Net70.ReferenceInfos.All); 102public static ImmutableArray<MetadataReference> References { get; } = ImmutableArray.CreateRange<MetadataReference>(Net70.References.All); 304TargetFramework.Net50 => ImmutableArray.CreateRange<MetadataReference>(LoadDynamicReferences("Net50")), 305TargetFramework.Net60 => ImmutableArray.CreateRange<MetadataReference>(LoadDynamicReferences("Net60")), 306TargetFramework.NetCoreApp or TargetFramework.Net70 => ImmutableArray.CreateRange<MetadataReference>(Net70.References.All), 307TargetFramework.Net80 => ImmutableArray.CreateRange<MetadataReference>(LoadDynamicReferences("Net80")), 308TargetFramework.Net90 => ImmutableArray.CreateRange<MetadataReference>(LoadDynamicReferences("Net90")),
Microsoft.CodeAnalysis.UnitTests (3)
Collections\ImmutableArrayExtensionsTests.cs (2)
29Assert.Throws<ArgumentNullException>(() => ImmutableArray.CreateRange<int>((IEnumerable<int>)null)); 31a = ImmutableArray.CreateRange<int>(Enumerable.Range(1, 2));
Collections\ImmutableListTestBase.cs (1)
475var reverseSorted = System.Collections.Immutable.ImmutableArray.CreateRange(Enumerable.Range(1, 150).Select(n => n * 2).Reverse());
Microsoft.CodeAnalysis.VisualBasic (7)
Compilation\SemanticModel.vb (1)
909Dim result = ImmutableArray.CreateRange(symbolSet)
Declarations\MergedTypeDeclaration.vb (1)
142Function(g) New MergedTypeDeclaration(ImmutableArray.CreateRange(Of SingleTypeDeclaration)(g))
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
241Return ImmutableArray.CreateRange(PreviousGeneration.SynthesizedTypes.AnonymousTypes.Keys)
Lowering\SyntheticBoundNodeFactory.vb (1)
692Dim sectionsArray = ImmutableArray.CreateRange(Of BoundCaseBlock)(sections)
Symbols\MergedNamespaceSymbol.vb (3)
312Return ImmutableArray.CreateRange(Of NamedTypeSymbol)(GetMembersUnordered().OfType(Of NamedTypeSymbol)) 316Return ImmutableArray.CreateRange(Of NamedTypeSymbol)(GetMembers().OfType(Of NamedTypeSymbol)) 321Return ImmutableArray.CreateRange(Of NamedTypeSymbol)(GetMembers(name).OfType(Of NamedTypeSymbol))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Emit\CompilationEmitTests.vb (2)
1798MetadataReaderUtils.AssertNotThrowNull(ImmutableArray.CreateRange(output.GetBuffer())) 1799MetadataReaderUtils.AssertEmptyOrThrowNull(ImmutableArray.CreateRange(metadataOutput.GetBuffer()))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\VisualBasicCompilationOptionsTests.vb (2)
35TestHiddenProperty(Function(old, value) old.WithCryptoPublicKey(value), Function(opt) opt.CryptoPublicKey, ImmutableArray.CreateRange(Of Byte)({1, 2, 3, 4})) 110TestProperty(Function(old, value) old.WithCryptoPublicKey(value), Function(opt) opt.CryptoPublicKey, ImmutableArray.CreateRange(Of Byte)({1, 2, 3, 4}))
Microsoft.CodeAnalysis.Workspaces (14)
Editing\SymbolEditor.cs (1)
135.ToImmutableDictionary(g => g.Key, g => ImmutableArray.CreateRange(g));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (3)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
180return ImmutableArray.CreateRange(leadingTrivia.Take(index));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return ImmutableArray.CreateRange(_constructedFrom.TypeMembers.Cast<INamedTypeSymbol>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (6)
148return ImmutableArray.CreateRange(_typeParameters); 158return ImmutableArray.CreateRange(_interfaces); 163=> ImmutableArray.CreateRange(_members.Concat(this.TypeMembers)); 166=> ImmutableArray.CreateRange(this.TypeMembers.Cast<INamedTypeSymbol>()); 173return ImmutableArray.CreateRange( 183return ImmutableArray.CreateRange(
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (3)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
96return ImmutableArray.CreateRange((await Task.WhenAll(context.Solution.Projects.Select(context.GetAllDiagnosticsAsync)).ConfigureAwait(false)).SelectMany(arr => arr));
Microsoft.Interop.SourceGeneration (2)
TypeSymbolExtensions.cs (2)
295ImmutableArray.CreateRange(arguments), 296ImmutableArray.CreateRange(annotations));
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
72_metadataReferences = ImmutableArray.CreateRange(CreateMetadataReferences());
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Interactive\Commands\ResetInteractiveTests.cs (1)
94References = ImmutableArray.CreateRange(GetProjectReferences(workspace, project)),
Roslyn.VisualStudio.Next.UnitTests (21)
Services\AssetProviderTests.cs (6)
46var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 47var checksum = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 83var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 111var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 136var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 165var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray()));
Services\ServiceHubServicesTests.cs (1)
114var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray()));
Services\SolutionAssetCacheTests.cs (3)
34var checksum = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 48var checksum = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 84var checksum2 = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray()));
Services\SolutionServiceTests.cs (11)
557Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 598Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 640Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 673Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 715Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 755Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 793Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 826Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 881Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 950Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 1324var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray()));
RunTests (1)
ProcessTestExecutor.cs (1)
195processResults: ImmutableArray.CreateRange(processResultList));
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.cs (1)
354return ImmutableArray.CreateRange(items);