5827 references to ImmutableArray
AnalyzerRunner (1)
Options.cs (1)
135var incrementalAnalyzerNames = ImmutableArray.CreateBuilder<string>();
Aspire.Dashboard (1)
Model\ResourceViewModelExtensions.cs (1)
78var builder = ImmutableArray.CreateBuilder<string>(value.ListValue.Values.Count);
Aspire.Hosting (7)
ApplicationModel\CustomResourceSnapshot.cs (1)
333var relationships = ImmutableArray.CreateBuilder<RelationshipSnapshot>();
ApplicationModel\ResourceNotificationService.cs (2)
406builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length); 422builder = ImmutableArray.CreateBuilder<ResourceCommandSnapshot>(previousState.Commands.Length);
Dcp\ApplicationExecutor.cs (3)
654var ports = ImmutableArray.CreateBuilder<int>(); 741var urls = ImmutableArray.CreateBuilder<UrlSnapshot>(); 829var environment = ImmutableArray.CreateBuilder<EnvironmentVariableSnapshot>(effectiveSource.Count);
Dcp\DcpNameGenerator.cs (1)
48var builder = ImmutableArray.CreateBuilder<DcpInstance>(replicas);
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
23public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create(
BuildValidator (1)
LocalReferenceResolver.cs (1)
139aliases: metadataReferenceInfo.ExternAlias is null ? ImmutableArray<string>.Empty : ImmutableArray.Create(metadataReferenceInfo.ExternAlias),
ConfigurationSchemaGenerator (5)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
110var sourcesBuilder = ImmutableArray.CreateBuilder<(string hintName, SourceText sourceText)>();
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
29var builder = ImmutableArray.CreateBuilder<Type>();
GenerateRulesMissingDocumentation (1)
Program.cs (1)
173private static readonly ImmutableArray<string> s_assemblies = ImmutableArray.Create(
IdeCoreBenchmarks (1)
IncrementalAnalyzerBenchmarks.cs (1)
60incrementalAnalyzerNames: ImmutableArray.Create(AnalyzerName));
illink (5)
ILLink.CodeFixProvider (4)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
28 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> ();
RequiresAssemblyFilesCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (
RequiresDynamicCodeCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresDynamicCode));
RequiresUnreferencedCodeCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCode));
ILLink.RoslynAnalyzer (26)
COMAnalyzer.cs (1)
25 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (s_correctnessOfCOMCannotBeGuaranteed);
CompilationExtensions.cs (5)
144 case 1: return ImmutableArray.Create (span[0]); 145 case 2: return ImmutableArray.Create (span[0], span[1]); 146 case 3: return ImmutableArray.Create (span[0], span[1], span[2]); 147 case 4: return ImmutableArray.Create (span[0], span[1], span[2], span[3]); 149 var builder = ImmutableArray.CreateBuilder<T> (span.Length);
DataFlow\ControlFlowGraphProxy.cs (1)
60 var finallyRegions = ImmutableArray.CreateBuilder<RegionProxy> ();
DataFlow\LocalDataFlowVisitor.cs (7)
277 ImmutableArray<TValue>.Builder arguments = ImmutableArray.CreateBuilder<TValue> (); 302 var argumentsBuilder = ImmutableArray.CreateBuilder<TValue> (); 438 HandleMethodCallHelper (addMethod, instanceValue, ImmutableArray.Create (value), operation, state); 444 HandleMethodCallHelper (removeMethod, instanceValue, ImmutableArray.Create (value), operation, state); 614 ImmutableArray<TValue>.Builder arguments = ImmutableArray.CreateBuilder<TValue> (); 652 return HandleMethodCallHelper (getMethod, instanceValue, ImmutableArray.Create (indexArgumentValue), operation, state); 808 var argumentsBuilder = ImmutableArray.CreateBuilder<TValue> ();
DynamicallyAccessedMembersAnalyzer.cs (2)
28 ImmutableArray.Create<RequiresAnalyzerBase> ( 35 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> (26);
RequiresAssemblyFilesAnalyzer.cs (2)
37 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (s_locationRule, s_getFilesRule, s_requiresAssemblyFilesRule, s_requiresAssemblyFilesAttributeMismatch, s_requiresAssemblyFilesOnStaticCtor, s_requiresAssemblyFilesOnEntryPoint); 85 var dangerousPatternsBuilder = ImmutableArray.CreateBuilder<ISymbol> ();
RequiresDynamicCodeAnalyzer.cs (1)
28 ImmutableArray.Create (s_requiresDynamicCodeRule, s_requiresDynamicCodeAttributeMismatch, s_requiresDynamicCodeOnStaticCtor, s_requiresDynamicCodeOnEntryPoint);
RequiresUnreferencedCodeAnalyzer.cs (2)
49 ImmutableArray.Create (s_makeGenericMethodRule, s_makeGenericTypeRule, s_requiresUnreferencedCodeRule, s_requiresUnreferencedCodeAttributeMismatch, s_typeDerivesFromRucClassRule, s_requiresUnreferencedCodeOnStaticCtor, s_requiresUnreferencedCodeOnEntryPoint); 98 ImmutableArray.Create<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ((typeDerivesFromRucBase, new SymbolKind[] { SymbolKind.NamedType }));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (1)
1360 var builder = ImmutableArray.CreateBuilder<GenericParameterValue> (genericParameters.Length);
TrimAnalysis\MethodProxy.cs (1)
41 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (Method.TypeParameters.Length);
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (2)
37 var builder = ImmutableArray.CreateBuilder<MultiValue> (); 58 var argumentsBuilder = ImmutableArray.CreateBuilder<MultiValue> ();
TrimAnalysis\TypeProxy.cs (1)
20 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (namedType.TypeParameters.Length);
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
129return ImmutableArray.Create(text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
Microsoft.Analyzers.Extra (9)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
AsyncMethodWithoutCancellation.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
50public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DiagDescriptors.LegacyLogging.Id);
CoalesceAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.CoalesceAssignment, DiagDescriptors.Coalesce);
ConditionalAccessAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.ConditionalAccess);
MakeExeTypesInternalAnalyzer.cs (1)
50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.MakeExeTypesInternal);
MakeExeTypesInternalFixer.cs (1)
22public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DiagDescriptors.MakeExeTypesInternal.Id);
UsingToStringInLoggersAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.UsingToStringInLoggers);
Microsoft.Analyzers.Extra.Tests (4)
Resources\AnalyzerOptionsFactory.cs (1)
17var immutableFiles = ImmutableArray.Create(files, 0, files.Length);
Resources\RoslynTestUtils.cs (3)
257var analyzers = ImmutableArray.Create(analyzer); 329var analyzers = ImmutableArray.Create(analyzer); 440var diagsProvider = new TestDiagnosticProvider(proj, ImmutableArray.Create(analyzer), fixer);
Microsoft.Analyzers.Local (3)
ApiLifecycle\ApiLifecycleAnalyzer.cs (1)
22=> ImmutableArray.Create(
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
InternalReferencedInPublicDocAnalyzer.cs (1)
21private static readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics = ImmutableArray.Create(DiagDescriptors.InternalReferencedInPublicDoc);
Microsoft.Analyzers.Local.Tests (4)
Resources\AnalyzerOptionsFactory.cs (1)
17var immutableFiles = ImmutableArray.Create(files, 0, files.Length);
Resources\RoslynTestUtils.cs (3)
257var analyzers = ImmutableArray.Create(analyzer); 330var analyzers = ImmutableArray.Create(analyzer); 441var diagsProvider = new TestDiagnosticProvider(proj, ImmutableArray.Create(analyzer), fixer);
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
75.WithAnalyzers(ImmutableArray.Create(analyzer));
DiagnosticVerifier.cs (1)
95.WithAnalyzers(ImmutableArray.Create(analyzer));
Microsoft.AspNetCore.Analyzers (5)
MiddlewareAnalyzer.cs (1)
23var middleware = ImmutableArray.CreateBuilder<MiddlewareItem>();
OptionsAnalyzer.cs (1)
24var options = ImmutableArray.CreateBuilder<OptionsItem>();
ServicesAnalyzer.cs (1)
23var services = ImmutableArray.CreateBuilder<ServicesItem>();
StartupAnalysis.cs (1)
41var items = ImmutableArray.CreateBuilder<T>();
StartupAnalyzer.Diagnostics.cs (1)
42public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create<DiagnosticDescriptor>(new[]
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
22var references = ImmutableArray.CreateBuilder<MetadataReference>();
Microsoft.AspNetCore.App.Analyzers (34)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseAddAuthorizationBuilder);
Http\HeaderDictionaryAddAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseIHeaderDictionaryAdd);
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseHeaderDictionaryPropertiesInsteadOfIndexer);
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotReturnValueFromRequestDelegate);
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (1)
40=> Diagnostics.Length > 0 ? this : WithDiagnostics(ImmutableArray.Create(diagnostic));
Infrastructure\RoutePattern\RoutePatternParser.cs (7)
70var routeParameters = ImmutableArray.CreateBuilder<RouteParameter>(); 72var diagnostics = ImmutableArray.CreateBuilder<EmbeddedDiagnostic>(); 228var policies = ImmutableArray.CreateBuilder<string>(); 350var result = ImmutableArray.CreateBuilder<RoutePatternRootPartNode>(); 369var result = ImmutableArray.CreateBuilder<RoutePatternSegmentPartNode>(); 494var parts = ImmutableArray.CreateBuilder<RoutePatternParameterPartNode>(); 574var fragments = ImmutableArray.CreateBuilder<RoutePatternNode>();
Mvc\MvcAnalyzer.cs (3)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 113: ImmutableArray.Create(GetHttpMethod(match.Value)!); 121var httpMethodsBuilder = ImmutableArray.CreateBuilder<string>();
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseNonLiteralSequenceNumbers);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (4)
45filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>()))); 74ImmutableArray.Create(new TaggedText(TextTags.Text, description)))); 277tags: ImmutableArray.Create(embeddedItem.Glyph))); 411var builder = ImmutableArray.CreateBuilder<string>();
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
21var resolvedParameterSymbols = ImmutableArray.CreateBuilder<ParameterSymbol>();
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (2)
17private static readonly EmbeddedLanguageCommentDetector _commentDetector = new(ImmutableArray.Create("Route")); 532return ImmutableArray.Create(info.Symbol);
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
158var httpMethodsBuilder = ImmutableArray.CreateBuilder<string>(); 349return ImmutableArray.Create(info.Symbol);
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (3)
39filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>()))); 68ImmutableArray.Create(new TaggedText(TextTags.Text, description)))); 156tags: ImmutableArray.Create(embeddedItem.Glyph)));
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (2)
50var highlightSpans = ImmutableArray.CreateBuilder<AspNetCoreHighlightSpan>(); 69return ImmutableArray.Create(new AspNetCoreDocumentHighlights(highlightSpans.ToImmutable()));
RouteHandlers\RouteHandlerAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.PublicPartialProgramClassNotRequired);
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.AspNetCore.App.Analyzers.Test (3)
Infrastructure\WellKnownTypesTests.cs (2)
75var trees = ImmutableArray.Create(tree); 98public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
Verifiers\CSharpAnalyzerVerifier.cs (1)
64return net10Ref.AddAssemblies(ImmutableArray.Create(
Microsoft.AspNetCore.App.CodeFixes (6)
Authorization\AddAuthorizationBuilderFixer.cs (1)
23public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(DiagnosticDescriptors.UseAddAuthorizationBuilder.Id);
DetectMismatchedParameterOptionalityFixer.cs (1)
19public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(DiagnosticDescriptors.DetectMismatchedParameterOptionality.Id);
Http\HeaderDictionaryAddFixer.cs (1)
24public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(DiagnosticDescriptors.DoNotUseIHeaderDictionaryAdd.Id);
Http\HeaderDictionaryIndexerFixer.cs (1)
19public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(DiagnosticDescriptors.UseHeaderDictionaryPropertiesInsteadOfIndexer.Id);
RouteParameterUnusedParameterFixer.cs (1)
24public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
WebApplicationBuilderFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
Microsoft.AspNetCore.Components.Analyzers (4)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseRenderTreeTypes);
ComponentParameterAnalyzer.cs (1)
24SupportedDiagnostics = ImmutableArray.Create(new[]
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
23=> ImmutableArray.Create(DiagnosticDescriptors.ComponentParametersShouldBePublic.Id);
ComponentParameterUsageAnalyzer.cs (1)
17SupportedDiagnostics = ImmutableArray.Create(new[]
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
62var compilationWithAnalyzers = project.GetCompilationAsync().Result.WithAnalyzers(ImmutableArray.Create(analyzer));
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
10public static ImmutableArray<TElement>.Builder CreateBuffer() => ImmutableArray.CreateBuilder<TElement>();
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.AspNetCore.Components.SdkAnalyzers (4)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseRenderTreeTypes);
ComponentParameterAnalyzer.cs (1)
19SupportedDiagnostics = ImmutableArray.Create(new[]
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
23=> ImmutableArray.Create(DiagnosticDescriptors.ComponentParametersShouldBePublic.Id);
ComponentParameterUsageAnalyzer.cs (1)
17SupportedDiagnostics = ImmutableArray.Create(new[]
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
62var compilationWithAnalyzers = project.GetCompilationAsync().Result.WithAnalyzers(ImmutableArray.Create(analyzer));
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
10public static ImmutableArray<TElement>.Builder CreateBuffer() => ImmutableArray.CreateBuilder<TElement>();
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\CompileTimeCreationTests.cs (1)
162new SourceFileResolver(ImmutableArray<string>.Empty, currentDirectory, ImmutableArray.Create(new KeyValuePair<string, string>(currentDirectory, mappedDirectory))));
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
RequestDelegateGeneratorSuppressor.cs (1)
73public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray.Create(SuppressRUCDiagnostic, SuppressRDCDiagnostic);
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (2)
23builder = ImmutableArray.CreateBuilder<TElement>(); 29ImmutableArray.CreateBuilder<(TSource, int, ImmutableArray<TElement>)>();
StaticRouteHandlerModel\EndpointParameter.cs (1)
38var attributeBuilder = ImmutableArray.CreateBuilder<AttributeData>();
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
13public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
TagHelpersInCodeBlocksAnalyzer.cs (1)
17SupportedDiagnostics = ImmutableArray.Create(DiagnosticDescriptors.MVC1006_FunctionsContainingTagHelpersMustBeAsyncAndReturnTask);
TopLevelParameterNameAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
ViewFeatureAnalyzerBase.cs (1)
15SupportedDiagnostics = ImmutableArray.Create(new[] { SupportedDiagnostic });
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
AddResponseTypeAttributeCodeFixProvider.cs (1)
16public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
ApiActionsDoNotRequireExplicitModelValidationCodeFixProvider.cs (1)
21ImmutableArray.Create(ApiDiagnosticDescriptors.API1003_ApiActionsDoNotRequireExplicitModelValidationCheck.Id);
ApiConventionAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.Build (9)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
69var namedSectionBuilder = ImmutableArray.CreateBuilder<Section>();
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (1)
120var imArray = ImmutableArray.CreateBuilder<(int, int)>(numberRangePairs is null ? 0 : numberRangePairs.Count);
Evaluation\LazyItemEvaluator.cs (1)
484public readonly ImmutableArray<ProjectMetadataElement>.Builder Metadata = ImmutableArray.CreateBuilder<ProjectMetadataElement>();
Evaluation\LazyItemEvaluator.IncludeOperation.cs (3)
76itemsToAdd ??= ImmutableArray.CreateBuilder<I>(); 88itemsToAdd ??= ImmutableArray.CreateBuilder<I>(); 131itemsToAdd ??= ImmutableArray.CreateBuilder<I>();
Globbing\CompositeGlob.cs (3)
40: this(ImmutableArray.Create(globs)) 49: this(ImmutableArray.Create(glob1, glob2)) 127var builder = ImmutableArray.CreateBuilder<IMSBuildGlob>();
Microsoft.Build.Framework (1)
HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
Microsoft.CodeAnalysis (173)
AssemblyUtilities.cs (2)
28var builder = ImmutableArray.CreateBuilder<string>(); 89return ImmutableArray.CreateRange(assemblyReferences);
CodeGen\LocalScopeManager.cs (6)
333_nestedScopes = ImmutableArray.CreateBuilder<ScopeInfo>(1); 343_localVariables = ImmutableArray.CreateBuilder<LocalDefinition>(1); 355_localConstants = ImmutableArray.CreateBuilder<LocalConstantDefinition>(1); 367_stateMachineUserHoistedLocalSlotIndices = ImmutableArray.CreateBuilder<int>(1); 409Blocks = ImmutableArray.CreateBuilder<BasicBlock>(4); 684_handlers = ImmutableArray.CreateBuilder<ExceptionHandlerScope>(2);
CodeGen\PermissionSetAttribute.cs (1)
112return ImmutableArray.Create<Cci.IMetadataNamedArgument>(new HexPropertyMetadataNamedArgument(stringType, new MetadataConstant(stringType, hexFileContent)));
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
64_sortedCaseLabels = ImmutableArray.Create(caseLabels);
Collections\ArrayBuilderExtensions.cs (12)
79return ImmutableArray.Create(map(items[0])); 82return ImmutableArray.Create(map(items[0]), map(items[1])); 85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2])); 88return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]), map(items[3])); 119return ImmutableArray.Create(map(items[0], arg)); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg)); 128return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg), map(items[3], arg)); 159return ImmutableArray.Create(map(items[0], 0, arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 168return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg));
Collections\ImmutableArrayExtensions.cs (19)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items); 87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray()); 143return ImmutableArray.CreateRange(items, map); 158return ImmutableArray.CreateRange(items, map, arg); 179return ImmutableArray.Create(map(items[0], 0, arg)); 182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 188return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg)); 494return ImmutableArray.Create(map(self[0], other[0])); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1])); 500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2])); 503return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]), map(self[3], other[3])); 1202? ImmutableArray.Create(symbol) 1203: ImmutableArray<TNamespaceOrTypeSymbol>.CastUp(ImmutableArray.Create((TNamedTypeSymbol)symbol));
Collections\OrderPreservingMultiDictionary.cs (1)
281return ImmutableArray.Create<V>((V)_value);
Collections\TemporaryArray`1.cs (4)
3101 => ImmutableArray.Create(_item0), 3112 => ImmutableArray.Create(_item0, _item1), 3123 => ImmutableArray.Create(_item0, _item1, _item2), 3134 => ImmutableArray.Create(_item0, _item1, _item2, _item3),
Collections\UnionCollection.cs (2)
45return new UnionCollection<T>(ImmutableArray.Create(coll1, coll2)); 61return new UnionCollection<T>(ImmutableArray.CreateRange(collections, selector));
CommandLine\AnalyzerConfig.cs (1)
195var namedSectionBuilder = ImmutableArray.CreateBuilder<Section>();
CommandLine\CommandLineArguments.cs (2)
480var analyzerBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 481var generatorBuilder = ImmutableArray.CreateBuilder<ISourceGenerator>();
CommandLine\CommonCompiler.cs (1)
456var embeddedTextBuilder = ImmutableArray.CreateBuilder<EmbeddedText?>(embeddedFileOrderedSet.Count);
CommandLine\CommonCompiler.LoggingMetadataFileReferenceResolver.cs (1)
36return ImmutableArray.Create(_provider(fullPath, properties));
Compilation\SymbolInfo.cs (1)
81=> this.Symbol == null ? CandidateSymbols : ImmutableArray.Create(this.Symbol);
CryptographicHashProvider.cs (7)
38return ImmutableArray.Create<byte>(); 177return ImmutableArray.Create(hashProvider.ComputeHash(stream)); 194return ImmutableArray.Create(hashProvider.ComputeHash(bytes)); 203return ImmutableArray.Create(incrementalHash.GetHashAndReset()); 212return ImmutableArray.Create(incrementalHash.GetHashAndReset()); 222return ImmutableArray.Create(incrementalHash.GetHashAndReset()); 238return ImmutableArray.Create(incrementalHash.GetHashAndReset());
Desktop\DesktopAssemblyIdentityComparer.Fx.cs (11)
181private static readonly ImmutableArray<byte> s_NETCF_PUBLIC_KEY_TOKEN_1 = ImmutableArray.Create(new byte[] { 0x1c, 0x9e, 0x25, 0x96, 0x86, 0xf9, 0x21, 0xe0 }); 182private static readonly ImmutableArray<byte> s_NETCF_PUBLIC_KEY_TOKEN_2 = ImmutableArray.Create(new byte[] { 0x5f, 0xd5, 0x7c, 0x54, 0x3a, 0x9c, 0x02, 0x47 }); 183private static readonly ImmutableArray<byte> s_NETCF_PUBLIC_KEY_TOKEN_3 = ImmutableArray.Create(new byte[] { 0x96, 0x9d, 0xb8, 0x05, 0x3d, 0x33, 0x22, 0xac }); 184private static readonly ImmutableArray<byte> s_SQL_PUBLIC_KEY_TOKEN = ImmutableArray.Create(new byte[] { 0x89, 0x84, 0x5d, 0xcd, 0x80, 0x80, 0xcc, 0x91 }); 185private static readonly ImmutableArray<byte> s_SQL_MOBILE_PUBLIC_KEY_TOKEN = ImmutableArray.Create(new byte[] { 0x3b, 0xe2, 0x35, 0xdf, 0x1c, 0x8d, 0x2a, 0xd3 }); 186private static readonly ImmutableArray<byte> s_ECMA_PUBLICKEY_STR_L = ImmutableArray.Create(new byte[] { 0xb7, 0x7a, 0x5c, 0x56, 0x19, 0x34, 0xe0, 0x89 }); 187private static readonly ImmutableArray<byte> s_SHAREDLIB_PUBLICKEY_STR_L = ImmutableArray.Create(new byte[] { 0x31, 0xbf, 0x38, 0x56, 0xad, 0x36, 0x4e, 0x35 }); 188private static readonly ImmutableArray<byte> s_MICROSOFT_PUBLICKEY_STR_L = ImmutableArray.Create(new byte[] { 0xb0, 0x3f, 0x5f, 0x7f, 0x11, 0xd5, 0x0a, 0x3a }); 189private static readonly ImmutableArray<byte> s_SILVERLIGHT_PLATFORM_PUBLICKEY_STR_L = ImmutableArray.Create(new byte[] { 0x7c, 0xec, 0x85, 0xd7, 0xbe, 0xa7, 0x79, 0x8e }); 190private static readonly ImmutableArray<byte> s_SILVERLIGHT_PUBLICKEY_STR_L = ImmutableArray.Create(new byte[] { 0x31, 0xbf, 0x38, 0x56, 0xad, 0x36, 0x4e, 0x35 }); 191private static readonly ImmutableArray<byte> s_RIA_SERVICES_KEY_TOKEN = ImmutableArray.Create(new byte[] { 0xdd, 0xd0, 0xda, 0x4d, 0x3e, 0x67, 0x82, 0x17 });
Diagnostic\DiagnosticInfo.cs (2)
36private static readonly ImmutableArray<string> s_compilerErrorCustomTags = ImmutableArray.Create(WellKnownDiagnosticTags.Compiler, WellKnownDiagnosticTags.Telemetry, WellKnownDiagnosticTags.NotConfigurable); 37private static readonly ImmutableArray<string> s_compilerNonErrorCustomTags = ImmutableArray.Create(WellKnownDiagnosticTags.Compiler, WellKnownDiagnosticTags.Telemetry);
DiagnosticAnalyzer\AnalysisResult.cs (1)
99var builder = ImmutableArray.CreateBuilder<Diagnostic>();
DiagnosticAnalyzer\AnalysisResultBuilder.cs (3)
359analyzerDiagnostics = ImmutableArray.CreateBuilder<Diagnostic>(); 379currentDiagnostics = ImmutableArray.CreateBuilder<Diagnostic>(); 413var builder = ImmutableArray.CreateBuilder<Diagnostic>();
DiagnosticAnalyzer\AnalysisScope.cs (2)
123var trees = filterFile.SourceTree != null ? ImmutableArray.Create(filterFile.SourceTree) : ImmutableArray<SyntaxTree>.Empty; 124var additionalFiles = filterFile.AdditionalFile != null ? ImmutableArray.Create(filterFile.AdditionalFile) : ImmutableArray<AdditionalText>.Empty;
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1208var builder = ImmutableArray.CreateBuilder<Diagnostic>(); 1710await OnEventProcessedCoreAsync(processedContainerEvent, ImmutableArray.Create(analyzer), analysisScope, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzer\AnalyzerFileReference.cs (3)
300return ImmutableArray.Create(LanguageNames.CSharp); 405var builder = ImmutableArray.CreateBuilder<TExtension>(); 446var builder = ImmutableArray.CreateBuilder<TExtension>();
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
1014return ImmutableArray.Create<CompilationEvent>(compilationStartedEvent, compilationUnitCompletedEvent); 1298var analysisScope = _compilationAnalysisScope.WithAnalyzers(ImmutableArray.Create(analyzer), this);
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
204var builder = ImmutableArray.CreateBuilder<Diagnostic>();
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (2)
553parameters = delegateInvokeMethod?.Parameters ?? ImmutableArray.Create<IParameterSymbol>(); 576ImmutableArray.Create(SymbolKind.Method, SymbolKind.Property, SymbolKind.NamedType));
Emit\EditAndContinue\AddedOrChangedMethodInfo.cs (3)
61var mappedLocals = ImmutableArray.CreateRange(Locals, MapLocalInfo, map); 64ImmutableArray.CreateRange(StateMachineHoistedLocalSlotsOpt, MapHoistedLocalSlot, map); 67ImmutableArray.CreateRange(StateMachineAwaiterSlotsOpt, static (typeRef, map) => (typeRef is null) ? null : map.MapReference(typeRef), map);
Emit\EditAndContinue\DeltaMetadataWriter.cs (2)
167return ImmutableArray.Create(sizes); 222tableEntriesAdded: ImmutableArray.Create(tableSizes),
Emit\EditAndContinue\EmitBaseline.cs (2)
65private static readonly ImmutableArray<int> s_emptyTableSizes = ImmutableArray.Create(new int[MetadataTokens.TableCount]); 498return ImmutableArray.Create(sizes);
InternalUtilities\EnumerableExtensions.cs (3)
70return ImmutableArray.Create<T>(); 78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
InternalUtilities\OneOrMany.cs (2)
185=> HasOneItem ? ImmutableArray.Create(_one) : _many; 272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
InternalUtilities\StringExtensions.cs (1)
22numerals = ImmutableArray.Create("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
MemberDescriptor.cs (2)
135var builder = ImmutableArray.CreateBuilder<MemberDescriptor>(count); 136var signatureBuilder = ImmutableArray.CreateBuilder<byte>();
MetadataReader\MetadataDecoder.cs (1)
374typeSymbol = MakeFunctionPointerTypeSymbol(Cci.CallingConventionUtils.FromSignatureConvention(signatureHeader.CallingConvention), ImmutableArray.Create(parameters));
MetadataReader\MetadataHelpers.cs (3)
591private static readonly ImmutableArray<string> s_splitQualifiedNameSystem = ImmutableArray.Create(SystemString); 592private static readonly ImmutableArray<ReadOnlyMemory<char>> s_splitQualifiedNameSystemMemory = ImmutableArray.Create(SystemString.AsMemory()); 625return nameMemory.Span.SequenceEqual(SystemString.AsSpan()) ? splitSystemString : ImmutableArray.Create(convert(nameMemory));
MetadataReader\PEModule.cs (4)
187return ImmutableArray.Create(hash); 439var builder = ImmutableArray.CreateBuilder<EmbeddedResource>(); 1088private static readonly ImmutableArray<bool> s_simpleTransformFlags = ImmutableArray.Create(true); 1453return (ImmutableArray.Create(paramName), true);
MetadataReference\AssemblyIdentity.cs (2)
537ImmutableArray<byte> publicKey = (publicKeyBytes != null) ? ImmutableArray.Create(publicKeyBytes) : ImmutableArray<byte>.Empty; 556ImmutableArray.Create(name.GetPublicKeyToken()),
MetadataReference\AssemblyMetadata.cs (4)
103_initialModules = ImmutableArray.Create(manifestModule); 186return new AssemblyMetadata(ImmutableArray.Create(module)); 245return Create(ImmutableArray.CreateRange(modules)); 330moduleBuilder = ImmutableArray.CreateBuilder<ModuleMetadata>(1 + additionalModuleNames.Length);
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));
Operations\ControlFlowGraphBuilder.cs (10)
3290return new InvalidOperation(ImmutableArray.Create<IOperation>(child), 3297return MakeInvalidOperation(syntax, type, ImmutableArray.Create<IOperation>(child1, child2)); 4310ImmutableArray.Create(lockStatement.LockTakenSymbol) : 4343ImmutableArray.Create<IArgumentOperation>( 4371ImmutableArray.Create<IArgumentOperation>( 4426ImmutableArray.Create<IArgumentOperation>( 4482regionForCollection = new RegionBuilder(ControlFlowRegionKind.LocalLifetime, locals: ImmutableArray.Create(local)); 5856initializer = new InvalidOperation(ImmutableArray.Create(initializer, operationInitializer), 6063var validKinds = ImmutableArray.Create(OperationKind.Invocation, OperationKind.DynamicInvocation, OperationKind.Increment, OperationKind.Literal, 7521var visitedReDimOperation = new ReDimOperation(ImmutableArray.Create(visitedReDimClause), operation.Preserve,
PEWriter\MetadataWriter.cs (1)
89ImmutableArray.Create(
PEWriter\MetadataWriter.DynamicAnalysis.cs (1)
244BlobHandle partIndex = GetOrAddBlob(ImmutableArray.Create(MetadataWriter.s_utf8Encoding.GetBytes(part)));
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
436return ImmutableArray.CreateRange(referenceMap);
ReferenceManager\CommonReferenceManager.State.cs (1)
457private static readonly ImmutableArray<string> s_supersededAlias = ImmutableArray.Create("<superseded>");
ResourceDescription.cs (1)
121return ImmutableArray.CreateRange(algorithm.ComputeHash(stream));
RuleSet\RuleSet.cs (1)
193var arrayBuilder = ImmutableArray.CreateBuilder<string>();
RuleSet\RuleSetProcessor.cs (1)
100var includes = ImmutableArray.CreateBuilder<RuleSetInclude>();
SourceGeneration\GeneratorDriver.cs (1)
40_state = new GeneratorDriverState(parseOptions, optionsProvider, generators, incrementalGenerators, additionalTexts, ImmutableArray.Create(new GeneratorState[generators.Length]), DriverStateTable.Empty, SyntaxStore.Empty, driverOptions, runtime: TimeSpan.Zero);
SourceGeneration\GeneratorState.cs (1)
99ImmutableArray.Create(error),
SourceGeneration\Nodes\CombineNode.cs (2)
65var stepInputs = tableBuilder.TrackIncrementalSteps ? ImmutableArray.Create((entry1.Step!, entry1.OutputIndex), (input2Step!, 0)) : default; 95var stepInputs = ImmutableArray.Create((entry.Step!, entry.OutputIndex), (input2Step!, 0));
SourceGeneration\Nodes\HostOutputNode.cs (1)
49var inputs = nodeTable.TrackIncrementalSteps ? ImmutableArray.Create((entry.Step!, entry.OutputIndex)) : default;
SourceGeneration\Nodes\NodeStateTable.cs (6)
192var inputs = ImmutableArray.Create((entry.Step!, entry.OutputIndex)); 569private static readonly ImmutableArray<EntryState> s_allAddedEntries = ImmutableArray.Create(EntryState.Added); 570private static readonly ImmutableArray<EntryState> s_allCachedEntries = ImmutableArray.Create(EntryState.Cached); 571private static readonly ImmutableArray<EntryState> s_allModifiedEntries = ImmutableArray.Create(EntryState.Modified); 576private static readonly ImmutableArray<EntryState> s_allRemovedEntries = ImmutableArray.Create(EntryState.Removed); 581private static readonly ImmutableArray<EntryState> s_allRemovedDueToInputRemoval = ImmutableArray.Create(EntryState.Removed);
SourceGeneration\Nodes\SharedInputNodes.cs (4)
18public static readonly InputNode<Compilation> Compilation = new InputNode<Compilation>(b => ImmutableArray.Create(b.Compilation)); 20public static readonly InputNode<CompilationOptions> CompilationOptions = new(b => ImmutableArray.Create(b.Compilation.Options), ReferenceEqualityComparer.Instance); 22public static readonly InputNode<ParseOptions> ParseOptions = new InputNode<ParseOptions>(b => ImmutableArray.Create(b.DriverState.ParseOptions)); 28public static readonly InputNode<AnalyzerConfigOptionsProvider> AnalyzerConfigOptions = new InputNode<AnalyzerConfigOptionsProvider>(b => ImmutableArray.Create(b.DriverState.OptionsProvider));
SourceGeneration\Nodes\SourceOutputNode.cs (1)
57var inputs = tableBuilder.TrackIncrementalSteps ? ImmutableArray.Create((entry.Step!, entry.OutputIndex)) : default;
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
138var builder = ImmutableArray.CreateBuilder<(SyntaxTree Tree, SourceGeneratorSyntaxTreeInfo Info)>(count);
SourceGeneration\Nodes\TransformNode.cs (2)
27: this(sourceNode, userFunc: (i, token) => ImmutableArray.Create(userFunc(i, token)), wrapUserFunc, comparer, name) 71var inputs = tableBuilder.TrackIncrementalSteps ? ImmutableArray.Create((entry.Step!, entry.OutputIndex)) : default;
SourceGeneration\Nodes\ValueSourceExtensions.cs (2)
36public static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, bool> predicate) => source.SelectMany((item, _) => predicate(item) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty); 38internal static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, bool> predicate) => source.SelectMany((item, c) => predicate(item, c) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
112yield return new CustomDebugInfoRecord(kind, version, ImmutableArray.Create(customDebugInfo, offset, bodySize - alignmentSize));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
StrongName\CryptoBlobParser.cs (1)
76private static readonly ImmutableArray<byte> s_ecmaKey = ImmutableArray.Create(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0 });
StrongName\DesktopStrongNameProvider.cs (1)
82var fileContent = ImmutableArray.Create(FileSystem.ReadAllBytes(resolvedKeyFile));
StrongName\StrongNameKeys.cs (1)
112var fileContent = ImmutableArray.Create(File.ReadAllBytes(keyFilePath));
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
220_idToNodeMap = map.ToImmutableSegmentedDictionary(kv => kv.Key, kv => (IReadOnlyList<SyntaxNode>)ImmutableArray.CreateRange(kv.Value));
Text\ChangedText.cs (1)
206return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), _newText.Length));
Text\SourceText.cs (3)
688return ImmutableArray.Create(algorithm.ComputeHash(buffer, offset, count)); 701return ImmutableArray.Create(algorithm.ComputeHash(stream)); 890return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), this.Length));
Microsoft.CodeAnalysis.CodeStyle (77)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
122var additionalLocations = ImmutableArray.Create(binaryLike.GetLocation());
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
83var customTagsBuilder = ImmutableArray.CreateBuilder<string>();
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
112additionalLocations: ImmutableArray.Create(nextToken.GetLocation()),
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
82additionalLocations: ImmutableArray.Create(token.GetLocation()),
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
74ImmutableArray.Create(node.GetLocation()));
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
107var additionalLocations = ImmutableArray.Create( 109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
212var notifications = ImmutableArray.Create(unusedParametersOption.Notification, unusedValueExpressionStatementSeverity, unusedValueAssignmentSeverity);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
649var additionalLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
119var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
123var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
182var locations = ImmutableArray.Create(objectCreationExpression.GetLocation());
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
35var additionalUnnecessaryLocations = ImmutableArray.Create( 47var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
163additionalLocations: ImmutableArray.Create(assignment.GetLocation()), 183additionalLocations: ImmutableArray.Create(assignment.GetLocation()), 196additionalLocations: ImmutableArray.Create(assignment.GetLocation()),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
60additionalLocations: ImmutableArray.Create(ifStatement.GetLocation()),
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
132var additionalLocations = ImmutableArray.Create(invocation.GetLocation());
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
190var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
99ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
119var nodes = ImmutableArray.Create<SyntaxNode>(containingStatement).AddRange(matches.Select(m => m.Statement)); 123var locations = ImmutableArray.Create(objectCreationExpression.GetLocation());
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
129var allLocations = ImmutableArray.Create(
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (12)
79return ImmutableArray.Create(map(items[0])); 82return ImmutableArray.Create(map(items[0]), map(items[1])); 85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2])); 88return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]), map(items[3])); 119return ImmutableArray.Create(map(items[0], arg)); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg)); 128return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg), map(items[3], arg)); 159return ImmutableArray.Create(map(items[0], 0, arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 168return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (19)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items); 87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray()); 143return ImmutableArray.CreateRange(items, map); 158return ImmutableArray.CreateRange(items, map, arg); 179return ImmutableArray.Create(map(items[0], 0, arg)); 182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 188return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg)); 494return ImmutableArray.Create(map(self[0], other[0])); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1])); 500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2])); 503return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]), map(self[3], other[3])); 1202? ImmutableArray.Create(symbol) 1203: ImmutableArray<TNamespaceOrTypeSymbol>.CastUp(ImmutableArray.Create((TNamedTypeSymbol)symbol));
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
281return ImmutableArray.Create<V>((V)_value);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (4)
3101 => ImmutableArray.Create(_item0), 3112 => ImmutableArray.Create(_item0, _item1), 3123 => ImmutableArray.Create(_item0, _item1, _item2), 3134 => ImmutableArray.Create(_item0, _item1, _item2, _item3),
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
70return ImmutableArray.Create<T>(); 78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (2)
185=> HasOneItem ? ImmutableArray.Create(_one) : _many; 272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
22numerals = ImmutableArray.Create("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
16private static readonly ImmutableArray<IOption2>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
27return ImmutableArray.Create(info.Symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
180return ImmutableArray.CreateRange(leadingTrivia.Take(index));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (2)
128var nodes = ImmutableArray.CreateBuilder<Node>(_builderNodes.Length); 132var edges = ImmutableArray.CreateBuilder<Edge>(Math.Max(0, _builderNodes.Length - 1));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
Microsoft.CodeAnalysis.CodeStyle.Fixes (22)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
132return (ImmutableArray.Create<ISymbol>(disposeImplMethod, disposeInterfaceMethod), finalizer); 221? ImmutableArray.Create(disposeMethod) : default;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
53var diagnostics = ImmutableArray.CreateBuilder<Diagnostic>();
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (6)
61var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 62var modifiers = ImmutableArray.Create(new ModifierKind(ModifierKindEnum.IsAsync)); 71var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field), new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local)); 80var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 81var modifiers = ImmutableArray.Create(new ModifierKind(ModifierKindEnum.IsAsync)); 90var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary));
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
69var rules = ImmutableArray.Create(GetMultiLineFormattingRule());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
56var diagnostics = ImmutableArray.Create(diagnostic ?? context.Diagnostics[0]);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return ImmutableArray.CreateRange(_constructedFrom.TypeMembers.Cast<INamedTypeSymbol>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConversionSymbol.cs (1)
37parameters: ImmutableArray.Create(fromType),
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(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
137newTypeParameter.ConstraintTypes = ImmutableArray.CreateRange(newTypeParameter.ConstraintTypes, t => t.SubstituteTypes(mapping, typeGenerator));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
85var parameters = ImmutableArray.Create(CodeGenerationSymbolFactory.CreateParameterSymbol(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
55var formattingRules = ImmutableArray.Create(
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (83)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (83)
105=> SymbolKindsArePascalCase(ImmutableArray.Create(ToSymbolKindOrTypeKind(symbolOrTypeKind))); 133ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Class)), 151ImmutableArray.Create(symbolSpecification), 152ImmutableArray.Create(namingStyle), 153ImmutableArray.Create(namingRule)); 163ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 183ImmutableArray.Create(symbolSpecification), 184ImmutableArray.Create(namingStyle), 185ImmutableArray.Create(namingRule)); 195ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 215ImmutableArray.Create(symbolSpecification), 216ImmutableArray.Create(namingStyle), 217ImmutableArray.Create(namingRule)); 227ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 247ImmutableArray.Create(symbolSpecification), 248ImmutableArray.Create(namingStyle), 249ImmutableArray.Create(namingRule)); 259ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 279ImmutableArray.Create(symbolSpecification), 280ImmutableArray.Create(namingStyle), 281ImmutableArray.Create(namingRule)); 297ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 316ImmutableArray.Create(symbolSpecification), 317ImmutableArray.Create(namingStyle), 318ImmutableArray.Create(namingRule)); 328ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.Ordinary)), 347ImmutableArray.Create(symbolSpecification), 348ImmutableArray.Create(namingStyle), 349ImmutableArray.Create(namingRule)); 378ImmutableArray.Create(symbolSpecification), 379ImmutableArray.Create(namingStyle), 380ImmutableArray.Create(namingRule)); 409ImmutableArray.Create(symbolSpecification), 410ImmutableArray.Create(namingStyle), 411ImmutableArray.Create(namingRule)); 421ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 441ImmutableArray.Create(symbolSpecification), 442ImmutableArray.Create(namingStyle), 443ImmutableArray.Create(namingRule)); 453ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 473ImmutableArray.Create(symbolSpecification), 474ImmutableArray.Create(namingStyle), 475ImmutableArray.Create(namingRule)); 485ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 505ImmutableArray.Create(symbolSpecification), 506ImmutableArray.Create(namingStyle), 507ImmutableArray.Create(namingRule)); 517ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 537ImmutableArray.Create(symbolSpecification), 538ImmutableArray.Create(namingStyle), 539ImmutableArray.Create(namingRule)); 549ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(MethodKind.LocalFunction)), 569ImmutableArray.Create(symbolSpecification), 570ImmutableArray.Create(namingStyle), 571ImmutableArray.Create(namingRule)); 581ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Property)), 601ImmutableArray.Create(symbolSpecification), 602ImmutableArray.Create(namingStyle), 603ImmutableArray.Create(namingRule)); 613ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(TypeKind.Interface)), 633ImmutableArray.Create(symbolSpecification), 634ImmutableArray.Create(namingStyle), 635ImmutableArray.Create(namingRule)); 645ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.TypeParameter)), 665ImmutableArray.Create(symbolSpecification), 666ImmutableArray.Create(namingStyle), 667ImmutableArray.Create(namingRule)); 677ImmutableArray.Create( 681ImmutableArray.Create(new SymbolSpecification.ModifierKind(SymbolSpecification.ModifierKindEnum.IsConst))); 699ImmutableArray.Create(symbolSpecification), 700ImmutableArray.Create(namingStyle), 701ImmutableArray.Create(namingRule)); 711ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 718ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 720ImmutableArray.Create(new SymbolSpecification.ModifierKind(SymbolSpecification.ModifierKindEnum.IsConst))); 753ImmutableArray.Create(localsSymbolSpecification, constLocalsSymbolSpecification), 754ImmutableArray.Create(camelCaseNamingStyle, allUpperNamingStyle), 755ImmutableArray.Create(constLocalsUpperCaseNamingRule, localsCamelCaseNamingRule)); 765ImmutableArray.Create( 769ImmutableArray.Create(new SymbolSpecification.ModifierKind(SymbolSpecification.ModifierKindEnum.IsAsync))); 787ImmutableArray.Create(symbolSpecification), 788ImmutableArray.Create(namingStyle), 789ImmutableArray.Create(namingRule));
Microsoft.CodeAnalysis.Collections.Package (1)
Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
Microsoft.CodeAnalysis.Compiler.Test.Resources (3)
TestKeys.cs (3)
13public static readonly ImmutableArray<byte> PublicKey_ce65828c82a341f2 = ImmutableArray.Create(new byte[] 27public static readonly ImmutableArray<byte> PublicKey_b03f5f7f11d50a3a = ImmutableArray.Create(new byte[] 41public static readonly ImmutableArray<byte> PublicKey_31bf3856ad364e35 = ImmutableArray.Create(new byte[]
Microsoft.CodeAnalysis.CSharp (619)
Binder\Binder.cs (2)
880return new BoundBlock(statement.Syntax, locals, ImmutableArray.Create(statement)) 897ImmutableArray.Create(statement))
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
534enclosingBinder, qvm, ImmutableArray.Create(parameter),
Binder\Binder.ValueChecks.cs (9)
630(object)otherSymbol == null ? ImmutableArray<Symbol>.Empty : ImmutableArray.Create(otherSymbol), 631receiver == null ? ImmutableArray<BoundExpression>.Empty : ImmutableArray.Create(receiver), 893getItemOrSliceHelper = getItemOrSliceHelper.AsMember(getItemOrSliceHelper.ContainingType.Construct(ImmutableArray.Create(elementAccess.Expression.Type.TryGetInlineArrayElementField().TypeWithAnnotations))); 5481ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol( 5495arguments = ImmutableArray.Create(elementAccess.Expression); 5496refKinds = ImmutableArray.Create(parameterRefKind); 5521ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol( 5535arguments = ImmutableArray.Create(inlineArray); 5536refKinds = ImmutableArray.Create(parameterRefKind);
Binder\Binder.WithQueryLambdaParametersBinder.cs (2)
88ImmutableArray.Create<Symbol>(receiver.ExpressionSymbol), 89ImmutableArray.Create(BindToTypeForErrorRecovery(receiver)),
Binder\Binder_Attributes.cs (1)
1000initializer = ImmutableArray.Create(CreateTypedConstant(node, TypedConstantKind.Error, diagnostics, ref attrHasErrors, curArgumentHasErrors));
Binder\Binder_Conversions.cs (3)
921ImmutableArray.Create((BoundExpression)element), 1512ImmutableArray.Create<BoundExpression>(methodGroup.ReceiverOpt, new BoundValuePlaceholder(syntax, secondArgumentType) { WasCompilerGenerated = true }), 2471ImmutableArray.Create(tupleSyntax.Location));
Binder\Binder_Crefs.cs (2)
60return ImmutableArray.Create<Symbol>(result); 725return ImmutableArray.Create<Symbol>(ConstructWithCrefTypeParameters(arity, typeArgumentListSyntax, symbol));
Binder\Binder_Expressions.cs (25)
164ImmutableArray.Create(BindToTypeForErrorRecovery(childNode)), 220ImmutableArray.Create(BindToTypeForErrorRecovery(expr)), 854node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))), 1006ImmutableArray.Create(BindValue(arguments[0].Expression, diagnostics, BindValueKind.RValue)) : 1042ImmutableArray.Create<BoundExpression>(boundArgument), CreateErrorType("void")); 1643symbols: ImmutableArray.Create(symbol), 1644childBoundNodes: ImmutableArray.Create(BindToTypeForErrorRecovery(expression)), 4185ImmutableArray.Create(boundExpression.ExpressionSymbol), 4186ImmutableArray.Create(boundExpression)); 4562typeArguments: ImmutableArray.Create(elementTypeWithAnnotations), 5409return new BoundBadExpression(node, LookupResultKind.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type); 5419argument.Syntax, default, WellKnownMemberNames.DelegateInvokeName, ImmutableArray.Create(sourceDelegate.DelegateInvokeMethod), 5553return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated }; 6309ImmutableArray.Create(boundElementInitializer), 6537ImmutableArray.Create((BoundExpression)addElementPlaceholder), 7777return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true); 7814return new BoundBadExpression(node, lookupResult.Kind, symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true); 8160(object)symbolOpt == null ? ImmutableArray<Symbol>.Empty : ImmutableArray.Create(symbolOpt), 8161boundLeft == null ? ImmutableArray<BoundExpression>.Empty : ImmutableArray.Create(BindToTypeForErrorRecovery(boundLeft)), 9197Construct(ImmutableArray.Create(elementField.TypeWithAnnotations)); 9373var argumentPlaceholders = ImmutableArray.Create(new BoundImplicitIndexerValuePlaceholder(convertedArguments[0].Syntax, int32) { WasCompilerGenerated = true }); 10040argumentPlaceholders = ImmutableArray.Create(intPlaceholder); 10112argumentPlaceholders = ImmutableArray.Create(startArgumentPlaceholder, lengthArgumentPlaceholder); 10119syntax, typeArgumentsOpt: default, method.Name, ImmutableArray.Create(method), 10399methods = ImmutableArray.Create(method);
Binder\Binder_InterpolatedString.cs (1)
584ImmutableArray.Create(unconvertedInterpolatedString.Parts),
Binder\Binder_Invocation.cs (2)
121return BadExpression(node, LookupResultKind.Empty, ImmutableArray.Create(symbol), args.Add(receiver), wasCompilerGenerated: true); 1729ImmutableArray.Create(arraySize),
Binder\Binder_Lookup.cs (2)
1441var unwrappedSymbols = ImmutableArray.Create<Symbol>(unwrappedSymbol); 1466diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadAccess, new[] { unwrappedSymbol }, ImmutableArray.Create<Symbol>(unwrappedSymbol), additionalLocations: ImmutableArray<Location>.Empty);
Binder\Binder_Query.cs (24)
263result = MakeQueryInvocation(state.selectOrGroup, e, "GroupBy", ImmutableArray.Create(lambdaLeft, lambdaRight), d 303ImmutableArray.Create(state.fromExpression), state.fromExpression.Type); 424var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), select.Expression, diagnostics.AccumulatesDependencies); 430ImmutableArray.Create(inExpression, outerKeySelectorLambda, innerKeySelectorLambda, resultSelectorLambda), 452var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, g), select.Expression, diagnostics.AccumulatesDependencies); 458ImmutableArray.Create(inExpression, outerKeySelectorLambda, innerKeySelectorLambda, resultSelectorLambda), 498ImmutableArray.Create(inExpression, outerKeySelectorLambda, innerKeySelectorLambda, resultSelectorLambda), 528ImmutableArray.Create(inExpression, outerKeySelectorLambda, innerKeySelectorLambda, resultSelectorLambda), 609var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), select.Expression, diagnostics.AccumulatesDependencies); 615ImmutableArray.Create(collectionSelectorLambda, resultSelectorLambda), 662ImmutableArray.Create(collectionSelectorLambda, resultSelectorLambda), 699var result = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), node, bodyFactory, withDependencies); 736yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType()); 742yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type); 752var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x), let.Expression, bodyFactory, diagnostics.AccumulatesDependencies); 803field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true); 807ImmutableArray.Create( 815return MakeConstruction(node, anonymousType, ImmutableArray.Create(field1Value, field2Value), diagnostics); 828return MakeQueryUnboundLambda(qvm, ImmutableArray.Create(parameter), expression, withDependencies); 844return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, ImmutableArray.Create(parameter), (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) => 880return MakeQueryInvocation(node, receiver, methodName, default(SeparatedSyntaxList<TypeSyntax>), default(ImmutableArray<TypeWithAnnotations>), ImmutableArray.Create(arg), diagnostics 906return MakeQueryInvocation(node, receiver, methodName, new SeparatedSyntaxList<TypeSyntax>(new SyntaxNodeOrTokenList(typeArgSyntax, 0)), ImmutableArray.Create(typeArg), ImmutableArray<BoundExpression>.Empty, diagnostics 975receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType()); 997receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Statements.cs (4)
520return new BoundBadStatement(node, ImmutableArray.Create<BoundNode>(expression), true); 539childNodes = ImmutableArray.Create<BoundNode>(value); 3532return new BoundBlock(node, locals, ImmutableArray.Create(statement)) { WasCompilerGenerated = node.Kind() != SyntaxKind.ArrowExpressionClause }; 4004arguments: ImmutableArray.Create(argument),
Binder\Binder_Symbols.cs (2)
1309ImmutableArray.Create<Symbol>(lookupResultSymbol), 1469receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated();
Binder\DecisionDagBuilder.cs (1)
1775/// intermediary allocations for <see cref="ImmutableArray"/>s.
Binder\ForEachLoopBinder.cs (3)
94return ImmutableArray.Create<LocalSymbol>(iterationVariable); 726ImmutableArray.Create(collectionExpr), 843spanType = spanType.Construct(ImmutableArray.Create(elementField.TypeWithAnnotations));
Binder\ForLoopBinder.cs (1)
120increment = new BoundBlock(increment.Syntax, locals, ImmutableArray.Create(increment))
Binder\Semantics\Conversions\Conversion.cs (9)
330internal static ImmutableArray<Conversion> IdentityUnderlying = ImmutableArray.Create(Identity); 331internal static ImmutableArray<Conversion> ImplicitConstantUnderlying = ImmutableArray.Create(ImplicitConstant); 332internal static ImmutableArray<Conversion> ImplicitNumericUnderlying = ImmutableArray.Create(ImplicitNumeric); 333internal static ImmutableArray<Conversion> ExplicitNumericUnderlying = ImmutableArray.Create(ExplicitNumeric); 334internal static ImmutableArray<Conversion> ExplicitEnumerationUnderlying = ImmutableArray.Create(ExplicitEnumeration); 335internal static ImmutableArray<Conversion> PointerToIntegerUnderlying = ImmutableArray.Create(PointerToInteger); 340return new Conversion(ConversionKind.StackAllocToPointerType, ImmutableArray.Create(underlyingConversion)); 345return new Conversion(ConversionKind.StackAllocToSpanType, ImmutableArray.Create(underlyingConversion)); 360_ => new Conversion(kind, ImmutableArray.Create(nestedConversion)),
Binder\Semantics\Conversions\ConversionsBase.cs (7)
1150HasIdentityConversionInternal(((NamedTypeSymbol)destination.OriginalDefinition).Construct(ImmutableArray.Create(elementType)), destination)) 1176return new Conversion(ConversionKind.ImplicitNullable, ImmutableArray.Create(underlyingConversion)); 1228return Conversion.MakeConditionalExpression(ImmutableArray.Create(trueConversion, falseConversion)); 1312return new Conversion(ConversionKind.ImplicitNullable, ImmutableArray.Create(underlyingTupleConversion)); 1341return new Conversion(ConversionKind.ExplicitNullable, ImmutableArray.Create(underlyingTupleConversion)); 2275return new Conversion(ConversionKind.ImplicitNullable, ImmutableArray.Create(tupleConversion)); 2472return new Conversion(ConversionKind.ExplicitNullable, ImmutableArray.Create(tupleConversion));
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
4503return MemberAnalysisResult.BadArgumentConversions(argsToParameters, MemberAnalysisResult.CreateBadArgumentsWithPosition(argumentPosition), ImmutableArray.Create(conversion),
Binder\SwitchBinder.cs (2)
446return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ?? CreateErrorType()); 547childBoundNodes: gotoCaseExpressionOpt != null ? ImmutableArray.Create<BoundNode>(gotoCaseExpressionOpt) : ImmutableArray<BoundNode>.Empty,
BoundTree\Constructors.cs (4)
175return Synthesized(syntax, receiverOpt, initialBindingReceiverIsSubjectToCloning: initialBindingReceiverIsSubjectToCloning, method, ImmutableArray.Create(arg0)); 180return Synthesized(syntax, receiverOpt, initialBindingReceiverIsSubjectToCloning: initialBindingReceiverIsSubjectToCloning, method, ImmutableArray.Create(arg0, arg1)); 254: this(syntax, constructor, ImmutableArray.Create<BoundExpression>(arguments), default(ImmutableArray<string?>), default(ImmutableArray<RefKind>), false, default(ImmutableArray<int>), default(BitVector), null, null, constructor.ContainingType) 662return new BoundBlock(syntax, ImmutableArray<LocalSymbol>.Empty, ImmutableArray.Create(statement))
BoundTree\Expression.cs (13)
44protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Left, this.Right); 81protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Value); 91protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Argument); 96protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Expression, this.Index); 101protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Operand); 106protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Receiver); 111protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Operand); 116protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Operand); 126protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Expression); 154protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Expression); 159protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.ReceiverOpt); 175protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Expression); 180protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Receiver, Argument);
BoundTree\Statement.cs (2)
30protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Declarations, this.Body); 35protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Operand);
BoundTree\UnboundLambda.cs (1)
335return TypeWithAnnotations.Create(taskTypeT.Construct(ImmutableArray.Create(bestResultType)));
CommandLine\CSharpCommandLineParser.cs (1)
1955var aliases = (alias != null) ? ImmutableArray.Create(alias) : ImmutableArray<string>.Empty;
Compilation\BuiltInOperators.cs (2)
322ImmutableArray.Create<BinaryOperatorSignature>(GetSignature(BinaryOperatorKind.LogicalBoolAnd)), //and 324ImmutableArray.Create<BinaryOperatorSignature>(GetSignature(BinaryOperatorKind.LogicalBoolOr)), //or
Compilation\CSharpSemanticModel.cs (4)
298crefSymbols = ImmutableArray.Create<Symbol>(binder.BindType(expression, BindingDiagnosticBag.Discarded).Type); 5183? ImmutableArray.Create<ISymbol>(namedType) 5184: ImmutableArray.Create<ISymbol>(namedType, primaryConstructor.GetPublicSymbol()); 5189? ImmutableArray.Create(symbol)
Compilation\MemberSemanticModel.cs (1)
825return ImmutableArray.Create<ISymbol>();
Compilation\SyntaxTreeSemanticModel.cs (1)
238result = new SymbolInfo(ImmutableArray.Create<ISymbol>(info.Symbol), CandidateReason.NotATypeOrNamespace);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
149F.CloseMethod(F.Block(ImmutableArray.Create<LocalSymbol>(boundLocal.LocalSymbol), assignment, retStatement));
Compiler\MethodBodySynthesizer.cs (11)
106ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.Create(slotIndex), intType) { WasCompilerGenerated = true }), 126ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.Create(0), intType) { WasCompilerGenerated = true }), 154ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.Create(targetSubmissionIndex), intType) { WasCompilerGenerated = true }), 402arguments: ImmutableArray.Create<BoundExpression>(boundBackingField, boundParameter)), 416statements: ImmutableArray.Create<BoundStatement>( 421compareExchangeMethod = compareExchangeMethod.Construct(ImmutableArray.Create<TypeSymbol>(delegateType)); 467arguments: ImmutableArray.Create<BoundExpression>(boundTmps[1], boundParameter)), 485arguments: ImmutableArray.Create<BoundExpression>(boundBackingField, boundTmps[2], boundTmps[1])); 517statements: ImmutableArray.Create<BoundStatement>( 566ImmutableArray.Create<BoundStatement>( 574ImmutableArray.Create<BoundStatement>(
Compiler\MethodBodySynthesizer.Lowered.cs (2)
83ImmutableArray.Create<LocalSymbol>(hashCode, i), 175ImmutableArray.Create<LocalSymbol>(hashCode, i),
Compiler\MethodCompiler.cs (5)
1478return new BoundBadStatement(body.Syntax, ImmutableArray.Create<BoundNode>(body), hasErrors: true); 1860body = new BoundBlock(constructor.Syntax, constructor.Locals, ImmutableArray.Create<BoundStatement>(constructor.Initializer)); 1864body = new BoundBlock(constructor.Syntax, constructor.Locals, ImmutableArray.Create<BoundStatement>(constructor.Initializer, body)); 1955statements = ImmutableArray.Create(constructorInitializer); 1959statements = ImmutableArray.Create(constructorInitializer, body);
CSharpExtensions.cs (4)
949return ImmutableArray.Create<ISymbol>(); 962return ImmutableArray.Create<ISymbol>(); 975return ImmutableArray.Create<ISymbol>(); 991return ImmutableArray.Create<IPropertySymbol>();
Declarations\DeclarationTreeBuilder.cs (2)
354children: ImmutableArray.Create(decl), 518children = ImmutableArray.Create<SingleNamespaceOrTypeDeclaration>(ns);
Declarations\MergedNamespaceDeclaration.cs (2)
35return new MergedNamespaceDeclaration(ImmutableArray.Create(declaration)); 63return ImmutableArray.Create<Location>(_declarations[0].NameLocation);
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
189return ImmutableArray.Create(result);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (2)
259return ImmutableArray.CreateRange(PreviousGeneration.SynthesizedTypes.AnonymousTypes.Keys); 264return ImmutableArray.CreateRange(PreviousGeneration.SynthesizedTypes.AnonymousDelegates.Keys);
Emitter\Model\PEModuleBuilder.cs (4)
1583ImmutableArray.Create(new TypedConstant(byteArrayType, value))); 1602ImmutableArray.Create(new TypedConstant(byteType, TypedConstantKind.Primitive, nullableValue))); 1622ImmutableArray.Create(new TypedConstant(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value))); 1666var arguments = ImmutableArray.Create(new TypedConstant(boolArray, transformFlags));
Emitter\Model\TypeParameterSymbolAdapter.cs (1)
251yield return new Cci.TypeReferenceWithAttributes(new Cci.ModifiedTypeReference(typeRef, ImmutableArray.Create<Cci.ICustomModifier>(modifier)));
Emitter\NoPia\EmbeddedType.cs (1)
280ImmutableArray.Create(new TypedConstant(stringType, TypedConstantKind.Primitive, guidString),
Emitter\NoPia\EmbeddedTypesManager.cs (2)
139ImmutableArray.Create<TypedConstant>(constructorArguments[0], constructorArguments[0]), 148ImmutableArray.Create(new TypedConstant(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
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()));
FlowAnalysis\NullableWalker.cs (6)
269private static readonly ImmutableArray<BoundKind> s_skippedExpressions = ImmutableArray.Create(BoundKind.ArrayInitialization, 4734return namedType.OriginalDefinition.Construct(ImmutableArray.Create(elementType)); 4889type = TypeWithAnnotations.Create(((NamedTypeSymbol)node.Type).OriginalDefinition.Construct(ImmutableArray.Create(type))); 6427var constructedType = wellKnownType.Construct(ImmutableArray.Create(parameterType)); 9605return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(underlying)); 11062getEnumeratorType = spanType.Construct(ImmutableArray.Create(convertedResult.Type!.TryGetInlineArrayElementField()!.TypeWithAnnotations));
FlowAnalysis\NullableWalker.Variables.cs (1)
210ImmutableArray.CreateRange(_variableSlot),
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (6)
199ImmutableArray.Create(catchAll), 414ImmutableArray.Create<LocalSymbol>(obj), 442ImmutableArray.Create(ex), 499ImmutableArray.Create<LocalSymbol>( 582ImmutableArray.Create(catchTemp), 628ImmutableArray.Create(catchTemp),
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (7)
235ImmutableArray.Create(exceptionLocal), 260? ImmutableArray.Create<BoundExpression>(F.Local(_exprRetValue)) 577ImmutableArray.Create(notifyCompletionTemp), 643ImmutableArray.Create(thisTemp), 644ImmutableArray.Create<BoundExpression>(F.AssignmentExpression(F.Local(thisTemp), F.This())), 653return (secondOpt == null) ? ImmutableArray.Create(first) : ImmutableArray.Create(first, secondOpt);
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (3)
354ImmutableArray.Create(instSymbol, versionSymbol), 397ImmutableArray.Create<BoundExpression>(instLocal))); 459ImmutableArray.Create(instSymbol),
Lowering\AsyncRewriter\AsyncRewriter.cs (3)
95return new BoundBadStatement(bodyWithAwaitLifted.Syntax, ImmutableArray.Create<BoundNode>(bodyWithAwaitLifted), hasErrors: true); 198F.CloseMethod(F.Block(ImmutableArray.Create(F.BaseInitialization(), F.Return()))); 265ImmutableArray.Create<BoundExpression>(F.Local(stateMachineVariable)))));
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
394DeclareLocals(_currentScope, ImmutableArray.Create<Symbol>(thisParam));
Lowering\ClosureConversion\ClosureConversion.cs (7)
662var frameTypeParameters = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, frame.Arity); 1025var realTypeArguments = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, totalTypeArgumentCount - originalMethod.Arity); 1033var containerTypeArguments = ImmutableArray.Create(realTypeArguments, 0, containerAsFrame.Arity); 1034realTypeArguments = ImmutableArray.Create(realTypeArguments, containerAsFrame.Arity, realTypeArguments.Length - containerAsFrame.Arity); 1124sideEffects: ImmutableArray.Create<BoundExpression>(rewritten), 1248ImmutableArray.Create<LocalSymbol>(), 1731return new BoundBadExpression(F.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (9)
351return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 382return new BoundBadExpression(node.Syntax, 0, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 856ImmutableArray.Create<TypeSymbol>(underlyingDelegateType), 900ImmutableArray.Create(param), 901ImmutableArray.Create<BoundExpression>(_bound.AssignmentExpression(parameterReference, parameter)), 905_bound.ArrayOrEmpty(ParameterExpressionType, ImmutableArray.Create<BoundExpression>(parameterReference)))); 1091return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1098return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1130return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
110typeArguments = ImmutableArray.Create(typeArguments, 0, lambdaFrame.Arity);
Lowering\InitializerRewriter.cs (1)
112boundStatement = new BoundBlock(syntax, fieldInit.Locals, ImmutableArray.Create(boundStatement)) { WasCompilerGenerated = fieldInit.WasCompilerGenerated };
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
266ImmutableArray.Create(_methodBodyFactory.MethodDefIndex(_method)))); 274ImmutableArray.Create(_methodBodyFactory.MethodDefIndex(_method)));
Lowering\Instrumentation\DebugInfoInjector.cs (2)
126return block.Update(block.Locals, block.LocalFunctions, block.HasUnsafeModifier, block.Instrumentation, ImmutableArray.Create(InstrumentFieldOrPropertyInitializer(block.Statements.Single(), syntax))); 299ImmutableArray.Create<BoundStatement>(foreachKeywordSequencePoint,
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (2)
192ImmutableArray.Create(local), 193ImmutableArray.Create<BoundExpression>(factory.AssignmentExpression(factory.Local(local), condition)),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (7)
445return ImmutableArray.Create(_factory.Sequence(new[] { value }, refAssignmentSourceIndex), index); 459return ImmutableArray.Create(addressOf, _factory.Sizeof(targetType), index); 479return ImmutableArray.Create(toString, index); 482return ImmutableArray.Create(_factory.Convert(parameter.Type, value), index); 539ImmutableArray.Create<BoundStatement>(logCallStatement, rewrittenFilterPrologue) : 540ImmutableArray.Create<BoundStatement>(logCallStatement)); 603return _factory.Sequence(ImmutableArray.Create(temp.LocalSymbol), builder.ToImmutableAndFree(), temp);
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
27_parameters = ImmutableArray.Create<ParameterSymbol>(
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (5)
113ImmutableArray.Create(cachedState) : 114ImmutableArray.Create(cachedState, cachedThis), 177ImmutableArray.Create<LocalSymbol>(stateLocal), 205ImmutableArray.Create<LocalSymbol>(_methodValue), 411ImmutableArray.Create(this.cachedThis) :
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
218var IEnumeratorOfElementType = F.SpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(ImmutableArray.Create(_elementType));
Lowering\LocalRewriter\LocalRewriter.cs (8)
173return new BoundBadStatement(statement.Syntax, ImmutableArray.Create<BoundNode>(statement), hasErrors: true); 578return BadExpression(node.Syntax, node.Type, ImmutableArray.Create(node)); 583return BadExpression(syntax, resultType, ImmutableArray.Create(child)); 588return BadExpression(syntax, resultType, ImmutableArray.Create(child1, child2)); 720return block.Update(locals, block.LocalFunctions, block.HasUnsafeModifier, block.Instrumentation, ImmutableArray.Create(statement)); 732ImmutableArray.Create(statement)); 849.Construct(ImmutableArray.Create(elementType)), 850ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
74sideEffects: ImmutableArray.Create<BoundExpression>(rewrittenOperand),
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
345ImmutableArray.Create(setterCall),
Lowering\LocalRewriter\LocalRewriter_Await.cs (2)
52locals: ImmutableArray.Create<LocalSymbol>(tempAccess.LocalSymbol), 53sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment),
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (17)
107locals: ImmutableArray.Create(boundTemp.LocalSymbol), 108sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 705return _factory.Sequence(ImmutableArray.Create(temp.LocalSymbol), ImmutableArray.Create<BoundExpression>(tempAssignment), result); 853sideEffects: ImmutableArray.Create<BoundExpression>(nonNull), 1098locals: ImmutableArray.Create<LocalSymbol>(boundTempX.LocalSymbol, boundTempY.LocalSymbol), 1099sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignmentX, tempAssignmentY), 1287locals: ImmutableArray.Create<LocalSymbol>(boundTempX.LocalSymbol, boundTempY.LocalSymbol), 1288sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignmentX, tempAssignmentY), 1397sideEffects: ImmutableArray.Create<BoundExpression>(sideEffect), 1734locals: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol), 1735sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 1795locals: ImmutableArray.Create<LocalSymbol>(boundTempX.LocalSymbol, boundTempY.LocalSymbol), 1796sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignmentX, tempAssignmentY), 1883locals: ImmutableArray.Create<LocalSymbol>(boundTempX.LocalSymbol, boundTempY.LocalSymbol), 1884sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignmentX, tempAssignmentY), 1965sideEffects: ImmutableArray.Create<BoundExpression>(nonNullValue),
Lowering\LocalRewriter\LocalRewriter_Call.cs (6)
808extraRefInitialization is object ? ImmutableArray.Create<BoundExpression>(extraRefInitialization, assignmentToTemp) : ImmutableArray.Create<BoundExpression>(assignmentToTemp), 884visitedArgumentsBuilder[argIndex] = _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, ImmutableArray.Create<BoundExpression>(store), local); 1408ImmutableArray.Create<BoundExpression>( 1434arrayEmpty = arrayEmpty.Construct(ImmutableArray.Create(elementType)); 1644sideEffects: ImmutableArray.Create<BoundExpression>(boundAssignmentToTemp),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (15)
243return _factory.StaticCall(asImmutableArray.Construct(ImmutableArray.Create(elementType)), ImmutableArray.Create(arrayCreation)); 378ImmutableArray.Create(temp.LocalSymbol), 425var typeArgs = ImmutableArray.Create(elementType); 498arguments: ImmutableArray.Create(span), 571var inlineArrayType = _factory.ModuleBuilderOpt.EnsureInlineArrayTypeExists(syntax, _factory, arrayLength, _diagnostics.DiagnosticBag).Construct(ImmutableArray.Create(elementType)); 576Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType)); 605inlineArrayAsSpan = inlineArrayAsSpan.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType)); 748ImmutableArray.Create<BoundExpression>( 774ImmutableArray.Create(GetKnownLengthExpression(elements, numberIncludingLastSpread, localsBuilder)), 1025var typeArguments = ImmutableArray.Create(elementType); 1071rewrittenReceiver = _factory.New(constructor, ImmutableArray.Create<BoundExpression>(knownLengthTemp)); 1076rewrittenReceiver = _factory.New(constructor, ImmutableArray.Create(knownLengthExpression)); 1348var iterationVariables = ImmutableArray.Create(iterationVariable); 1421ImmutableArray.Create(statement),
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (8)
160ImmutableArray.Create<BoundExpression>(_factory.Literal(builder.Count)), 1197locals: ImmutableArray.Create(boundTemp.LocalSymbol), 1198sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 1473locals: ImmutableArray.Create(boundTemp.LocalSymbol), 1474sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 1530rewrittenArguments: ImmutableArray.Create(rewrittenOperand)); 1782var result = UserDefinedConversionResult.Valid(ImmutableArray.Create<UserDefinedConversionAnalysis>(analysis), 0); 1882var result = UserDefinedConversionResult.Valid(ImmutableArray.Create<UserDefinedConversionAnalysis>(analysis), 0);
Lowering\LocalRewriter\LocalRewriter_DoStatement.cs (1)
69ImmutableArray.Create<BoundStatement>(rewrittenBody,
Lowering\LocalRewriter\LocalRewriter_Event.cs (10)
54var rewrittenArguments = ImmutableArray.Create<BoundExpression>(rewrittenArgument); 124rewrittenArguments: ImmutableArray.Create<BoundExpression>(removeDelegate)); 128clearCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(removeDelegate), ErrorTypeSymbol.UnknownResultType); 137marshalArguments = ImmutableArray.Create<BoundExpression>(removeDelegate, rewrittenArgument); 152marshalArguments = ImmutableArray.Create<BoundExpression>(addDelegate, removeDelegate, rewrittenArgument); 181: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol); 265getOrCreateCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(fieldAccess), ErrorTypeSymbol.UnknownResultType); 287return new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(getOrCreateCall), ErrorTypeSymbol.UnknownResultType); 333return new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(node.Event), 334ImmutableArray.Create(rewrittenReceiver, rewrittenArgument), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (4)
380sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 401locals: ImmutableArray.Create(nullableBoundTemp.LocalSymbol), 402sideEffects: ImmutableArray.Create<BoundExpression>(nullableTempAssignment), 544lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (22)
260tryBlock: new BoundBlock(forEachSyntax, locals: ImmutableArray<LocalSymbol>.Empty, statements: ImmutableArray.Create(whileLoop)), 269locals: ImmutableArray.Create(enumeratorVar), 270statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, tryFinally)); 281locals: ImmutableArray.Create(enumeratorVar), 282statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, whileLoop)); 412statements: ImmutableArray.Create(alwaysOrMaybeDisposeStmt)); 466locals: ImmutableArray.Create(disposableVar), 467statements: ImmutableArray.Create(disposableVarDecl, ifStmt)); 630arrayVarDecl = new BoundStatementList(arrayVarDecl.Syntax, ImmutableArray.Create(collectionVarInitializationPreamble, arrayVarDecl)).MakeCompilerGenerated(); 660statements: ImmutableArray.Create<BoundStatement>(arrayVarDecl, positionVarDecl)); 693outerLocals: preambleLocal is null ? ImmutableArray.Create<LocalSymbol>(collectionTemp, positionVar) : ImmutableArray.Create<LocalSymbol>(preambleLocal, collectionTemp, positionVar), 855statements: ImmutableArray.Create(iteratorVariableInitialization, rewrittenBody)); 944indices: ImmutableArray.Create<BoundExpression>(boundPositionVar), 953statements: ImmutableArray.Create<BoundStatement>(arrayVarDecl, positionVarDecl)); 989outerLocals: ImmutableArray.Create<LocalSymbol>(arrayVar, positionVar), 1096ImmutableArray<BoundExpression> dimensionArgument = ImmutableArray.Create( 1123indices: ImmutableArray.Create((BoundExpression[])boundPositionVar), 1150ImmutableArray<BoundExpression> dimensionArgument = ImmutableArray.Create( 1197outerLocals: ImmutableArray.Create(positionVar[dimension]), 1211ImmutableArray.Create(arrayVar).Concat(upperVar.AsImmutableOrNull()), 1212ImmutableArray.Create(arrayVarDecl).Concat(upperVarDecl.AsImmutableOrNull()).Add(forLoop));
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (3)
297result = _factory.Sequence(ImmutableArray.Create(((BoundLocal)rewrittenReceiver).LocalSymbol), 298ImmutableArray.Create((BoundExpression)receiverStore), 512!CodeGenerator.IsSafeToDereferenceReceiverRefAfterEvaluatingArguments(ImmutableArray.Create(makeOffsetInput))))
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (1)
92sideEffects: ImmutableArray.Create<BoundExpression>(loweredOperand),
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (9)
80locals: ImmutableArray.Create(boundTemp.LocalSymbol), 81statements: ImmutableArray.Create(expressionStatement, tryFinally)); 117exitCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType); 170ImmutableArray.Create(boundLockTemp.LocalSymbol, boundLockTakenTemp.LocalSymbol), 171ImmutableArray.Create( 176BoundBlock.SynthesizedNoLocals(lockSyntax, ImmutableArray.Create<BoundStatement>( 212enterCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType); 221ImmutableArray.Create(boundLockTemp.LocalSymbol), 222ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (1)
129var alternative = _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, ImmutableArray.Create(tmpAssignment, transformedLhsAssignment), tmp);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
184locals: ImmutableArray.Create(boundTemp.LocalSymbol), 185sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment),
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (2)
291locals = ImmutableArray.Create(value.LocalSymbol); 341method = method.Construct(ImmutableArray.Create<TypeSymbol>(typeParameter));
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
428rewrittenAccess = getSubArrayCall.Update(ImmutableArray.Create(getSubArrayCall.Arguments[0], rangeTemp));
Lowering\LocalRewriter\LocalRewriter_Range.cs (3)
175return F.New(constructionMethod, ImmutableArray.Create(left, right)); 187return F.StaticCall(constructionMethod, ImmutableArray.Create(arg)); 205ImmutableArray.Create<BoundExpression>(F.Literal(0), F.Literal(fromEnd)));
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (5)
211arguments = ImmutableArray.Create(boundCoalesce.LeftOperand); 389return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, ImmutableArray.Create(loweredFirst, loweredSecond, loweredThird)); 402return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, ImmutableArray.Create(loweredFirst, loweredSecond, loweredThird, loweredFourth)); 729ImmutableArray.Create(temp.LocalSymbol), 730ImmutableArray.Create<BoundExpression>(store),
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
133return new InterpolationHandlerResult(ImmutableArray.Create(_factory.ExpressionStatement(handlerConstructionAssignment), resultIf), builderTemp, appendShouldProceedLocal.LocalSymbol, this); 286? ImmutableArray.Create(HandlerTemp.LocalSymbol, _outTemp) 287: ImmutableArray.Create(HandlerTemp.LocalSymbol);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (2)
54ImmutableArray<BoundExpression> smallestCtorArguments = ImmutableArray.Create(rewrittenArguments, 88ImmutableArray<BoundExpression> ctorArguments = ImmutableArray.Create(rewrittenArguments,
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (6)
236locals: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol), 237sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment), 516ImmutableArray<BoundExpression> assignments = ImmutableArray.Create<BoundExpression>( 550ImmutableArray.Create<BoundExpression>(tempAssignment), 712locals: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol), 713sideEffects: ImmutableArray.Create<BoundExpression>(tempAssignment),
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (5)
83ImmutableArray.Create<BoundStatement>(result)); 196statements: ImmutableArray.Create<BoundStatement>(expressionStatement, tryFinally)); 258locals: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol), //localSymbol will be declared by an enclosing block 259statements: ImmutableArray.Create<BoundStatement>( 463disposeCall = new BoundBadExpression(resourceSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(disposedExpression), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (1)
150ImmutableArray.Create(
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
75return new BoundSequence(_factory.Syntax, _temps, ImmutableArray.Create(SiteInitialization), SiteInvocation, _resultType) { WasCompilerGenerated = true };
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
97var loweredArguments = ImmutableArray.Create(loweredOperand); 129var loweredArguments = ImmutableArray.Create(loweredOperand); 172var loweredArguments = ImmutableArray.Create<BoundExpression>(loweredLeft, loweredRight);
Lowering\MethodToClassRewriter.cs (2)
536ImmutableArray.Create<LocalSymbol>(tempLocal.LocalSymbol), 537ImmutableArray.Create<BoundExpression>(tempAssignment),
Lowering\SpillSequenceSpiller.cs (4)
442return call.Update(ImmutableArray.Create(Spill(builder, call.Arguments[0], call.ArgumentRefKindsOpt[0]))); 455ImmutableArray.Create(Spill(builder, call.Arguments[0]))); 469ImmutableArray.Create(Spill(builder, call.Arguments[0]), Spill(builder, call.Arguments[1]))); 523return call.Update(ImmutableArray.Create(Spill(builder, call.Arguments[0], call.ArgumentRefKindsOpt[0]),
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
560return F.Sequence(ImmutableArray.Create(sacrificialTemp), sideEffects.ToImmutableAndFree(), F.AssignmentExpression(F.Local(sacrificialTemp), replacement, isRef: true));
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
302ImmutableArray.Create(stateMachineVariable), 505F.CloseMethod(F.Block(ImmutableArray.Create(resultVariable), bodyBuilder.ToImmutableAndFree()));
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
101get { return ImmutableArray.Create(ImplementedProperty); }
Lowering\SyntheticBoundNodeFactory.cs (16)
455return Block(ImmutableArray.Create(statements)); 460return Block(locals, ImmutableArray.Create(statements)); 470return Block(locals, localFunctions, ImmutableArray.Create(statements)); 495return new BoundStatementList(Syntax, ImmutableArray.Create(first, second)) { WasCompilerGenerated = true }; 831return Call(receiver, method, ImmutableArray.Create(arg0), useStrictArgumentRefKinds); 836return Call(receiver, method, ImmutableArray.Create(arg0, arg1), useStrictArgumentRefKinds); 841return Call(receiver, method, ImmutableArray.Create<BoundExpression>(args)); 845=> Call(receiver, WellKnownMethod(method), ImmutableArray.Create(arg0)); 987return MakeSequence(ImmutableArray.Create<LocalSymbol>(temp), parts); 1055=> SwitchSection(ImmutableArray.Create(value), statements); 1058=> new(values, ImmutableArray.Create(statements)); 1538arrayEmpty = arrayEmpty.Construct(ImmutableArray.Create(elementType)); 1550ImmutableArray.Create<BoundExpression>(Literal(elements.Length)), 1559ImmutableArray.Create<BoundExpression>(length), 1595return new BoundCatchBlock(Syntax, ImmutableArray.Create(local), source, source.Type, exceptionFilterPrologueOpt: null, exceptionFilterOpt: null, body: block, isSynthesizedAsyncCatchAll: false); 1845sideEffects: ImmutableArray.Create<BoundExpression>(nonNullValue),
Operations\CSharpOperationFactory.cs (7)
402return ImmutableArray.Create(CreateVariableDeclaratorInternal((BoundLocalDeclaration)declaration, (declarationSyntax as VariableDeclarationSyntax)?.Variables[0] ?? declarationSyntax)); 1645return new ArrayElementReferenceOperation(instance, ImmutableArray.Create(argument), _semanticModel, syntax, type, isImplicit); 1726ImmutableArray<IFieldSymbol> initializedFields = ImmutableArray.Create<IFieldSymbol>(boundFieldEqualsValue.Field.GetPublicSymbol()); 1735ImmutableArray<IPropertySymbol> initializedProperties = ImmutableArray.Create<IPropertySymbol>(boundPropertyEqualsValue.Property.GetPublicSymbol()); 2147return new VariableDeclarationGroupOperation(ImmutableArray.Create(multiVariableDeclaration), _semanticModel, varStatement, isImplicit); 2169var variableDeclaration = new VariableDeclarationGroupOperation(ImmutableArray.Create(multiVariableDeclaration), _semanticModel, declarationGroupSyntax, isImplicit); 2884propertySubpatterns: ImmutableArray.Create(result), declaredSymbol: null,
Operations\CSharpOperationFactory_Methods.cs (1)
30return ImmutableArray.Create(statement);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
370executableCodeBlocks: ImmutableArray.Create<SyntaxNode>(expressionBody),
Symbols\AbstractTypeMap.cs (2)
201interfaces = ImmutableArray.Create<NamedTypeSymbol>(SubstituteNamedType(interfaces[0])); 206interfaces = ImmutableArray.Create<NamedTypeSymbol>(SubstituteNamedType(interfaces[0]), SubstituteNamedType(interfaces[1]));
Symbols\AliasSymbol.cs (3)
75return new AliasSymbolFromResolvedTarget(targetSymbol, aliasToken.ValueText, containingSymbol, ImmutableArray.Create(aliasToken.GetLocation()), isExtern); 286: base(syntax.Alias!.Name.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Alias!.Name.Identifier.GetLocation()), isExtern: false) 294: base(syntax.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Identifier.GetLocation()), isExtern: true)
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
173get { return ImmutableArray.Create<Location>(this.TypeDescriptor.Location); }
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
68return ImmutableArray.Create<Symbol>(constructor, invokeMethod);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
216=> ImmutableArray.Create<Symbol>(constructor, invokeMethod);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (1)
24_parameters = ImmutableArray.Create<ParameterSymbol>(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
154ImmutableArray.Create(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
35this(container, field, field.TypeWithAnnotations, index, ImmutableArray.Create<Location>(field.Location), includeBackingField: false)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (3)
87this.SpecialMembers = ImmutableArray.Create<MethodSymbol>( 220arguments: ImmutableArray.Create(new TypedConstant(Manager.System_String, TypedConstantKind.Primitive, displayString)), 221namedArguments: ImmutableArray.Create(new KeyValuePair<WellKnownMember, TypedConstant>(
Symbols\ArrayTypeSymbol.cs (2)
115constructedInterfaces.Add(new ConstructedNamedTypeSymbol(iListOfT, ImmutableArray.Create(elementTypeWithAnnotations))); 122constructedInterfaces.Add(new ConstructedNamedTypeSymbol(iReadOnlyListOfT, ImmutableArray.Create(elementTypeWithAnnotations)));
Symbols\Attributes\PEAttributeData.cs (2)
114ImmutableArray.Create<TypedConstant>(lazyConstructorArguments)); 117ImmutableArray.Create<KeyValuePair<string, TypedConstant>>(lazyNamedArguments));
Symbols\Compilation_WellKnownMembers.cs (8)
470ImmutableArray.Create( 485ImmutableArray.Create(ticks)); 496ImmutableArray.Create(new TypedConstant( 767ImmutableArray.Create(typedConstantDebugMode)); 790var arguments = ImmutableArray.Create(new TypedConstant(boolArray, transformFlags)); 807var args = ImmutableArray.Create(new TypedConstant(stringArray, names)); 815var arguments = ImmutableArray.Create( 817var namedArguments = ImmutableArray.Create(
Symbols\ExtendedErrorTypeSymbol.cs (1)
70: this(containingSymbol, ImmutableArray.Create<Symbol>(guessSymbol), resultKind, errorInfo, GetArity(guessSymbol), unreported)
Symbols\FieldSymbol.cs (1)
495Symbol found = CSharpCompilation.GetRuntimeMember(ImmutableArray.Create<Symbol>(this), descriptor, CSharpCompilation.SpecialMembersSignatureComparer.Instance,
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
514=> GetCustomModifierForRefKind(refKind, compilation) is { } modifier ? ImmutableArray.Create(modifier) : ImmutableArray<CustomModifier>.Empty;
Symbols\MergedNamespaceSymbol.cs (3)
236return ImmutableArray.CreateRange<NamedTypeSymbol>(GetMembersUnordered().OfType<NamedTypeSymbol>()); 241return ImmutableArray.CreateRange<NamedTypeSymbol>(GetMembers().OfType<NamedTypeSymbol>()); 247return ImmutableArray.CreateRange<NamedTypeSymbol>(_cachedLookup[name].OfType<NamedTypeSymbol>());
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
852var builder = ImmutableArray.CreateBuilder<ParameterSymbol>(count); 945var ownedParams = ImmutableArray.CreateBuilder<TypeParameterSymbol>(gpHandles.Count);
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
154this.MetadataLocation = ImmutableArray.Create<MetadataLocation>(new MetadataLocation(this));
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
595return ImmutableArray.Create<NamedTypeSymbol>(new UnsupportedMetadataTypeSymbol(mrEx)); 871return ImmutableArray.CreateRange(names);
Symbols\Metadata\PE\PENamespaceSymbol.cs (1)
136return ImmutableArray.Create<Symbol>(ns);
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
173private static readonly ImmutableArray<int> s_defaultStringHandlerAttributeIndexes = ImmutableArray.Create(int.MinValue);
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
387return ImmutableArray.Create(_elementNames, start, numberOfElements);
Symbols\MethodSymbol.cs (3)
843return this.Construct(ImmutableArray.Create(typeArguments)); 1280ImmutableArray.Create( 1287ImmutableArray.Create(new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RequiredMembers)))
Symbols\MissingAssemblySymbol.cs (1)
80_lazyModules = ImmutableArray.Create<ModuleSymbol>(moduleSymbol);
Symbols\NamespaceSymbol.cs (1)
86return ImmutableArray.Create(this);
Symbols\NonMissingModuleSymbol.cs (1)
100var involvedAssemblies = ImmutableArray.Create<Symbol>(ownerAssembly, dependentAssembly);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
733overriddenMembers = ImmutableArray.Create<Symbol>(representativeMember);
Symbols\RangeVariableSymbol.cs (2)
49=> _location is null ? ImmutableArray<Location>.Empty : ImmutableArray.Create(_location); 66return ImmutableArray.Create(node.GetReference());
Symbols\Source\CrefTypeParameterSymbol.cs (2)
181return ImmutableArray.Create<Location>(_declaringSyntax.GetLocation()); 189return ImmutableArray.Create<SyntaxReference>(_declaringSyntax);
Symbols\Source\LambdaSymbol.cs (2)
223return ImmutableArray.Create<Location>(_syntax.Location); 250return ImmutableArray.Create<SyntaxReference>(syntaxReferenceOpt);
Symbols\Source\LocalFunctionSymbol.cs (3)
337public override ImmutableArray<Location> Locations => ImmutableArray.Create(Syntax.Identifier.GetLocation()); 459ImmutableArray.Create(location), 460ImmutableArray.Create(parameter.GetReference()));
Symbols\Source\ParameterHelpers.cs (2)
1007return ImmutableArray.Create(CSharpCustomModifier.CreateOptional(requiresLocationType)); 1018return ImmutableArray.Create(CSharpCustomModifier.CreateRequired(modifierType));
Symbols\Source\SourceAssemblySymbol.cs (6)
1838ImmutableArray.Create(typedConstantRequestMinimum), 1839ImmutableArray.Create(new KeyValuePair<WellKnownMember, TypedConstant>( 1976ImmutableArray.Create(typedConstantNoStringInterning))); 1996ImmutableArray.Create(new KeyValuePair<WellKnownMember, TypedConstant>( 2026AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyNameAttribute__ctor, ImmutableArray.Create(typedConstant))); 2036AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyFileAttribute__ctor, ImmutableArray.Create(typedConstant)));
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1282parameterOrdinals = ImmutableArray.Create(ordinal);
Symbols\Source\SourceCustomEventSymbol.cs (1)
170ImmutableArray.Create<EventSymbol>(explicitlyImplementedEvent);
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
219InitializeParameters(ImmutableArray.Create<ParameterSymbol>( 283_refCustomModifiers = ImmutableArray.Create(CSharpCustomModifier.CreateRequired(modifierType));
Symbols\Source\SourceEventAccessorSymbol.cs (2)
49_parameters = ImmutableArray.Create<ParameterSymbol>(new SynthesizedEventAccessorValueParameterSymbol(this, 0)); 64explicitInterfaceImplementations = (object)implementedAccessor == null ? ImmutableArray<MethodSymbol>.Empty : ImmutableArray.Create<MethodSymbol>(implementedAccessor);
Symbols\Source\SourceEventSymbol.cs (2)
118return ImmutableArray.Create(_location); 129return ImmutableArray.Create<SyntaxReference>(_syntaxRef);
Symbols\Source\SourceFieldSymbol.cs (3)
88return ImmutableArray.Create<CustomModifier>( 220=> ImmutableArray.Create(GetFirstLocation()); 226=> ImmutableArray.Create(_syntaxReference);
Symbols\Source\SourceFixedFieldSymbol.cs (4)
51ImmutableArray.Create<TypedConstant>(item1, item2))); 220return ImmutableArray.Create<Symbol>(_constructor, _internalField); 226(name == _constructor.Name) ? ImmutableArray.Create<Symbol>(_constructor) : 227(name == FixedElementFieldName) ? ImmutableArray.Create<Symbol>(_internalField) :
Symbols\Source\SourceLabelSymbol.cs (2)
83: ImmutableArray.Create<Location>(_identifierNodeOrToken.GetLocation()!); 103return node == null ? ImmutableArray<SyntaxReference>.Empty : ImmutableArray.Create<SyntaxReference>(node.GetReference());
Symbols\Source\SourceLocalSymbol.cs (2)
415=> ImmutableArray.Create(GetFirstLocation()); 461return ImmutableArray.Create(node.GetReference());
Symbols\Source\SourceMemberContainerSymbol.cs (6)
1609{ symbol.Name.AsMemory(), ImmutableArray.Create(symbol) }, 1635: ImmutableArray.Create((Symbol)pair.Value)); 3072return ImmutableArray.Create(InstanceInitializersForPositionalMembers.ToImmutableAndFree()); 4351ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol( 4400ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol( 4727ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
169implementingMemberAndDiagnostics = new SymbolAndDiagnostics(null, new ReadOnlyBindingDiagnostic<AssemblySymbol>(ImmutableArray.Create(diag), default)); 229var info = new CSDiagnosticInfo(ErrorCode.ERR_MixingWinRTEventWithRegular, args, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<Location>(this.GetFirstLocation()));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
473type = TypeWithAnnotations.Create(tokenTableType.Construct(ImmutableArray.Create(@event.TypeWithAnnotations)));
Symbols\Source\SourceMemberMethodSymbol.cs (4)
777=> ImmutableArray.Create(_location); 1051ImmutableArray.Create(arg))); 1057ImmutableArray.Create(arg))); 1063ImmutableArray.Create(arg)));
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
105return (this.syntaxReferenceOpt == null) ? ImmutableArray<SyntaxReference>.Empty : ImmutableArray.Create(this.syntaxReferenceOpt);
Symbols\Source\SourceModuleSymbol.cs (2)
641var version = ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, 11)); 647var includesInternals = ImmutableArray.Create(
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1692ImmutableArray.Create( 1699ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))), 1716ImmutableArray.Create(defaultMemberNameConstant))); 1748ImmutableArray.Create(new TypedConstant(compilation.GetWellKnownType(WellKnownType.System_Type), TypedConstantKind.Type, originalType)), 1879Conversions.HasIdentityConversion(((NamedTypeSymbol)returnTypeOriginalDefinition).Construct(ImmutableArray.Create(elementType)), returnType))
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
122_lazyRefCustomModifiers = ImmutableArray.Create(CSharpCustomModifier.CreateRequired(modifierType)); 133_lazyExplicitInterfaceImplementations = ImmutableArray.Create<MethodSymbol>(overriddenOrExplicitlyImplementedMethod);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
402return OneOrMany.Create(ImmutableArray.Create(AttributeDeclarationSyntaxList, this.SourcePartialImplementation.AttributeDeclarationSyntaxList)); 1147var syntaxRefs = ImmutableArray.Create(parameter.GetReference()); 1148var locations = ImmutableArray.Create(location);
Symbols\Source\SourceParameterSymbol.cs (1)
265=> _location is null ? ImmutableArray<Location>.Empty : ImmutableArray.Create(_location);
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
394var modifiers = ImmutableArray.Create<CustomModifier>( 623: ImmutableArray.Create<MethodSymbol>(implementedAccessor);
Symbols\Source\SourcePropertySymbolBase.cs (4)
272_lazyRefCustomModifiers = ImmutableArray.Create(CSharpCustomModifier.CreateRequired(modifierType)); 279ImmutableArray.Create(explicitlyImplementedProperty); 530return ImmutableArray.Create(Location); 538return ImmutableArray.Create(_syntaxRef);
Symbols\SymbolDistinguisher.cs (1)
137ImmutableInterlocked.InterlockedInitialize(ref _lazyDescriptions, ImmutableArray.Create(description0, description1));
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
14Parameters = ImmutableArray.Create(
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
14Parameters = ImmutableArray.Create(
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
38_interfaces = ImmutableArray.Create(
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
47public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray.Create(_interfaceProperty);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (4)
272TypeParameters = ImmutableArray.Create<TypeParameterSymbol>(typeParameter); 296? ImmutableArray.Create( 305: ImmutableArray.Create( 883? ImmutableArray.Create(_enumeratorType)
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
30Parameters: ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
24Parameters = ImmutableArray.Create(SynthesizedParameterSymbol.Create(
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
70Parameters: ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
38Parameters: ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (2)
33Parameters: ImmutableArray.Create<ParameterSymbol>( 72F.CloseMethod(F.Block(ImmutableArray.Create<BoundStatement>(F.Return(expression))));
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
95Parameters: ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
80F.CloseMethod(F.Block(ImmutableArray.Create(builderLocalSymbol), block.ToImmutableAndFree()));
Symbols\Synthesized\SynthesizedContainer.cs (2)
118return (object)constructor == null ? ImmutableArray<Symbol>.Empty : ImmutableArray.Create(constructor); 124return ((object)ctor != null && name == ctor.Name) ? ImmutableArray.Create<Symbol>(ctor) : ImmutableArray<Symbol>.Empty;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
20_parameters = ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
241_constructors = ImmutableArray.Create<MethodSymbol>(new SynthesizedEmbeddedAttributeConstructorSymbol(this, m => ImmutableArray<ParameterSymbol>.Empty));
Symbols\Synthesized\SynthesizedEmbeddedLifetimeAnnotationAttributeSymbol.cs (1)
21_constructors = ImmutableArray.Create<MethodSymbol>(
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (4)
37_fields = ImmutableArray.Create<FieldSymbol>( 46_constructors = ImmutableArray.Create<MethodSymbol>( 53m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, boolArrayType, 0, RefKind.None)), 82ImmutableArray.Create<BoundExpression>(factory.Literal(true))
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (5)
41_fields = ImmutableArray.Create<FieldSymbol>( 50_constructors = ImmutableArray.Create<MethodSymbol>( 53m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, annotatedByteType, 0, RefKind.None)), 57m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, byteArrayType, 0, RefKind.None)), 100ImmutableArray.Create<BoundExpression>(
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (3)
29_fields = ImmutableArray.Create<FieldSymbol>( 38_constructors = ImmutableArray.Create<MethodSymbol>( 41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemByteType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (3)
29_fields = ImmutableArray.Create<FieldSymbol>( 38_constructors = ImmutableArray.Create<MethodSymbol>( 41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemBooleanType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (3)
27_fields = ImmutableArray.Create<FieldSymbol>( 36_constructors = ImmutableArray.Create<MethodSymbol>( 39m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(int32Type), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (8)
403statements: ImmutableArray.Create<BoundStatement>( 426statements: ImmutableArray.Create<BoundStatement>( 502ImmutableArray.Create<LocalSymbol>(scriptLocal.LocalSymbol), 503ImmutableArray.Create<BoundStatement>( 540_parameters = ImmutableArray.Create(SynthesizedParameterSymbol.Create(this, 590ImmutableArray.Create<BoundExpression>(submissionArrayParameter), 619ImmutableArray.Create<LocalSymbol>(submissionLocal.LocalSymbol), 620ImmutableArray.Create<BoundStatement>(submissionAssignment, returnStatement))
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (1)
56ImmutableArray.Create<BoundStatement>(
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
42_explicitInterfaceImplementations = ImmutableArray.Create<MethodSymbol>(interfaceMethod);
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayElementRefMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer")));
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (2)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement"))); 17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer")));
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (3)
40_fields = ImmutableArray.Create<FieldSymbol>(field); 42TypeParameters = ImmutableArray.Create<TypeParameterSymbol>(typeParameter); 200arguments: ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, _arrayLength)),
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
44_parameters = ImmutableArray.Create<ParameterSymbol>(new SynthesizedOperatorParameterSymbol(this, leftType, 0, "left"), 53_parameters = ImmutableArray.Create<ParameterSymbol>(new SynthesizedOperatorParameterSymbol(this, container, 0, "value"));
Symbols\Synthesized\SynthesizedLocal.cs (2)
145get { return (_syntaxOpt == null) ? ImmutableArray<Location>.Empty : ImmutableArray.Create(_syntaxOpt.GetLocation()); } 150get { return (_syntaxOpt == null) ? ImmutableArray<SyntaxReference>.Empty : ImmutableArray.Create(_syntaxOpt.GetReference()); }
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
56_parameters = ImmutableArray.Create(SynthesizedParameterSymbol.Create(this,
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (2)
21this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s"))); 31this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s")));
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
28_parameters = ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (2)
19this.SetParameters(ImmutableArray.Create(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "unmatchedValue"))); 34var body = F.Throw(F.New(F.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_SwitchExpressionException__ctorObject), ImmutableArray.Create<BoundExpression>(F.Parameter(unmatchedValue))));
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
52_locations = location == null ? ImmutableArray<Location>.Empty : ImmutableArray.Create(location);
Symbols\Tuples\TupleTypeSymbol.cs (4)
61var locations = locationOpt is null ? ImmutableArray<Location>.Empty : ImmutableArray.Create(locationOpt); 240NamedTypeSymbol currentSymbol = firstTupleType.Construct(ImmutableArray.Create(elementTypes, (chainLength - 1) * (ValueTupleRestPosition - 1), remainder)); 244var chainedTypes = ImmutableArray.Create(elementTypes, (loop - 1) * (ValueTupleRestPosition - 1), ValueTupleRestPosition - 1).Add(TypeWithAnnotations.Create(currentSymbol)); 850return elementLocation == null ? ImmutableArray<Location>.Empty : ImmutableArray.Create(elementLocation);
Symbols\TypeSymbolExtensions.cs (1)
2011ImmutableArray.Create(type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0]),
Symbols\TypeUnification.cs (2)
216customModifiers: ImmutableArray.Create(t2.CustomModifiers, t1.CustomModifiers.Length, t2.CustomModifiers.Length - t1.CustomModifiers.Length))); 235customModifiers: ImmutableArray.Create(t1.CustomModifiers, t2.CustomModifiers.Length, t1.CustomModifiers.Length - t2.CustomModifiers.Length)));
Symbols\TypeWithAnnotations.cs (2)
223=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol))); 1203_compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(_underlying)) :
Utilities\ValueSetFactory.NumericValueSet.cs (1)
31internal NumericValueSet(T first, T last, INumericTC<T> tc) : this(ImmutableArray.Create((first, last)), tc)
Microsoft.CodeAnalysis.CSharp.CodeStyle (51)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
57var additionalLocations = ImmutableArray.Create(member.GetLocation());
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
62ImmutableArray.Create(declaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
65ImmutableArray.Create(declaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
81ImmutableArray.Create(methodDeclaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
230var allLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
58additionalLocations: ImmutableArray.Create(localFunction.GetLocation()),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
166additionalLocations: ImmutableArray.Create(additionalLocation),
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
65additionalLocations: ImmutableArray.Create(additionalLocation),
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
96additionalLocations: ImmutableArray.Create(initializer.GetLocation()),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
73var additionalLocations = ImmutableArray.Create(statement.GetLocation());
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
48ImmutableArray.Create(node.GetLocation()),
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
39Interlocked.CompareExchange(ref _spans, ImmutableArray.CreateBuilder<TextSpan>(), null);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
121var additionalLocations = ImmutableArray.Create(firstStatementLocation); 140var additionalUnnecessaryLocations = ImmutableArray.Create(location);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (2)
21siblingStatements = ImmutableArray.CreateRange(block.Statements); 25siblingStatements = ImmutableArray.CreateRange(switchSection.Statements);
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
70ImmutableArray.Create(subpattern.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (3)
199additionalLocations: ImmutableArray.Create(initializer.GetLocation()), 208var locations = ImmutableArray.Create(expression.GetLocation()); 217var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
29private const string CreateBuilderName = nameof(ImmutableArray.CreateBuilder); 52var locations = ImmutableArray.Create(invocationExpression.GetLocation()); 68var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
49var locations = ImmutableArray.Create(invocationExpression.GetLocation()); 60var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
60additionalLocations: ImmutableArray.Create(nodeToReplace.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
105additionalLocations: ImmutableArray.Create(invocation.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
74var locations = ImmutableArray.Create(objectCreationExpression.GetLocation()); 85var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (4)
60var locations = ImmutableArray.Create(expression.GetLocation()); 69var additionalUnnecessaryLocations = ImmutableArray.Create( 100var locations = ImmutableArray.Create(expression.GetLocation()); 109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
863const string CreateName = nameof(ImmutableArray.Create); 864const string CreateRangeName = nameof(ImmutableArray.CreateRange);
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
100additionalLocations: ImmutableArray.Create(coalesceExpression.GetLocation()), 173additionalLocations: ImmutableArray.Create(ifStatement.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\Utilities.cs (1)
13ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
104var additionalLocations = ImmutableArray.Create(declaration.GetLocation()); 123var additionalLocations = ImmutableArray.Create(declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
78var additionalLocations = ImmutableArray.Create(declaration.GetLocation()); 93var additionalLocations = ImmutableArray.Create(declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
63ImmutableArray.Create(objectCreation.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
315var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
133var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
253var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
148var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
113var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
141var additionalLocations = ImmutableArray.Create(syntaxNode.GetLocation());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
18private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
69static t => (t.invocationOrCreation, ImmutableArray.Create<SyntaxNode>(t.identifier, t.declarator)),
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
277var deduplicatedUsingsBuilder = ImmutableArray.CreateBuilder<UsingDirectiveSyntax>();
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
69.SelectMany(t => ImmutableArray.Create(SyntaxFactory.Space, t, SyntaxFactory.ElasticCarriageReturnLineFeed))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
32var rules = ImmutableArray.Create(baseIndentationRule).AddRange(CSharpSyntaxFormatting.Instance.GetDefaultFormattingRules());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
227editor.SetStatements(functionDeclaration, ImmutableArray.Create(statement));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (4)
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (1)
37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
164=> ImmutableArray.Create(new DiagnosticDescriptor(
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (2)
275""", new TestParameters(options: s_options.AccessibilitiesArePascalCase(ImmutableArray.Create(alternateAccessibility)))); 289""", options: s_options.AccessibilitiesArePascalCase(ImmutableArray.Create(accessibility)));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (19)
CommandLineTests.cs (19)
524AssertEx.Equal(ImmutableArray.Create<string>(), parser.KeyFileSearchPaths); 536AssertEx.Equal(ImmutableArray.Create<string>(), parser.KeyFileSearchPaths); 550AssertEx.Equal(ImmutableArray.Create<string>(), parser.KeyFileSearchPaths); 4039Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 4043Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 4047Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 4051Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 4055Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 4059Assert.True(parsedArgs.EmitOptions.InstrumentationKinds.SequenceEqual(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 11516Assert.Equal(ImmutableArray.Create<KeyValuePair<string, string>>(), parsedArgs.PathMap); 11533Assert.Equal(ImmutableArray.Create<KeyValuePair<string, string>>(), parsedArgs.PathMap); 12040$"Could not load file or assembly '{typeof(ImmutableArray).Assembly.FullName}' or one of its dependencies. The system cannot find the file specified.", 14219var virtualSnProvider = new DesktopStrongNameProvider(ImmutableArray.Create(dir.Path)); 14895public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_rule); 15940return ImmutableArray.Create(Hidden01, Hidden02); 15964return ImmutableArray.Create(Info01); 15991return ImmutableArray.Create(Warning01); 16010public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning02); 16033return ImmutableArray.Create(Error01, Error02);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringInfo.cs (1)
98var contentSpans = ImmutableArray.Create(TextSpan.FromBounds(start, end));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (164)
Classification\SemanticClassifierTests_TestMarkup.cs (3)
52var spans = ImmutableArray.Create(new TextSpan(start, length)); 119var spans = ImmutableArray.Create( 123var expected = ImmutableArray.Create(Keyword("class"),
CodeActions\AddUsing\AddUsingNuGetTests.cs (6)
53var packageSources = ImmutableArray.Create(new PackageSource("My Custom Nuget Feed", "http://nuget.org/")); 90var packageSources = ImmutableArray.Create(new PackageSource("nuget.org", "http://fakenuget.org/")); 229.Returns(ImmutableArray.Create("1.0", "2.0")); 315.Returns(ImmutableArray.Create("1.0")); 352.Returns(ImmutableArray.Create("1.0")); 387=> new(ImmutableArray.Create(results));
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (6)
2042MemberNames = ImmutableArray.Create("a", "b"), 2087MemberNames = ImmutableArray.Create("c", "b"), 4155MemberNames = ImmutableArray.Create("bar"), 4213MemberNames = ImmutableArray.Create("bar"), 4271MemberNames = ImmutableArray.Create("bar"), 4331MemberNames = ImmutableArray.Create("bar"),
CodeActions\GenerateType\GenerateTypeTests.cs (6)
578expectedContainers: ImmutableArray.Create("TestNamespace"), 1415expectedContainers: ImmutableArray.Create("N"), 3857expectedContainers: ImmutableArray.Create("Goo"), 3882expectedContainers: ImmutableArray.Create("Goo"), 3907expectedContainers: ImmutableArray.Create("Goo"), 5625expectedContainers: ImmutableArray.Create("Namespace1", "Namespace2"),
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (16)
800newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 842newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 878newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 921newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 968newFileFolderContainers: ImmutableArray.Create("outer"), 1017newFileFolderContainers: ImmutableArray.Create("outer"), 1073newFileFolderContainers: ImmutableArray.Create("123", "456"), 1310newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1349newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1395newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1435newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1518newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1556newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1601newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1640newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 1685newFileFolderContainers: ImmutableArray.Create("outer", "inner"),
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (65)
37var selectedMembers = ImmutableArray.Create("TestField"); 69var selectedMembers = ImmutableArray.Create("TestProperty"); 102var selectedMembers = ImmutableArray.Create("TestEvent"); 140var selectedMembers = ImmutableArray.Create("TestMethod"); 186var selectedMembers = ImmutableArray.Create("TestMethod"); 230var selectedMembers = ImmutableArray.Create("TestField"); 303var selectedMembers = ImmutableArray.Create("TestMethod"); 347var selectedMembers = ImmutableArray.Create("TestMethodInt", "TestMethodBool"); 395var selectedMembers = ImmutableArray.Create("TestMethodBool"); 445var selectedMembers = ImmutableArray.Create( 496var selectedMembers = ImmutableArray.Create("TestField"); 534var selectedMembers = ImmutableArray.Create("TestField"); 565var selectedMembers = ImmutableArray.Create("TestField"); 587var selectedMembers = ImmutableArray.Create("TestField"); 620var selectedMembers = ImmutableArray.Create("TestMethod"); 657var selectedMembers = ImmutableArray.Create("TestMethod"); 705var selectedMembers = ImmutableArray.Create("TestMethod"); 742var selectedMembers = ImmutableArray.Create("TestMethod"); 787var selectedMembers = ImmutableArray.Create("TestMethod"); 841var selectedMembers = ImmutableArray.Create("TestMethod"); 892var selectedMembers = ImmutableArray.Create("TestMethod"); 935var selectedMembers = ImmutableArray.Create("TestField"); 984var selectedMembers = ImmutableArray.Create("TestProperty", "_testProperty"); 1039var selectedMembers = ImmutableArray.Create("TestMethod"); 1094var selectedMembers = ImmutableArray.Create("TestMethod"); 1153var selectedMembers = ImmutableArray.Create("TestMethod", "TestGeneric"); 1213var selectedMembers = ImmutableArray.Create("TestMethod"); 1275var selectedMembers = ImmutableArray.Create("TestMethod"); 1333var selectedMembers = ImmutableArray.Create("TestMethod"); 1390var selectedMembers = ImmutableArray.Create("TestMethod"); 1469var selectedMembers = ImmutableArray.Create("TestMethod"); 1533var selectedMembers = ImmutableArray.Create("TestMethod"); 1605var selectedMembers = ImmutableArray.Create("Foo"); 1688var selectedMembers = ImmutableArray.Create("TestMethod"); 1751var selectedMembers = ImmutableArray.Create("TestMethod"); 1815var selectedMembers = ImmutableArray.Create("TestMethod"); 1884var selectedMembers = ImmutableArray.Create("TestMethod"); 1964var selectedMembers = ImmutableArray.Create("TestMethod"); 2060var selectedMembers = ImmutableArray.Create("TestMethod"); 2131var selectedMembers = ImmutableArray.Create("TestMethod"); 2170var selectedMembers = ImmutableArray.Create("TestMethod"); 2211var selectedMembers = ImmutableArray.Create("TestField"); 2244var selectedMembers = ImmutableArray.Create("TestProperty"); 2279var selectedMembers = ImmutableArray.Create("TestEvent"); 2319var selectedMembers = ImmutableArray.Create("TestMethod"); 2367var selectedMembers = ImmutableArray.Create("TestMethod"); 2412var selectedMembers = ImmutableArray.Create("TestField"); 2454var selectedMembers = ImmutableArray.Create("TestMethod"); 2502var selectedMembers = ImmutableArray.Create("TestMethod"); 2549var selectedMembers = ImmutableArray.Create("TestMethod"); 2596var selectedMembers = ImmutableArray.Create("TestMethod"); 2644var selectedMembers = ImmutableArray.Create("IsValidWorkflowType", "validWorkflowTypes"); 2693var selectedMembers = ImmutableArray.Create("TestMethod"); 2727var selectedMembers = ImmutableArray.Create("TestField"); 2758var selectedMembers = ImmutableArray.Create("TestField"); 2789var selectedMembers = ImmutableArray.Create("TestField"); 2820var selectedMembers = ImmutableArray.Create("TestField"); 2854var selectedMembers = ImmutableArray.Create("TestMethod"); 2889var selectedMembers = ImmutableArray.Create("TestField"); 2921var selectedMembers = ImmutableArray.Create("Goo", "Foo"); 2959var selectedMembers = ImmutableArray.Create("Goo", "Foo", "DoSomething"); 3002var selectedMembers = ImmutableArray.Create("Goo", "Foo"); 3045var selectedMembers = ImmutableArray.Create("Goo", "Foo", "DoSomething"); 3088var selectedMembers = ImmutableArray.Create("Foo"); 3127var selectedMembers = ImmutableArray.Create("Goo");
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (7)
2958ImmutableArray.Create(kind)); 2992ImmutableArray.Create(kind), 3010var symbolSpecifications = ImmutableArray.Create( 3014ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Parameter)), 3020ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local)), 3023var namingStyles = ImmutableArray.Create( 3041namingRules: ImmutableArray.Create(
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (35)
58var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 89var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(ideEngineAnalyzer)); 125var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create(analyzer)); 166var options = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalText)); 168var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 181var diagnosticService = new HostDiagnosticAnalyzers([new AnalyzerImageReference(ImmutableArray.Create(analyzer))]); 201var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 223return ImmutableArray.Create(s_syntaxDiagnosticDescriptor); 257var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 294return ImmutableArray.Create(Descriptor); 314return ImmutableArray.Create(SyntaxKind.MethodDeclaration, SyntaxKind.ExpressionStatement, SyntaxKind.EqualsValueClause); 349=> ImmutableArray.Create(Descriptor); 538nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer, secondNugetAnalyzer), 557nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer, secondNugetAnalyzer), 559vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 577nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer), 579vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 619vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 623vsixSuppressors: ImmutableArray.Create(vsixSuppressor), 637nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer, secondNugetAnalyzer), 639vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 643vsixSuppressors: ImmutableArray.Create(vsixSuppressor), 660nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer), 662vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 664nugetSuppressors: ImmutableArray.Create(nugetSuppressor), 682nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer), 684vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 686nugetSuppressors: ImmutableArray.Create(partialNugetSuppressor), 688vsixSuppressors: ImmutableArray.Create(vsixSuppressor), 704nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer), 706vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), 708nugetSuppressors: ImmutableArray.Create(nugetSuppressor), 710vsixSuppressors: ImmutableArray.Create(vsixSuppressor), 728nugetAnalyzer != null ? ImmutableArray.Create(nugetAnalyzer) : ImmutableArray<NuGetAnalyzer>.Empty, 730vsixAnalyzer != null ? ImmutableArray.Create(vsixAnalyzer) : ImmutableArray<VsixAnalyzer>.Empty,
Diagnostics\FixAllProvider\BatchFixerTests.cs (2)
40return ImmutableArray.Create(Descriptor); 67return ImmutableArray.Create(QualifyWithThisAnalyzer.Descriptor.Id);
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
29return ImmutableArray.Create(_descriptor);
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (1)
466var editorConfigString = EditorConfigNamingStyleParser.ToEditorConfigString(ImmutableArray.Create(applicableSymbolKind));
EditAndContinue\ActiveStatementTrackingServiceTests.cs (3)
40spanProvider.GetBaseActiveStatementSpansImpl = (_, documentIds) => ImmutableArray.Create( 41ImmutableArray.Create( 48"1.cs" => ImmutableArray.Create(
Formatting\CodeCleanupTests.cs (1)
800{ LanguageNames.CSharp, ImmutableArray.Create(analyzer) }
Formatting\CodeCleanupTests.TestFixers.cs (1)
21public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create("HasDefaultCase");
Formatting\Indentation\CSharpFormatterTestsBase.cs (1)
87var rules = ImmutableArray.Create(formattingRuleProvider.CreateRule(documentSyntax, position)).AddRange(Formatter.GetDefaultFormattingRules(document));
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
26var builder = ImmutableArray.CreateBuilder<string>();
NavigateTo\NavigateToSearcherTests.cs (5)
124var results = ImmutableArray.Create<INavigateToSearchResult>(new TestNavigateToSearchResult(workspace, new TextSpan(0, 0))); 159var results = ImmutableArray.Create<INavigateToSearchResult>(new TestNavigateToSearchResult(workspace, new TextSpan(0, 0))); 236var results = ImmutableArray.Create<INavigateToSearchResult>(new TestNavigateToSearchResult(workspace, new TextSpan(0, 0))); 272var results = ImmutableArray.Create<INavigateToSearchResult>(new TestNavigateToSearchResult(workspace, new TextSpan(0, 0))); 320var results = ImmutableArray.Create<INavigateToSearchResult>(new TestNavigateToSearchResult(workspace, new TextSpan(0, 0)));
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
210var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(
SignatureHelp\GenericNameSignatureHelpProviderTests.cs (1)
991classificationTypeNames: ImmutableArray.Create(
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
126var json = new StringCopyPasteData(ImmutableArray.Create(StringCopyPasteContent.ForText(pasteText))).ToJson();
TaskList\NoCompilationTaskListTests.cs (1)
63=> Task.FromResult(ImmutableArray.Create(new TaskListItem(
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (165)
CodeGen\CodeGenCapturing.cs (1)
35var fieldsBuilder = ImmutableArray.CreateBuilder<string>(MaxVariables);
CodeGen\CodeGenExplicitImplementationTests.cs (5)
996var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp, aliases: ImmutableArray.Create("Q")) }); 1045var comp1 = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("A")), new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("B")) }); 1061var comp2 = CreateCompilation(source, new[] { new CSharpCompilationReference(libComp1, aliases: ImmutableArray.Create("A")), new CSharpCompilationReference(libComp2, aliases: ImmutableArray.Create("B")) });
CodeGen\CodeGenFunctionPointersTests.cs (5)
7682CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7686CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod), 7767CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7771CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod), 12623publicKeyOrToken: metadata.GetOrAddBlob(ImmutableArray.Create<byte>(0xB7, 0x7A, 0x5C, 0x56, 0x19, 0x34, 0xE0, 0x89)),
CodeGen\CodeGenReadonlyStructTests.cs (6)
897INamedTypeSymbol iNamedType = comp.CreateAnonymousTypeSymbol(ImmutableArray.Create<ITypeSymbol>(comp.ObjectType.GetPublicSymbol()), ImmutableArray.Create("qq")); 905iNamedType = comp.CreateTupleTypeSymbol(ImmutableArray.Create<ITypeSymbol>(comp.ObjectType.GetPublicSymbol(), comp.ObjectType.GetPublicSymbol())); 1061INamedTypeSymbol iNamedType = comp.CreateAnonymousTypeSymbol(ImmutableArray.Create<ITypeSymbol>(comp.ObjectType.GetPublicSymbol()), ImmutableArray.Create("qq")); 1069iNamedType = comp.CreateTupleTypeSymbol(ImmutableArray.Create<ITypeSymbol>(comp.ObjectType.GetPublicSymbol(), comp.ObjectType.GetPublicSymbol()));
CodeGen\CodeGenTupleTest.cs (123)
5855var tupleWithoutNames = comp.CreateTupleTypeSymbol(vt1, ImmutableArray.Create(new[] { (string)null })); 5873var tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create<string>(null, null)); 5913vt2, ImmutableArray.Create<string>("i1", "i2"), ImmutableArray.Create(loc1, loc2)); 5972var tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")); 5991var tupleWithSomeNames = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create(null, "Item2", "Charlie")); 6009var tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")); 6083var tuple8WithNames = comp.CreateTupleTypeSymbol(vt8, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")); 6133var tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")); 6165var tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")); 6275var tuple2 = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create("123", " ", null)); 6279var tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")); 6296var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))); 6331var e = Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(ImmutableArray.Create(vbType), ImmutableArray.Create("m1"))); 6352Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType, intType }.AsImmutable(), elementLocations: ImmutableArray.Create(loc1))); 6367var tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create<string>(null, null)); 6390ImmutableArray.Create<TypeSymbol>(intType, stringType), 6391ImmutableArray.Create<string>(null, null), 6392ImmutableArray.Create(loc1, loc2)); 6415var tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), default(ImmutableArray<string>)); 6431var tupleWithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create("Alice", "Bob")); 6446var tupleWithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("Item2", "Item1")); 6462var tuple8WithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType), 6482var tuple8WithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType), 6483ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")); 6502var tuple9WithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType, intType), 6523var tuple9WithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType, intType), 6524ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")); 6545var tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, ErrorTypeSymbol.UnknownResultType), default(ImmutableArray<string>)); 6563var tuple2 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("123", " ")); 6567var tuple3 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("return", "class")); 6586Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, vbType), default(ImmutableArray<string>))); 6606var twoStringsWithNames = comp.CreateTupleTypeSymbol(twoStrings, ImmutableArray.Create("a", "b")); 6610var tuple3 = comp.CreateTupleTypeSymbol(ImmutableArray.Create<ITypeSymbol>(intType, intType, intType, intType, intType, intType, intType, stringType, stringType), 6611ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")); 6613var tuple4 = comp.CreateTupleTypeSymbol(tuple1, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")); 6807elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)); 6813elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 6820elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6876elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)); 6882elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 6889elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6925ImmutableArray.CreateRange(Enumerable.Range(0, n).Select(_ => annotation)); 13595var t3 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("a", "b")); 13596var t4 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("a", "b")); 13597var t5 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("b", "a")); 13612var t6 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("Item1", "Item2")); 13613var t7 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("Item1", "Item2")); 13623var t8 = NamedTypeSymbol.CreateTuple(m1Tuple, ImmutableArray.Create("Item2", "Item1")); 13645ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "h", "i")); 13647ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "h", "i")); 13649ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "i", "h")); 13665ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")); 13667ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")); 13678ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item9", "Item8")); 13691ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "Item1", "Item2")); 13693ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "Item1", "Item2")); 13701ImmutableArray.Create("a", "b")))) 13757ImmutableArray.Create("Item1", "Item2")))) 13759ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")); 13818ImmutableArray.Create("a", "b")))) 13820ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "item9")); 13834var t3 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("a", "b", "c")); 13835var t4 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("a", "b", "c")); 13836var t5 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("c", "b", "a")); 13851var t6 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("Item1", "Item2", "Item3")); 13852var t7 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("Item1", "Item2", "Item3")); 13862var t8 = NamedTypeSymbol.CreateTuple(m3Tuple, ImmutableArray.Create("Item2", "Item3", "Item1")); 16814references: new[] { comp2.ToMetadataReference(ImmutableArray.Create("alias")), comp1.ToMetadataReference() }, 16865references: new[] { comp1.ToMetadataReference().WithAliases(ImmutableArray.Create("alias")), comp2.ToMetadataReference() }, 16886references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 16940references: new[] { comp1.ToMetadataReference().WithAliases(ImmutableArray.Create("alias")), comp2.ToMetadataReference() }, 16961references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 17023references: s_valueTupleRefs.Concat(new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }), 17046references: s_valueTupleRefs.Concat(new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }), 17070comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")), 17124references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 17178references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference().WithAliases(ImmutableArray.Create("alias1")) }, 18846var int_string1 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18847var int_string2 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18848var int_stringNamed = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create("a", "b")); 18865var int_string2 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18866var int_stringNamed = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create("a", "b")); 18884var int_int = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType)); 18885var int_int_int = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType, intType)); 18886var string_string = comp.CreateTupleTypeSymbol(ImmutableArray.Create(stringType, stringType)); 18908var int_string = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18909var int_object = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 18925var int_string1 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18926var int_object1 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 18951var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18952var int_string2 = tupleComp2.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18954var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 18976var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18977var int_string2 = tupleComp2.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 18978var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 19001var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19002var int_string2 = tupleComp2.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19003var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 19027var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19028var int_string2 = tupleComp2.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19029var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 19069var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19070var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 19071var int_object_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType, objectType)); 19108var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19109var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType)); 19110var int_object_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType, objectType)); 28995elementTypesWithAnnotations: ImmutableArray.Create(obliviousObject, obliviousObject, obliviousObject, obliviousObject, obliviousObject, obliviousObject, obliviousObject, obliviousObject, obliviousObject), 28996elementLocations: ImmutableArray.Create<Location>(null, null, null, null, null, null, null, null, null), 28997elementNames: ImmutableArray.Create("a", "b", "c", "d", "e", "f", "g", "h", "i"), 29001errorPositions: ImmutableArray.Create(true, true, true, true, true, true, true, true, true)); 29013elementTypesWithAnnotations: ImmutableArray.Create(nonNullableObject, nullableObject, nonNullableObject, nullableObject, nonNullableObject, nullableObject, nonNullableObject, nullableObject, nonNullableObject), 29014elementLocations: ImmutableArray.Create<Location>(null, null, null, null, null, null, null, null, null), 29019errorPositions: ImmutableArray.Create(true, true, true, true, true, true, true, true, true));
Emit\CompilationEmitTests.cs (2)
2664MetadataReaderUtils.AssertNotThrowNull(ImmutableArray.CreateRange(output.GetBuffer())); 2665MetadataReaderUtils.AssertEmptyOrThrowNull(ImmutableArray.CreateRange(metadataOutput.GetBuffer()));
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (14)
76var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 220var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 340var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 434var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 491var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 530var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 561var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 601var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 669var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 750var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 831var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 925var peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 980var emitOptions = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)); 1019var emitOptions = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage));
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (5)
2450ImmutableArray<Diagnostic> diagnostics = CreateEmptyCompilation(source + InstrumentationHelperSource).GetEmitDiagnostics(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 2961var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 2997var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 3648emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)), 3663return base.CompileAndVerify(compilation, expectedOutput: expectedOutput, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)));
Emit\EmitMetadataTests.cs (4)
361Assert.True(i1.Interfaces().SequenceEqual(ImmutableArray.Create<NamedTypeSymbol>(i2, i3, i4, i5, i6, i7))); 362Assert.True(i2.Interfaces().SequenceEqual(ImmutableArray.Create<NamedTypeSymbol>(i3, i4))); 365Assert.True(i5.Interfaces().SequenceEqual(ImmutableArray.Create<NamedTypeSymbol>(i6, i7))); 369Assert.True(c.Interfaces().SequenceEqual(ImmutableArray.Create<NamedTypeSymbol>(i1, i2, i3, i4, i5, i6, i7)));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (452)
Emit\EditAndContinue\AssemblyReferencesTests.cs (15)
86var actualIL = ImmutableArray.Create(ilStream.ToArray()).GetMethodIL(); 158var actualIL = ImmutableArray.Create(ilStream.ToArray()).GetMethodIL(); 228ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1))); 234ImmutableArray.Create( 333ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1))); 337ImmutableArray.Create( 416ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1))); 471var ref01 = lib01.ToMetadataReference(ImmutableArray.Create("L0")); 474var ref02 = lib02.ToMetadataReference(ImmutableArray.Create("L0")); 477var ref11 = lib11.ToMetadataReference(ImmutableArray.Create("L1")); 480var ref12 = lib12.ToMetadataReference(ImmutableArray.Create("L1")); 496ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1))); 607ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m0, m1, GetSyntaxMapFromMarkers(source0, source1)))); 616ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 628ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m2, m3, GetSyntaxMapFromMarkers(source2, source3))));
Emit\EditAndContinue\EditAndContinueClosureTests.cs (62)
258ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 319ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 391ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 449ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 502ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 561ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 615ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 670ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 726ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 781ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 849ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 924ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 998ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, ctor0, ctor1, GetSyntaxMapFromMarkers(source0, source1)))); 1065ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, ctor0, ctor1, GetSyntaxMapFromMarkers(source0, source1)))); 1124ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1212ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1301ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1385ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1476ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1558ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1636ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1660ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 1735ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1758ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 1826ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1849ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 1935ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 1970ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 2014ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f2, f3, GetSyntaxMapFromMarkers(source2, source3)))); 2133ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 2167ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 2209ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f2, f3, GetSyntaxMapFromMarkers(source2, source3)))); 2343ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 2367ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 2481ImmutableArray.Create( 2497ImmutableArray.Create( 2598ImmutableArray.Create( 2614ImmutableArray.Create( 2731ImmutableArray.Create( 2742ImmutableArray.Create( 2754ImmutableArray.Create( 2803ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 2875ImmutableArray.Create( 2981ImmutableArray.Create( 3100ImmutableArray.Create( 3195ImmutableArray.Create( 3256ImmutableArray.Create( 3495ImmutableArray.Create( 3763ImmutableArray.Create( 3795ImmutableArray.Create( 3888ImmutableArray.Create( 3900ImmutableArray.Create( 3988ImmutableArray.Create( 4040ImmutableArray.Create( 4134ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4219ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4301ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4374ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4456ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4639ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4698ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 4749ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueDelegateCacheTests.cs (5)
60ImmutableArray.Create( 124ImmutableArray.Create( 188ImmutableArray.Create( 252ImmutableArray.Create( 316ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinuePdbTests.cs (2)
150ImmutableArray.Create( 270ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (73)
62ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, g1))); 241ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, f1))); 358ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 460ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 534ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 584ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 1134ImmutableArray.Create( 1559ImmutableArray.Create( 2001ImmutableArray.Create( 2006ImmutableArray.Create( 2578ImmutableArray.Create( 2747ImmutableArray.Create( 3286ImmutableArray.Create( 3681ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 3785ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 3894ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 4000ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 4114ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 4266ImmutableArray.Create( 4500ImmutableArray.Create( 4660ImmutableArray.Create( 5123ImmutableArray.Create( 5471ImmutableArray.Create( 5810ImmutableArray.Create( 5815ImmutableArray.Create( 5820ImmutableArray.Create( 6715ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 7154ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 7438ImmutableArray.Create( 7450ImmutableArray.Create( 7461ImmutableArray.Create( 7817ImmutableArray.Create( 7892ImmutableArray.Create( 8187ImmutableArray.Create( 8199ImmutableArray.Create( 8210ImmutableArray.Create( 8720ImmutableArray.Create( 8729ImmutableArray.Create( 8738ImmutableArray.Create( 8747ImmutableArray.Create( 8797ImmutableArray.Create( 8802ImmutableArray.Create( 8902ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 8914ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 9097ImmutableArray.Create( 9219ImmutableArray.Create( 9238ImmutableArray.Create( 9376ImmutableArray.Create( 9389ImmutableArray.Create( 9531ImmutableArray.Create( 9542ImmutableArray.Create( 9638ImmutableArray.Create( 9700ImmutableArray.Create( 9768ImmutableArray.Create( 9780ImmutableArray.Create( 9794ImmutableArray.Create( 9806ImmutableArray.Create( 9818ImmutableArray.Create( 10270ImmutableArray.Create( 10580ImmutableArray.Create( 10646ImmutableArray.Create( 10713ImmutableArray.Create( 10778ImmutableArray.Create( 10846ImmutableArray.Create( 10899ImmutableArray.Create( 10963ImmutableArray.Create( 11029ImmutableArray.Create( 11080ImmutableArray.Create( 11131ImmutableArray.Create( 11185ImmutableArray.Create( 11246ImmutableArray.Create( 11301ImmutableArray.Create( 11368ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueTests.cs (204)
277ImmutableArray.Create( 320ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 353ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1))); 408ImmutableArray.Create( 418ImmutableArray.Create( 474ImmutableArray.Create( 521ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 583ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 610ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2))); 810ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 1165ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 1202ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2))); 1288ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 1329ImmutableArray.Create( 1361ImmutableArray.Create( 1909ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 1998ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2016ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))); 2083ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2101ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))); 2157ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2223ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2243ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))); 2299ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2916ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, method1))); 3009ImmutableArray.Create( 3058ImmutableArray.Create( 3123ImmutableArray.Create( 3454ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, f1))); 3488ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2))); 3597ImmutableArray.Create( 3687ImmutableArray.Create( 3784ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, f3))); 3847ImmutableArray.Create( 3907ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, getP0, getP1))); 3976? ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1), SemanticEdit.Create(SemanticEditKind.Insert, null, r1.GetMethod)) 3977: ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1))); 4011? ImmutableArray.Create( 4015: ImmutableArray.Create( 5437ImmutableArray.Create( 5492ImmutableArray.Create( 5944ImmutableArray.Create( 6009ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, c0, c1))); 6030ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, c1, c2))); 6209ImmutableArray.Create( 6217ImmutableArray.Create( 6226ImmutableArray.Create( 6387ImmutableArray.Create( 6465ImmutableArray.Create( 6480ImmutableArray.Create( 6550ImmutableArray.Create( 6565ImmutableArray.Create( 6628ImmutableArray.Create( 6730ImmutableArray.Create( 6791ImmutableArray.Create( 6905ImmutableArray.Create( 6919ImmutableArray.Create( 6962ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 7029ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, method1))); 7055ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2))); 7105ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 7218ImmutableArray.Create( 7243ImmutableArray.Create( 7382ImmutableArray.Create( 7526ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, compilation1.GetMember<MethodSymbol>("C.M")))); 7598ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 7648ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation0.GetMember("C.M"), compilation1.GetMember("C.M")))); 7750ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, compilation1.GetMember<MethodSymbol>("C.puts")))); 7806ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, compilation1.GetMember<NamedTypeSymbol>("B")))); 7886ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, compilation1.GetMembers("M.C.M1")[2]))); 7919ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation1.GetMember<MethodSymbol>("M.C.M2"), 8042ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation0.GetMembers("C.M")[0], compilation1.GetMembers("C.M")[0]))); 8066ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation1.GetMembers("C.M")[1], compilation2.GetMembers("C.M")[1]))); 8090ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation2.GetMembers("C.M")[2], compilation3.GetMembers("C.M")[2]))); 8115ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation3.GetMembers("C.M")[3], compilation4.GetMembers("C.M")[3]))); 8140ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation4.GetMembers("C.M")[4], compilation5.GetMembers("C.M")[4]))); 8164ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation5.GetMembers("C.M")[5], compilation6.GetMembers("C.M")[5]))); 8188ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation6.GetMembers("C.M")[6], compilation7.GetMembers("C.M")[6]))); 8214ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation7.GetMembers("C.M")[7], compilation8.GetMembers("C.M")[7]))); 8239ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation8.GetMembers("C.M")[8], compilation9.GetMembers("C.M")[8]))); 8263ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation9.GetMembers("C.M")[9], compilation10.GetMembers("C.M")[9]))); 8336ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation10.GetMembers("C.M")[12], compilation11.GetMembers("C.M")[12]))); 8360ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation11.GetMembers("C.M")[13], compilation12.GetMembers("C.M")[13]))); 8429ImmutableArray.Create( 8535ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 8615ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation0.GetMembers("C.F")[1], compilation1.GetMembers("C.F")[1]))); 8644ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation1.GetMembers("C.F")[1], compilation2.GetMembers("C.F")[1]))); 8708ImmutableArray.Create(SemanticEdit.Create( 8841ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 8899ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetEquivalentNodesMap(method2, method1)))); 8957ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method2, method3, GetEquivalentNodesMap(method3, method2)))); 9047ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, m1, null))); 9051ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m1, m2, GetEquivalentNodesMap(m2, m1)))); 9135ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 9185ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 9234ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 9381ImmutableArray.Create( 9410ImmutableArray.Create( 9438ImmutableArray.Create( 9523ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 9546ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 9612ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 9633ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))); 9719ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m0, m1, GetEquivalentNodesMap(m1, m0)))); 9823ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetEquivalentNodesMap(f1, f0)))); 9939ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 9967ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))); 9999ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method2, method3, GetSyntaxMapFromMarkers(source2, source3)))); 10126ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetEquivalentNodesMap(f1, f0)))); 10136ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, g1, g2, GetEquivalentNodesMap(g2, g1)))); 10146ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, g2, g3, GetEquivalentNodesMap(g3, g2)))); 10232ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 10311ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m0, m1, GetSyntaxMapFromMarkers(source0, source1)))); 10338ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m1, m2, GetSyntaxMapFromMarkers(source1, source2)))); 10461ImmutableArray.Create( 10475ImmutableArray.Create( 10584ImmutableArray.Create( 10598ImmutableArray.Create( 10780ImmutableArray.Create( 10810ImmutableArray.Create( 10888ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 10961ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11036ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11129ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11222ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11286ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11349ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11359ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11369ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11379ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11389ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11399ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 11469ImmutableArray.Create( 11510ImmutableArray.Create( 11618ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))); 11736ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 11789ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 11884ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1A, GetEquivalentNodesMap(method1A, method0)))); 11896ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1B, GetEquivalentNodesMap(method1B, method0)))); 11962ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 12109ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 12224ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null))); 12237ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1F, method2F, syntaxMap: s => null))); 12249ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1G, method2G, syntaxMap: s => null))); 12292ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null)), 12307ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null)), 12322ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null)), 12377ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null)), 12413ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, compilation1.GetMember<MethodSymbol>("C.Main"))), 12453ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, compilation0.GetMember("C.Main"), compilation1.GetMember("C.Main")))); 12505ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0F, method1F, syntaxMap: s => null))); 12516ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1F, method2F, syntaxMap: s => null))); 12575ImmutableArray.Create( 12584ImmutableArray.Create( 12640ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetEquivalentNodesMap(f1, f0)))); 12659ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f1, f2, GetEquivalentNodesMap(f2, f1)))); 12711ImmutableArray.Create( 12718ImmutableArray.Create( 12755ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 12836ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1))))); 12904ImmutableArray.Create( 12947ImmutableArray.Create( 13053ImmutableArray.Create( 13086ImmutableArray.Create( 13181ImmutableArray.Create( 13205ImmutableArray.Create( 13289ImmutableArray.Create( 13314ImmutableArray.Create( 13432ImmutableArray.Create( 13484ImmutableArray.Create( 13604ImmutableArray.Create( 13638ImmutableArray.Create( 13730ImmutableArray.Create( 13759ImmutableArray.Create( 13900ImmutableArray.Create( 13957ImmutableArray.Create( 14068ImmutableArray.Create( 14096ImmutableArray.Create( 14180ImmutableArray.Create( 14203ImmutableArray.Create( 14301ImmutableArray.Create( 14350ImmutableArray.Create( 14463ImmutableArray.Create( 14504ImmutableArray.Create( 14597ImmutableArray.Create( 14621ImmutableArray.Create( 14715ImmutableArray.Create( 14759ImmutableArray.Create( 14892ImmutableArray.Create( 14946ImmutableArray.Create( 15108ImmutableArray.Create( 15179ImmutableArray.Create( 15342ImmutableArray.Create( 15392ImmutableArray.Create( 15481ImmutableArray.Create( 15493ImmutableArray.Create( 15579ImmutableArray.Create( 15660ImmutableArray.Create( 16012ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1))); 16084ImmutableArray.Create( 18620ImmutableArray.Create( 18696ImmutableArray.Create( 18790ImmutableArray.Create( 18879ImmutableArray.Create(
Emit\EditAndContinue\LocalSlotMappingTests.cs (44)
80ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, syntaxMap: null))); 254ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 438ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 544ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 656ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 766ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 857ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 1159ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 1222ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 1330ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 1494ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 1750ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 1862ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2022ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2055ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2204ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))); 2252ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))); 2428ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2490ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method1, method2, GetEquivalentNodesMap(method2, method1)))); 2612ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2750ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 2925ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.SwitchStatement)))); 3061ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.SwitchStatement)))); 3224ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 3388ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.IfStatement)))); 3497ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.WhileStatement)))); 3607ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.DoStatement)))); 3698ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.ForStatement, SyntaxKind.VariableDeclarator)))); 3902ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m0, m1, GetSyntaxMapFromMarkers(source0, source1)))); 3906ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, m1, m2, GetSyntaxMapFromMarkers(source1, source2)))); 4245ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4292ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4348ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4403ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4455ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4511ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4580ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4660ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4754ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, g0, g1, GetEquivalentNodesMap(g1, g0)))); 4814ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4874ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 4963ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))); 5117ImmutableArray.Create( 5181ImmutableArray.Create(
Emit\EditAndContinue\SymbolMatcherTests.cs (7)
486Assert.Equal("<>f__AnonymousType0", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("A", isKey: false, ignoreCase: false)))].Name); 487Assert.Equal("<>f__AnonymousType1", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("B", isKey: false, ignoreCase: false)))].Name); 556Assert.Equal("<>f__AnonymousType0", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("A", isKey: false, ignoreCase: false)))].Name); 557Assert.Equal("<>f__AnonymousType1", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("X", isKey: false, ignoreCase: false)))].Name); 558Assert.Equal("<>f__AnonymousType2", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("Y", isKey: false, ignoreCase: false)))].Name); 1111Assert.Equal("<>f__AnonymousType0", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("A", isKey: false, ignoreCase: false)))].Name); 1112Assert.Equal("<>f__AnonymousType1", anonymousTypeMap0[new AnonymousTypeKey(ImmutableArray.Create(new AnonymousTypeKeyField("B", isKey: false, ignoreCase: false)))].Name);
Emit\LocalStateTracing\LocalStateTracingTests.cs (3)
34var options = EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.CreateRange(kinds)); 442edits: ImmutableArray.Create( 443new SemanticEdit(f0, f1, ImmutableArray.Create(InstrumentationKindExtensions.LocalStateTracing))));
PDB\CheckSumTest.cs (1)
26TestOptions.DebugDll.WithSourceReferenceResolver(new SourceFileResolver(ImmutableArray.Create<string>(), baseDirectory)));
PDB\PDBUsingTests.cs (36)
577new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")) , 578new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 579new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")) 680compilation1.ToMetadataReference(ImmutableArray.Create("X")) 731compilation1.ToMetadataReference(ImmutableArray.Create("X")), 793new CSharpCompilationReference(dummyCompilation, ImmutableArray.Create("A", "A")), 808var refA = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2")); 858var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2")); 868var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 944var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2")); 954var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 1030var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2", "A3")); 1040var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 1123var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2", "A3")); 1133var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 1216var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2")); 1226var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 1308var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2")); 1318var refA4 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A5")); 1415new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("global", "A")), 1416new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("B", "global")) 1486references: new[] { new CSharpCompilationReference(libComp, ImmutableArray.Create("P")) }); 1562new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")) , 1563new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1564new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")) 1718new CSharpCompilationReference(compilation1, ImmutableArray.Create("A", "B")) 1786new CSharpCompilationReference(compilation1, ImmutableArray.Create("global", "B", "A", "A", "global")) 1868new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 1869new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 1870new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 2046new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("P")), 2047new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("Q")), 2048new CSharpCompilationReference(dummyCompilation3, ImmutableArray.Create("R")), 2049new CSharpCompilationReference(dummyCompilation4, ImmutableArray.Create("S")), 2694var libRef = lib.EmitToImageReference(aliases: ImmutableArray.Create("Q")); 3317var c = CreateCompilationWithMscorlib40(sources, new[] { SystemCoreRef.WithAliases(ImmutableArray.Create("A")) });
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (106)
Attributes\AttributeTests.cs (3)
5508NamedTypeSymbol classYOfW = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW))); 5515NamedTypeSymbol classYOfInt = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)))); 5524NamedTypeSymbol substNestedZ = classYOfInt.GetTypeMember("Z").ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW)));
Attributes\AttributeTests_NativeInteger.cs (1)
1384AssertEx.Equal(ImmutableArray.Create(true, true, true, false, true, true), reader.ReadBoolArray(customAttribute.Value));
Attributes\AttributeTests_Nullable.cs (5)
4222underlyingType.ApplyNullableTransforms(0, ImmutableArray.Create(expectedPreviously), ref position, out _); 4758AssertEx.Equal(ImmutableArray.Create<byte>(0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 2), reader.ReadByteArray(customAttribute.Value)); 4767AssertEx.Equal(ImmutableArray.Create<byte>(0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 2), reader.ReadByteArray(customAttribute.Value)); 4902var expectedBits = ImmutableArray.Create<byte>(0, 2, 0, 1, 2, 1, 2, 1, 2, 1, 0, 2); 4905expectedBits = ImmutableArray.Create(addOne.GetValueOrDefault()).Concat(expectedBits);
Attributes\AttributeTests_Synthesized.cs (1)
1968namedArguments: ImmutableArray.Create(new KeyValuePair<WellKnownMember, TypedConstant>(
Attributes\InternalsVisibleToAndStrongNameTests.cs (3)
65new DesktopStrongNameProvider(ImmutableArray.Create(keyFilePath), strongNameFileSystem: new VirtualizedStrongNameFileSystem(_signingTempDirectory.Path)); 229ImmutableArray.Create(PathUtilities.CombineAbsoluteAndRelativePaths(keyFileDir, @"TempSubDir\")), 773WithCryptoPublicKey(ImmutableArray.Create<byte>(1, 2, 3)).
Diagnostics\DiagnosticAnalyzerTests.cs (43)
44return ImmutableArray.Create(s_CA9999_UseOfVariableThatStartsWithX); 239return ImmutableArray.Create(s_descriptor); 477get { return ImmutableArray.Create(desc1, desc2, desc3); } 492get { return ImmutableArray.Create(desc1, desc2); } 506get { return ImmutableArray.Create(desc1); } 658public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 763get { return ImmutableArray.Create(Descriptor1, Descriptor2, Descriptor3, Descriptor4, Descriptor5, Descriptor6); } 800ImmutableArray.Create(SyntaxKind.EqualsValueClause)); 803ImmutableArray.Create(SyntaxKind.BaseConstructorInitializer)); 822}, ImmutableArray.Create(SyntaxKind.ArrowExpressionClause)); 833get { return ImmutableArray.Create(Descriptor1); } 884return ImmutableArray.Create(SupportedDescriptor); 1474var builder = ImmutableArray.CreateBuilder<SyntaxTree>(); 1645get { return ImmutableArray.Create(ExpressionDescriptor); } 2244var syntaxKinds = ImmutableArray.Create(SyntaxKind.VariableDeclaration); 2245var operationKinds = ImmutableArray.Create(OperationKind.VariableDeclarator); 2306public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning, Summary); 3265var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3311var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3349var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2)); 3357var tree1SemanticDiagnostics = await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel1, filterSpan: null, ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1), CancellationToken.None); 3686var allAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3694var analyzersToQuery = singleAnalyzer ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1) : allAnalyzers; 3753var allAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3813var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 3843public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 3884var options = new AnalyzerOptions(ImmutableArray.Create(additionalFile)); 3887var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 3923var additionalFiles = ImmutableArray.Create(additionalFile1, additionalFile2); 3929var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3935verifyAnalysisResult(analysisResult, analyzers, ImmutableArray.Create(additionalFile1), diagnosticSpan, additionalFilesHaveSamePaths); 3937verifyAnalysisResult(analysisResult, analyzers, ImmutableArray.Create(additionalFile2), diagnosticSpan, additionalFilesHaveSamePaths); 3939var singleAnalyzerArray = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1); 3941verifyAnalysisResult(analysisResult, singleAnalyzerArray, ImmutableArray.Create(additionalFile1), diagnosticSpan, additionalFilesHaveSamePaths); 3943verifyAnalysisResult(analysisResult, singleAnalyzerArray, ImmutableArray.Create(additionalFile2), diagnosticSpan, additionalFilesHaveSamePaths); 4011var singleAnalyzerArray = ImmutableArray.Create(analyzer); 4015verifyDiagnostics(reportedDiagnostics, singleAnalyzerArray, ImmutableArray.Create(additionalFile), diagnosticSpan, additionalFilesHaveSamePaths); 4077public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 4122public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 4229var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 4314var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 4316var analyzerOptions = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalTextFile)); 4397var analyzersArray = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer);
Diagnostics\DiagnosticSuppressorTests.cs (4)
718var analyzers = withSuppressor ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, suppressor) : ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1); 722analyzers = withSuppressor ? ImmutableArray.Create<DiagnosticAnalyzer>(analyzer2, suppressor) : ImmutableArray.Create<DiagnosticAnalyzer>(analyzer2);
Diagnostics\GetDiagnosticsTests.cs (16)
552var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 615var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create(analyzer), analyzerOptions); 662var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 715var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.VariableDeclaration)); 744var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 784var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 838var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 952public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor, DescriptorForBlockEnd); 1064var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(compilerAnalyzer), AnalyzerOptions.Empty); 1124var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1438var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 1457analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer(), suppressor); 1473public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray.Create(_descriptor); 1519var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1698var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer), AnalyzerOptions.Empty); 1714public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Semantics\CollectionExpressionTests.cs (2)
26744var expectedConversion = new Conversion(ConversionKind.CollectionExpression, nestedConversions: ImmutableArray.Create(Conversion.Identity, Conversion.Identity)); 26799var expectedConversion = new Conversion(ConversionKind.CollectionExpression, nestedConversions: ImmutableArray.Create(Conversion.Identity, Conversion.Identity));
Semantics\OutVarTests.cs (1)
18802=> ImmutableArray.Create(Descriptor);
Semantics\PatternMatchingTests5.cs (2)
2120var ref1 = CreateCompilation(INumberBaseDefinition, assemblyName: "A").EmitToImageReference(aliases: ImmutableArray.Create("A")); 2298var ref1 = CreateCompilation(INumberBaseDefinition).EmitToImageReference(aliases: ImmutableArray.Create("A"));
Semantics\PrimaryConstructorTests.cs (16)
3750=> ImmutableArray.Create(Descriptor); 4075=> ImmutableArray.Create(Descriptor); 4161=> ImmutableArray.Create(Descriptor); 4310=> ImmutableArray.Create(Descriptor); 4500=> ImmutableArray.Create(Descriptor); 4634=> ImmutableArray.Create(Descriptor); 4814=> ImmutableArray.Create(Descriptor); 4959=> ImmutableArray.Create(Descriptor); 5138=> ImmutableArray.Create(Descriptor); 5251=> ImmutableArray.Create(Descriptor); 5478=> ImmutableArray.Create(Descriptor); 5565=> ImmutableArray.Create(Descriptor); 5678=> ImmutableArray.Create(Descriptor); 5775=> ImmutableArray.Create(Descriptor); 5833=> ImmutableArray.Create(Descriptor); 5926=> ImmutableArray.Create(Descriptor);
Semantics\RecordTests.cs (9)
26235=> ImmutableArray.Create(Descriptor); 26558=> ImmutableArray.Create(Descriptor); 26653=> ImmutableArray.Create(Descriptor); 26818=> ImmutableArray.Create(Descriptor); 27008=> ImmutableArray.Create(Descriptor); 27142=> ImmutableArray.Create(Descriptor); 27322=> ImmutableArray.Create(Descriptor); 27467=> ImmutableArray.Create(Descriptor); 27650=> ImmutableArray.Create(Descriptor);
Microsoft.CodeAnalysis.CSharp.Features (72)
ChangeSignature\CSharpChangeSignatureService.cs (1)
754var result = ImmutableArray.CreateBuilder<T>();
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (1)
32=> ImmutableArray.Create(FixAllScope.Solution);
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (1)
169symbols: ImmutableArray.Create(p),
Completion\CompletionProviders\CrefCompletionProvider.cs (2)
78var serializedOptions = ImmutableArray.Create(KeyValuePairUtil.Create(HideAdvancedMembers, options.MemberDisplayOptions.HideAdvancedMembers.ToString())); 340symbols: ImmutableArray.Create(symbol),
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
525var possibleTypes = ImmutableArray.Create(
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (5)
177symbols: ImmutableArray.Create(symbol), 200var additionalFilterTexts = ImmutableArray.Create(field.Name); 205symbols: ImmutableArray.Create<ISymbol>(field), 256var additionalFilterTexts = ImmutableArray.Create(staticSymbol.Name); 261symbols: ImmutableArray.Create(staticSymbol),
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (2)
64return (ImmutableArray.Create<ISymbol>(conversion), s_conversionProperties); 72var symbols = ImmutableArray.Create<ISymbol>(conversion.ContainingType, conversion.Parameters.First().Type, conversion.ReturnType);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
95var opCharacters = ImmutableArray.CreateRange(filterCharacters);
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
89symbols: ImmutableArray.Create(member),
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
67Interlocked.CompareExchange(ref _diagnostics, ImmutableArray.CreateBuilder<Diagnostic>(), null);
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
77return ImmutableArray.CreateRange(block.Statements);
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
92var spans = ImmutableArray.Create(TextSpan.FromBounds(spanStart, spanEnd));
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
90var builder = ImmutableArray.CreateBuilder<SyntaxNode>();
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
57var additionalLocations = ImmutableArray.Create(member.GetLocation());
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
62ImmutableArray.Create(declaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
65ImmutableArray.Create(declaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
81ImmutableArray.Create(methodDeclaration.GetLocation()),
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
230var allLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
58additionalLocations: ImmutableArray.Create(localFunction.GetLocation()),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
166additionalLocations: ImmutableArray.Create(additionalLocation),
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
65additionalLocations: ImmutableArray.Create(additionalLocation),
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
96additionalLocations: ImmutableArray.Create(initializer.GetLocation()),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
73var additionalLocations = ImmutableArray.Create(statement.GetLocation());
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
48ImmutableArray.Create(node.GetLocation()),
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
39Interlocked.CompareExchange(ref _spans, ImmutableArray.CreateBuilder<TextSpan>(), null);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
121var additionalLocations = ImmutableArray.Create(firstStatementLocation); 140var additionalUnnecessaryLocations = ImmutableArray.Create(location);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (2)
21siblingStatements = ImmutableArray.CreateRange(block.Statements); 25siblingStatements = ImmutableArray.CreateRange(switchSection.Statements);
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
70ImmutableArray.Create(subpattern.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (3)
199additionalLocations: ImmutableArray.Create(initializer.GetLocation()), 208var locations = ImmutableArray.Create(expression.GetLocation()); 217var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
29private const string CreateBuilderName = nameof(ImmutableArray.CreateBuilder); 52var locations = ImmutableArray.Create(invocationExpression.GetLocation()); 68var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
49var locations = ImmutableArray.Create(invocationExpression.GetLocation()); 60var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
60additionalLocations: ImmutableArray.Create(nodeToReplace.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
105additionalLocations: ImmutableArray.Create(invocation.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
74var locations = ImmutableArray.Create(objectCreationExpression.GetLocation()); 85var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (4)
60var locations = ImmutableArray.Create(expression.GetLocation()); 69var additionalUnnecessaryLocations = ImmutableArray.Create( 100var locations = ImmutableArray.Create(expression.GetLocation()); 109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
863const string CreateName = nameof(ImmutableArray.Create); 864const string CreateRangeName = nameof(ImmutableArray.CreateRange);
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
100additionalLocations: ImmutableArray.Create(coalesceExpression.GetLocation()), 173additionalLocations: ImmutableArray.Create(ifStatement.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\Utilities.cs (1)
13ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
104var additionalLocations = ImmutableArray.Create(declaration.GetLocation()); 123var additionalLocations = ImmutableArray.Create(declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
78var additionalLocations = ImmutableArray.Create(declaration.GetLocation()); 93var additionalLocations = ImmutableArray.Create(declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
63ImmutableArray.Create(objectCreation.GetLocation()),
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
315var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
133var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
253var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
148var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
113var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
141var additionalLocations = ImmutableArray.Create(syntaxNode.GetLocation());
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
69static t => (t.invocationOrCreation, ImmutableArray.Create<SyntaxNode>(t.identifier, t.declarator)),
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
277var deduplicatedUsingsBuilder = ImmutableArray.CreateBuilder<UsingDirectiveSyntax>();
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpIsAndCastCheckCodeFixProvider.cs (1)
69.SelectMany(t => ImmutableArray.Create(SyntaxFactory.Space, t, SyntaxFactory.ElasticCarriageReturnLineFeed))
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
370executableCodeBlocks: ImmutableArray.Create<SyntaxNode>(expressionBody),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (64)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (13)
78ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 98ImmutableArray.Create(symbolSpecification), 99ImmutableArray.Create(namingStyle), 100ImmutableArray.Create(namingRule)); 110ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)), 130ImmutableArray.Create(symbolSpecification), 131ImmutableArray.Create(namingStyle), 132ImmutableArray.Create(namingRule)); 142ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)), 144ImmutableArray.Create(new ModifierKind(DeclarationModifiers.Static))); 162ImmutableArray.Create(symbolSpecification), 163ImmutableArray.Create(namingStyle), 164ImmutableArray.Create(namingRule));
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4753=> ImmutableArray.Create(new DiagnosticDescriptor(
ConvertTupleToStruct\ConvertTupleToStructTests.cs (4)
387ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 407ImmutableArray.Create(symbolSpecification), 408ImmutableArray.Create(namingStyle), 409ImmutableArray.Create(namingRule));
Diagnostics\Configuration\ConfigureCodeStyle\MultipleCodeStyleOptionConfigurationTests.cs (1)
30return base.MassageActions(ImmutableArray.Create(nestedActionForOptionIndex));
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
36return ImmutableArray.Create(Decsciptor);
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (9)
61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor0168, Descriptor0219); 116public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 145=> ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer()); 184=> ImmutableArray.Create<DiagnosticAnalyzer>(new UserDiagnosticAnalyzer(), new CompilationEndDiagnosticAnalyzer()); 189=> ImmutableArray.Create( 1019=> ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer(), new UserDiagnosticAnalyzer()); 1300public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1316=> ImmutableArray.Create<DiagnosticAnalyzer>(new NonLocalDiagnosticsAnalyzer()); 1342=> ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpUseAutoPropertyAnalyzer());
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Decsciptor1, Decsciptor2);
Diagnostics\Suppression\SuppressionTests.cs (7)
699return ImmutableArray.Create(Decsciptor); 809return ImmutableArray.Create(_descriptor); 872return ImmutableArray.Create(_descriptor); 922return ImmutableArray.Create(Decsciptor); 1063return ImmutableArray.Create(Descriptor); 2059public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 2455=> ImmutableArray.Create(Descriptor);
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
321KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create(
EditAndContinue\LineEditTests.cs (4)
2307new("a", ImmutableArray.Create( 2375new("a", ImmutableArray.Create(new SourceLineUpdate(0, 1))), 2376new("b", ImmutableArray.Create(new SourceLineUpdate(0, 1))), 2417new("a", ImmutableArray.Create(new SourceLineUpdate(6, 4))),
EditAndContinue\SyntaxComparerTests.cs (4)
45ImmutableArray.Create(MakeLiteral(0), MakeLiteral(1), MakeLiteral(2)), 46ImmutableArray.Create(MakeLiteral(1), MakeLiteral(3))); 77ImmutableArray.Create(PublicKeyword, StaticKeyword, AsyncKeyword), 78ImmutableArray.Create(StaticKeyword, PublicKeyword, AsyncKeyword));
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (1)
37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
164=> ImmutableArray.Create(new DiagnosticDescriptor(
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (2)
275""", new TestParameters(options: s_options.AccessibilitiesArePascalCase(ImmutableArray.Create(alternateAccessibility)))); 289""", options: s_options.AccessibilitiesArePascalCase(ImmutableArray.Create(accessibility)));
Wrapping\SortingTests.cs (11)
19var items = ImmutableArray.Create("Action1", "Action2"); 31var items = ImmutableArray.Create("Action1", "Action2"); 34items, ImmutableArray.Create("Action1"), a => a); 43var items = ImmutableArray.Create("Action1", "Action2"); 46items, ImmutableArray.Create("Action2"), a => a); 49Assert.Equal((IEnumerable<string>)ImmutableArray.Create("Action2", "Action1"), sorted); 55var items = ImmutableArray.Create("Action1", "Action2"); 58items, ImmutableArray.Create("Action1", "Action2"), a => a); 67var items = ImmutableArray.Create("Action1", "Action2"); 70items, ImmutableArray.Create("Action2", "Action1"), a => a); 73Assert.Equal((IEnumerable<string>)ImmutableArray.Create("Action2", "Action1"), sorted);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (249)
Semantics\ColorColorTests.cs (1)
1774=> ImmutableArray.Create(Descriptor);
Semantics\DelegateTypeTests.cs (3)
15594var funcOfObjectNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(objectType, NullableAnnotation.Annotated))); 15595var funcOfStringNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.Annotated))); 15596var funcOfStringNotNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.NotAnnotated)));
Semantics\ForEachTests.cs (1)
2051var options = new CSharpParseOptions(preprocessorSymbols: ImmutableArray.Create("CONDITIONAL"), documentationMode: DocumentationMode.None);
Semantics\ImportsTests.cs (2)
126ImmutableArray.Create(externAlias1)); 131ImmutableArray.Create(externAlias2));
Semantics\InterceptorsTests.cs (10)
5279var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5315var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5349var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5418var pathMap = ImmutableArray.Create( 5458var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_\")); 5493var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/")); 5535var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/")); 5976var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 6017var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 6079var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(directory2, "./"));
Semantics\InterpolationTests.cs (1)
7604var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\NullableReferenceTypesTests.cs (16)
113113m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 113114m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 113115m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 113120m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 113121m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 113122m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 115795var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 115807var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115837var i1 = iDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115846var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 115858var i2b = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115863var i2c = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i2.TypeParameters.Single(), NullableAnnotation.Annotated))); 115867var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115872var i3b = i3.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i3.TypeParameters.Single(), NullableAnnotation.Annotated))); 115877var modifiers = ImmutableArray.Create(CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Object))); 115878var c4 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), customModifiers: modifiers)));
Semantics\RawInterpolationTests_Handler.cs (1)
5897var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\RecordStructTests.cs (8)
5950=> ImmutableArray.Create(Descriptor); 6179=> ImmutableArray.Create(Descriptor); 6275=> ImmutableArray.Create(Descriptor); 6404=> ImmutableArray.Create(Descriptor); 6501=> ImmutableArray.Create(Descriptor); 6559=> ImmutableArray.Create(Descriptor); 6652=> ImmutableArray.Create(Descriptor); 6813=> ImmutableArray.Create(Descriptor);
Semantics\TopLevelStatementsTests.cs (13)
6427=> ImmutableArray.Create(Descriptor); 6526=> ImmutableArray.Create(Descriptor); 6601=> ImmutableArray.Create(Descriptor); 6710=> ImmutableArray.Create(Descriptor); 6791=> ImmutableArray.Create(Descriptor); 6849=> ImmutableArray.Create(Descriptor); 6907=> ImmutableArray.Create(Descriptor); 6975=> ImmutableArray.Create(Descriptor); 7055=> ImmutableArray.Create(Descriptor); 7171=> ImmutableArray.Create(Descriptor); 7265=> ImmutableArray.Create(Descriptor); 7337=> ImmutableArray.Create(Descriptor); 7404=> ImmutableArray.Create(Descriptor);
Semantics\UnsafeTests.cs (2)
7876Assert.True(methodGroupSummary.MethodGroup.SetEquals(ImmutableArray.Create<IMethodSymbol>(structMethod1.GetPublicSymbol(), structMethod2.GetPublicSymbol()), EqualityComparer<IMethodSymbol>.Default)); 7922var structMethods = ImmutableArray.Create<MethodSymbol>(structMethod1, structMethod2);
SourceGeneration\GeneratorDriverFuzzTests.cs (1)
525var editedInputs = ImmutableArray.Create(new AdditionalText[]
SourceGeneration\GeneratorDriverTests.cs (8)
181=> ImmutableArray.Create(Descriptor); 827var texts = ImmutableArray.Create<AdditionalText>(new InMemoryAdditionalText("a", "abc"), new InMemoryAdditionalText("b", "def")); 1203GeneratorDriver driver = CSharpGeneratorDriver.Create(ImmutableArray.Create(gen), parseOptions: parseOptions); 1275GeneratorDriver driver = CSharpGeneratorDriver.Create(ImmutableArray.Create(gen), parseOptions: parseOptions); 1778driver = driver.AddAdditionalTexts(ImmutableArray.Create<AdditionalText>(text2)); 3956driver = driver.AddGenerators(ImmutableArray.Create<ISourceGenerator>(generator2)); 3994driver = driver.AddGenerators(ImmutableArray.Create<ISourceGenerator>(generator2)); 4037driver = driver.AddGenerators(ImmutableArray.Create<ISourceGenerator>(generator2));
SourceGeneration\StateTableTests.cs (181)
24builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 25builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 26builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 29var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 0), (3, EntryState.Added, 0)); 37builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 38builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 39builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 42var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 1), (3, EntryState.Added, 2), (4, EntryState.Added, 0), (5, EntryState.Added, 1), (6, EntryState.Added, 2), (7, EntryState.Added, 0), (8, EntryState.Added, 1), (9, EntryState.Added, 2)); 52builder.AddEntries(ImmutableArray.Create(o, o, o), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 55var expected = ImmutableArray.Create((o, EntryState.Added, 0), (o, EntryState.Added, 1), (o, EntryState.Added, 2)); 70var expected = ImmutableArray.Create((o, EntryState.Added, 0), (null, EntryState.Added, 0), (o, EntryState.Added, 0)); 78builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 79builder.AddEntries(ImmutableArray.Create(2, 3), EntryState.Cached, TimeSpan.Zero, default, EntryState.Cached); 80builder.AddEntries(ImmutableArray.Create(4, 5), EntryState.Modified, TimeSpan.Zero, default, EntryState.Modified); 81builder.AddEntries(ImmutableArray.Create(6), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 85builder.TryModifyEntries(ImmutableArray.Create(10, 11), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified); 87builder.TryModifyEntries(ImmutableArray.Create(20, 21, 22), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified); 91var expected = ImmutableArray.Create((10, EntryState.Modified, 0), (11, EntryState.Added, 1), (2, EntryState.Cached, 0), (3, EntryState.Cached, 1), (20, EntryState.Modified, 0), (21, EntryState.Modified, 1), (22, EntryState.Added, 2), (6, EntryState.Removed, 0)); 109builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 110builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Removed, TimeSpan.Zero, default, EntryState.Removed); 111builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 114var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 1), (3, EntryState.Added, 2), (4, EntryState.Removed, 0), (5, EntryState.Removed, 1), (6, EntryState.Removed, 2), (7, EntryState.Added, 0), (8, EntryState.Added, 1), (9, EntryState.Added, 2)); 118expected = ImmutableArray.Create((1, EntryState.Cached, 0), (2, EntryState.Cached, 1), (3, EntryState.Cached, 2), (7, EntryState.Cached, 0), (8, EntryState.Cached, 1), (9, EntryState.Cached, 2)); 126builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 127builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Removed, TimeSpan.Zero, default, EntryState.Removed); 128builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 131var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 1), (3, EntryState.Added, 2), (4, EntryState.Removed, 0), (5, EntryState.Removed, 1), (6, EntryState.Removed, 2), (7, EntryState.Added, 0), (8, EntryState.Added, 1), (9, EntryState.Added, 2)); 135expected = ImmutableArray.Create((1, EntryState.Cached, 0), (2, EntryState.Cached, 1), (3, EntryState.Cached, 2), (7, EntryState.Cached, 0), (8, EntryState.Cached, 1), (9, EntryState.Cached, 2)); 147builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 157builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 168builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 179builder.AddEntries(ImmutableArray.Create(1, 2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 181builder.AddEntries(ImmutableArray.Create(3, 4), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 184var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 1), (3, EntryState.Added, 0), (4, EntryState.Added, 1)); 188Assert.True(builder.TryModifyEntries(ImmutableArray.Create(3, 2), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified)); 190Assert.True(builder.TryModifyEntries(ImmutableArray.Create(3, 5), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified)); 194expected = ImmutableArray.Create((3, EntryState.Modified, 0), (2, EntryState.Cached, 1), (3, EntryState.Cached, 0), (5, EntryState.Modified, 1)); 202builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 203builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 204builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 205builder.AddEntries(ImmutableArray.Create(4), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 208var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 0), (3, EntryState.Added, 0), (4, EntryState.Added, 0)); 219expected = ImmutableArray.Create((1, EntryState.Cached, 0), (2, EntryState.Cached, 0), (5, EntryState.Modified, 0), (4, EntryState.Cached, 0)); 227builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 228builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 229builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 232var expected = ImmutableArray.Create((1, EntryState.Added, 0), (2, EntryState.Added, 0), (3, EntryState.Added, 0)); 241expected = ImmutableArray.Create((1, EntryState.Cached, 0), (4, EntryState.Modified, 0), (3, EntryState.Cached, 0)); 281nodeBuilder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Cached, TimeSpan.Zero, default, EntryState.Cached); 310nodeBuilder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, emptyInputSteps, EntryState.Added); 311nodeBuilder.AddEntries(ImmutableArray.Create(4), EntryState.Removed, TimeSpan.Zero, emptyInputSteps, EntryState.Removed); 312nodeBuilder.AddEntries(ImmutableArray.Create(5, 6), EntryState.Modified, TimeSpan.Zero, emptyInputSteps, EntryState.Modified); 372var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, 3)); 405Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value); 414var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, 3)); 425AssertTableEntries(table, new[] { (ImmutableArray.Create(1, 2, 3), EntryState.Cached, 0) }); 432var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, 3)); 468Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value); 477var inputValue = ImmutableArray.Create(1, 2, 3); 486inputValue = ImmutableArray.Create(1, 2); 515Assert.Equal(ImmutableArray.Create(1, 2), (IEnumerable<int>)output.Value); 525var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, thirdElement++)); 536AssertTableEntries(table, new[] { (ImmutableArray.Create(1, 2, 4), EntryState.Modified, 0) }); 544var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, thirdElement)); 582Assert.Equal(ImmutableArray.Create(1, 2, 4), (IEnumerable<int>)output.Value); 611AssertTableEntries(table2, new[] { (ImmutableArray.Create("A", "B"), EntryState.Added, 0) }); 612AssertTableEntries(table2.AsCached(), new[] { (ImmutableArray.Create("A", "B"), EntryState.Cached, 0) }); 623AssertTableEntries(table2, new[] { (ImmutableArray.Create("B"), EntryState.Modified, 0) }); 624AssertTableEntries(table2.AsCached(), new[] { (ImmutableArray.Create("B"), EntryState.Cached, 0) }); 631var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1)); 662var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1)); 698var inputNode = new InputNode<int>((_) => ImmutableArray.Create(value)); 737var inputNode = new InputNode<int>((_) => ImmutableArray.Create(value)); 774ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3); 782inputNodeValue = ImmutableArray.Create(1, 4, 5, 6); 827ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3); 829var transformNode = new TransformNode<int, int>(inputNode, (i, ct) => ImmutableArray.Create(i)).WithTrackingName("TestStep"); 836inputNodeValue = ImmutableArray.Create(1, 4, 5, 6); 861ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3); 863var input2Node = new InputNode<int>((_) => ImmutableArray.Create(0)); 871inputNodeValue = ImmutableArray.Create(1, 4, 5, 6); 919var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, 3)) 937var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, thirdValue)).WithTrackingName("Input"); 940var filterNode = new TransformNode<int, int>(transformNode, (i, ct) => i <= 2 ? ImmutableArray.Create(i) : ImmutableArray<int>.Empty, name: "Filter"); 970ImmutableArray<int> values = ImmutableArray.Create(1, 2, 3); 971var inputNode = new InputNode<ImmutableArray<int>>(_ => ImmutableArray.Create(values)).WithTrackingName("Input"); 1000var inputNode = new InputNode<ImmutableArray<int>>(_ => ImmutableArray.Create(values)).WithTrackingName("Input"); 1007values = ImmutableArray.Create(1, 2, 3); 1028ImmutableArray<ImmutableArray<string>> values = ImmutableArray.Create(ImmutableArray.Create("class1"), ImmutableArray.Create("class2")); 1035AssertTableEntries(table, ImmutableArray.Create(("class1", EntryState.Added, 0), ("class2", EntryState.Added, 0))); 1037AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class1", EntryState.Cached, 0), ("class2", EntryState.Cached, 0))); 1040values = ImmutableArray.Create(ImmutableArray.Create("class3"), ImmutableArray.Create("class2")); 1044AssertTableEntries(table, ImmutableArray.Create(("class1", EntryState.Removed, 0), ("class2", EntryState.Cached, 0))); 1046AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class2", EntryState.Cached, 0))); 1048values = ImmutableArray.Create(ImmutableArray.Create("class3"), ImmutableArray.Create("class4")); 1052AssertTableEntries(table, ImmutableArray.Create(("class4", EntryState.Modified, 0))); 1054AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class4", EntryState.Cached, 0))); 1057values = ImmutableArray.Create(ImmutableArray.Create("class1")); 1061AssertTableEntries(table, ImmutableArray.Create(("class4", EntryState.Removed, 0), ("class1", EntryState.Added, 0))); 1063AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class1", EntryState.Cached, 0))); 1069ImmutableArray<ImmutableArray<string>> values = ImmutableArray.Create(ImmutableArray.Create("class1", "class1.1"), ImmutableArray.Create("class2", "class2.1")); 1076AssertTableEntries(table, ImmutableArray.Create(("class1", EntryState.Added, 0), ("class1.1", EntryState.Added, 1), ("class2", EntryState.Added, 0), ("class2.1", EntryState.Added, 1))); 1078AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class1", EntryState.Cached, 0), ("class1.1", EntryState.Cached, 1), ("class2", EntryState.Cached, 0), ("class2.1", EntryState.Cached, 1))); 1081values = ImmutableArray.Create(ImmutableArray.Create("class3", "class3.1"), ImmutableArray.Create("class2", "class2.1")); 1085AssertTableEntries(table, ImmutableArray.Create(("class1", EntryState.Removed, 0), ("class1.1", EntryState.Removed, 1), ("class2", EntryState.Cached, 0), ("class2.1", EntryState.Cached, 1))); 1087AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class2", EntryState.Cached, 0), ("class2.1", EntryState.Cached, 1))); 1089values = ImmutableArray.Create(ImmutableArray.Create("class3", "class3.1"), ImmutableArray.Create("class4", "class4.1")); 1093AssertTableEntries(table, ImmutableArray.Create(("class4", EntryState.Modified, 0), ("class4.1", EntryState.Modified, 1))); 1095AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class4", EntryState.Cached, 0), ("class4.1", EntryState.Cached, 1))); 1098values = ImmutableArray.Create(ImmutableArray.Create("class1", "class1.1")); 1102AssertTableEntries(table, ImmutableArray.Create(("class4", EntryState.Removed, 0), ("class4.1", EntryState.Removed, 1), ("class1", EntryState.Added, 0), ("class1.1", EntryState.Added, 1))); 1104AssertTableEntries(table.AsCached(), ImmutableArray.Create(("class1", EntryState.Cached, 0), ("class1.1", EntryState.Cached, 1))); 1110ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1117"1" => ImmutableArray.Create("1.1", "1.2"), 1118"2" => ImmutableArray.Create("2.1", "2.2"), 1119_ => ImmutableArray.Create("1.1", "inserted", "1.2") 1128AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0))); 1130AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1133values = ImmutableArray.Create("3", "2"); 1137AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("inserted", EntryState.Modified, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1139AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("inserted", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1145ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1152"1" => ImmutableArray.Create("1.1", "1.2"), 1153"2" => ImmutableArray.Create("2.1", "2.2"), 1154_ => ImmutableArray.Create("inserted", "1.1", "1.2") 1163AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0))); 1165AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1168values = ImmutableArray.Create("3", "2"); 1172AssertTableEntries(table, ImmutableArray.Create(("inserted", EntryState.Modified, 0), ("1.1", EntryState.Modified, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1174AssertTableEntries(table.AsCached(), ImmutableArray.Create(("inserted", EntryState.Cached, 0), ("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1180ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1187"1" => ImmutableArray.Create("1.1", "1.2"), 1188"2" => ImmutableArray.Create("2.1", "2.2"), 1189_ => ImmutableArray.Create("1.1", "1.2", "inserted") 1198AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0))); 1200AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1203values = ImmutableArray.Create("3", "2"); 1207AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("inserted", EntryState.Added, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1209AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("inserted", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1215ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1222"1" => ImmutableArray.Create("1.1", "1.2"), 1223"2" => ImmutableArray.Create("2.1", "2.2"), 1224_ => ImmutableArray.Create("2.1", "inserted", "2.2") 1233AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0))); 1235AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1238values = ImmutableArray.Create("1", "3"); 1242AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("inserted", EntryState.Modified, 0), ("2.2", EntryState.Added, 0))); 1244AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("inserted", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1250ImmutableArray<string> values = ImmutableArray.Create("1", "2", "3"); 1257"1" => ImmutableArray.Create("1.1", "1.2"), 1258"2" => ImmutableArray.Create("2.1", "2.2"), 1259"3" => ImmutableArray.Create("3.1", "3.2"), 1260_ => ImmutableArray.Create("2.1", "inserted", "2.2") 1269AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0), ("3.1", EntryState.Added, 0), ("3.2", EntryState.Added, 0))); 1271AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0), ("3.1", EntryState.Cached, 0), ("3.2", EntryState.Cached, 0))); 1274values = ImmutableArray.Create("1", "4", "3"); 1278AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("inserted", EntryState.Modified, 0), ("2.2", EntryState.Added, 0), ("3.1", EntryState.Cached, 0), ("3.2", EntryState.Cached, 0))); 1280AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("inserted", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0), ("3.1", EntryState.Cached, 0), ("3.2", EntryState.Cached, 0))); 1286ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1293"1" => ImmutableArray.Create("1.1", "1.2"), 1294"2" => ImmutableArray.Create("2.1", "2.2"), 1295_ => ImmutableArray.Create("1.1") 1304AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Added, 0), ("1.2", EntryState.Added, 0), ("2.1", EntryState.Added, 0), ("2.2", EntryState.Added, 0))); 1306AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1309values = ImmutableArray.Create("3", "2"); 1313AssertTableEntries(table, ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("1.2", EntryState.Removed, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0))); 1315AssertTableEntries(table.AsCached(), ImmutableArray.Create(("1.1", EntryState.Cached, 0), ("2.1", EntryState.Cached, 0), ("2.2", EntryState.Cached, 0)));
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
1191driver = driver.AddGenerators(ImmutableArray.Create(testGenerator2.AsSourceGenerator()));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (215)
Compilation\CompilationAPITests.cs (45)
617var mtref = refcomp.EmitToImageReference(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)")); 685var mtref = refcomp.EmitToImageReference(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)")); 2510ImmutableArray.Create((ITypeSymbol)null), 2511ImmutableArray.Create("m1", "m2"))); 2520ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2522ImmutableArray.Create("m1", "m2"), 2523ImmutableArray.Create(true))); 2532ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2534ImmutableArray.Create("m1", "m2"), 2535memberLocations: ImmutableArray.Create(Location.None))); 2544ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2546ImmutableArray.Create("m1", "m2"), 2547ImmutableArray.Create(false, false))); 2556ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2558ImmutableArray.Create("m1", "m2"), 2559memberLocations: ImmutableArray.Create(Location.None, null))); 2569ImmutableArray.Create("m1"))); 2578ImmutableArray.Create((ITypeSymbol)null), 2588ImmutableArray.Create((ITypeSymbol)null), 2589ImmutableArray.Create("m1"))); 2598ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2599ImmutableArray.Create((string)null))); 2607ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32)), 2608ImmutableArray.Create("m1")); 2626ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32), 2628ImmutableArray.Create("m1", "m2"), 2629memberLocations: ImmutableArray.Create(loc1, loc2)); 2643ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 2644ImmutableArray.Create("m1", "m2")); 2658var memberTypes = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 2659var memberNames = ImmutableArray.Create("P", "Q"); 2698var memberTypes = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 2699var memberNames = ImmutableArray.Create("P", "Q"); 2705Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated))); 2707type = comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)); 3032var typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3043Assert.Throws<ArgumentException>(() => genericType.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default)); 3045type = genericType.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)); 3052typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3067var typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3078Assert.Throws<ArgumentException>(() => genericMethod.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default)); 3080type = genericMethod.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)); 3087typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3639var corlibReference = corlib.EmitToImageReference(aliases: ImmutableArray.Create("corlib")); 3667var otherReference = other.EmitToImageReference(aliases: ImmutableArray.Create("other"));
Compilation\CSharpCompilationOptionsTests.cs (3)
81TestHiddenProperty((old, value) => old.WithCryptoPublicKey(value), opt => opt.CryptoPublicKey, ImmutableArray.Create<byte>(0, 1, 2, 3)); 113TestProperty((old, value) => old.WithUsings(value), opt => opt.Usings, ImmutableArray.Create("A", "B")); 119TestProperty((old, value) => old.WithCryptoPublicKey(value), opt => opt.CryptoPublicKey, ImmutableArray.Create<byte>(0, 1, 2, 3));
Compilation\GetImportScopesTests.cs (1)
404return comp.ReplaceReference(reference, reference.WithAliases(ImmutableArray.CreateRange(aliases)));
Compilation\GetSemanticInfoTests.cs (1)
1457var candidateIndexers = ImmutableArray.Create<ISymbol>(indexerSymbol1, indexerSymbol2);
Compilation\GetUnusedImportDirectivesTests.cs (1)
347var comp = CreateCompilation(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("A")) });
Compilation\QueryClauseInfoTests.cs (36)
36new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible), 37new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible)), 39new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible), 40new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible))); 52new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 53new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)), 55new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 56new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible))); 68new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 69new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)), 71new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 72new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 84new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible), 85new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)), 87new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 88new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 92new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, obj), CandidateReason.Inaccessible), 93new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)), 95new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 96new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 100new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 101new SymbolInfo(ImmutableArray.Create<ISymbol>(obj, int32), CandidateReason.Inaccessible)), 103new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 104new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 108new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 109new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, obj), CandidateReason.Inaccessible)), 111new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 112new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 116new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Ambiguous), 117new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)), 119new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 120new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible))); 124new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 125new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Ambiguous)), 127new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible), 128new SymbolInfo(ImmutableArray.Create<ISymbol>(int32, int32), CandidateReason.Inaccessible)));
Compilation\ReferenceManagerTests.cs (22)
1043var ref1 = AssemblyMetadata.CreateFromFile(exe1.Path).GetReference(aliases: ImmutableArray.Create("A1")); 1044var ref2 = AssemblyMetadata.CreateFromFile(exe2.Path).GetReference(aliases: ImmutableArray.Create("A2")); 1252return ImmutableArray.Create(MetadataReference.CreateFromFile(path1)); 1256return ImmutableArray.Create(MetadataReference.CreateFromFile(path2)); 2271WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Z")).WithRecursiveAliases(true)), 2292CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", assemblyName: "C").ToMetadataReference(aliases: ImmutableArray.Create("X", "Y")), 2296WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Z")).WithRecursiveAliases(true)), 2326new[] { MscorlibRef_v4_0_30316_17626, bRef.WithAliases(ImmutableArray.Create("X")), aRef }, 2355var c = CreateSubmissionWithExactReferences(source, new[] { MscorlibRef_v4_0_30316_17626, bRef.WithAliases(ImmutableArray.Create("X")), aRef }, 2395bRef.WithAliases(ImmutableArray.Create("X")), 2397aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y")).WithRecursiveAliases(true)), 2431bRef.WithAliases(ImmutableArray.Create("X")), 2432aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y")).WithRecursiveAliases(true)), 2467bRef.WithAliases(ImmutableArray.Create("X")), 2469aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y")).WithRecursiveAliases(true)), 2470aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y")).WithRecursiveAliases(true)), 2508bRef.WithAliases(ImmutableArray.Create("X")), 2509aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y", "Y")).WithRecursiveAliases(true)), 2510dRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Z")).WithRecursiveAliases(true)), 2554{ "B", bRef.WithAliases(ImmutableArray.Create("X")) } 2584var b3RefX = b3Ref.WithAliases(ImmutableArray.Create("X")); 2585var b3RefY = b3Ref.WithAliases(ImmutableArray.Create("Y"));
Compilation\SemanticModelAPITests.cs (2)
1259var ref1 = comp1.EmitToImageReference(aliases: ImmutableArray.Create("X")); 3841var libRef = CreateCompilation("", assemblyName: "lib").EmitToImageReference(aliases: ImmutableArray.Create("Alias"));
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2181var result = lookupResult.IsMultiViable ? lookupResult.Symbols.ToImmutable() : ImmutableArray.Create<Symbol>();
DocumentationComments\CrefTests.cs (3)
2135var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) }); 2165var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) }); 2195var compilation = CreateCompilationWithMscorlib40AndDocumentationComments(source, new[] { new CSharpCompilationReference(lib, aliases: ImmutableArray.Create("LibAlias")) });
Symbols\AnonymousTypesSymbolTests.cs (2)
1925ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(), compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol()), 1926ImmutableArray.Create("m1", "m2"));
Symbols\AssemblyAndNamespaceTests.cs (2)
373var aliasedCorlib = NetFramework.mscorlib.WithAliases(ImmutableArray.Create("Goo")); 413var libRef = libComp.EmitToImageReference(aliases: ImmutableArray.Create("myTask"));
Symbols\CompilationCreationTests.cs (6)
2652return ImmutableArray.Create(MetadataReference.CreateFromFile(_data)); 2655return ImmutableArray.Create(MetadataReference.CreateFromFile(_core)); 2658return ImmutableArray.Create(MetadataReference.CreateFromFile(_system)); 2663return ImmutableArray.Create(MetadataReference.CreateFromFile(reference)); 2764return ImmutableArray.Create(MetadataReference.CreateFromFile(path, properties)); 2821options: TestOptions.ReleaseDll.WithUsings(ImmutableArray.Create("System.Console", "System")));
Symbols\ExtensionMethodTests.cs (3)
2533ImmutableArray.Create<TypeWithAnnotations>(), 2542ImmutableArray.Create(TypeWithAnnotations.Create(intType)), 2551ImmutableArray.Create(TypeWithAnnotations.Create(intType), TypeWithAnnotations.Create(arrayType)),
Symbols\FunctionPointerTypeSymbolTests.cs (38)
1534Assert.Throws<ArgumentNullException>("parameterTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray.Create((ITypeSymbol?)null)!, parameterRefKinds: ImmutableArray.Create(RefKind.None))); 1536Assert.Throws<ArgumentNullException>("callingConventionTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, ImmutableArray.Create((INamedTypeSymbol)null!))); 1537Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray.Create(RefKind.None))); 1540Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Default, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1541Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.StdCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1542Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.FastCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1543Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.CDecl, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1544Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.ThisCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1545Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, callingConventionTypes: ImmutableArray.Create(@string)!)); 1570ImmutableArray.Create(c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.NotAnnotated), c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated)), 1571ImmutableArray.Create(RefKind.None, RefKind.None)); 1585ImmutableArray.Create((ITypeSymbol)@string), 1586ImmutableArray.Create(RefKind.In)); 1602ImmutableArray.Create((ITypeSymbol)@string), 1603ImmutableArray.Create(RefKind.Out)); 1620ImmutableArray.Create((ITypeSymbol)@string), 1621ImmutableArray.Create(RefKind.Out)); 1653var ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType, stdcallType)!); 1655ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.RefReadOnly, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType, stdcallType)!); 1658ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType)!); 1971callingConventionTypes: ImmutableArray.Create(testConvention.GetPublicSymbol()!))); 1987var funcPtrConventionThisCallWithThiscallMod = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod), CallingConvention.ThisCall); 1989var funcPtrThiscall = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod)); 1990var funcPtrThiscallObject = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, objectMod)); 1991var funcPtrObjectThiscall = createTypeSymbol(customModifiers: ImmutableArray.Create(objectMod, thiscallMod)); 1992var funcPtrObjectThiscallObject = createTypeSymbol(customModifiers: ImmutableArray.Create(objectMod, thiscallMod, objectMod)); 1994var funcPtrThiscallStdcall = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, stdcallMod)); 1995var funcPtrStdcallThiscall = createTypeSymbol(customModifiers: ImmutableArray.Create(stdcallMod, thiscallMod)); 1996var funcPtrThiscallThiscallStdcall = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, thiscallMod, stdcallMod)); 1997var funcPtrThiscallObjectStdcall = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, objectMod, stdcallMod)); 2089var funcPtrCallConv = createTypeSymbol(customModifiers: ImmutableArray.Create(callConvMod)); 2141var funcPtrThiscallOnTypeThiscallOnRef = createTypeSymbol(typeCustomModifiers: ImmutableArray.Create(thiscallMod), refCustomModifiers: ImmutableArray.Create(thiscallMod)); 2142var funcPtrThiscallOnTypeStdcallOnRef = createTypeSymbol(typeCustomModifiers: ImmutableArray.Create(thiscallMod), refCustomModifiers: ImmutableArray.Create(stdcallMod)); 2143var funcPtrStdcallOnTypeThiscallOnRef = createTypeSymbol(typeCustomModifiers: ImmutableArray.Create(stdcallMod), refCustomModifiers: ImmutableArray.Create(thiscallMod));
Symbols\IndexerTests.cs (4)
2632var derivedIndexerGroup = derivedIndexers.Concat(ImmutableArray.Create<PropertySymbol>(baseIndexer3)); 2724ImmutableArray.Create<PropertySymbol>(publicIndexer, protectedIndexer, privateIndexer).GetPublicSymbols(), 2729ImmutableArray.Create<PropertySymbol>(publicIndexer, protectedIndexer).GetPublicSymbols(), 2734ImmutableArray.Create<PropertySymbol>(publicIndexer).GetPublicSymbols(),
Symbols\Metadata\PE\LoadingProperties.cs (5)
264var implementedByProperty1 = ImmutableArray.Create<PropertySymbol>(interfaceProperty1, interfaceProperty4, interfaceProperty5); 269var implementedByGetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.GetMethod, interfaceProperty2.GetMethod, interfaceProperty4.GetMethod); 272var implementedBySetter1 = ImmutableArray.Create<MethodSymbol>(interfaceProperty1.SetMethod, interfaceProperty3.SetMethod, interfaceProperty5.SetMethod); 275var implementedByGetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty3.GetMethod); 278var implementedBySetter2 = ImmutableArray.Create<MethodSymbol>(interfaceProperty2.SetMethod);
Symbols\Metadata\PE\TypeForwarders.cs (8)
1919var refA1 = compA1.EmitToImageReference(aliases: ImmutableArray.Create("A")); 1923var refB1 = compB1.EmitToImageReference(aliases: ImmutableArray.Create("B")); 1954comp = CreateCompilation(sourceProgram, references: new[] { refA1, compB2.EmitToImageReference(aliases: ImmutableArray.Create("B")), refBImpl }); 1961comp = CreateCompilation(sourceProgram, references: new[] { refA1, new CSharpCompilationReference(compB2, aliases: ImmutableArray.Create("B")), refBImpl }); 1983var refA1 = compA1.EmitToImageReference(aliases: ImmutableArray.Create("A")); 1987var refB1 = compB1.EmitToImageReference(aliases: ImmutableArray.Create("B")); 2018comp = CreateCompilation(sourceProgram, references: new[] { refA1, compB2.EmitToImageReference(aliases: ImmutableArray.Create("B")), refBImpl }); 2025comp = CreateCompilation(sourceProgram, references: new[] { refA1, new CSharpCompilationReference(compB2, aliases: ImmutableArray.Create("B")), refBImpl });
Symbols\MockAssemblySymbol.cs (2)
45get { return ImmutableArray.Create<ModuleSymbol>(); } 50get { return ImmutableArray.Create<Location>(); }
Symbols\MockNamedTypeSymbol.cs (4)
54return ImmutableArray.Create<TypeParameterSymbol>(); 62return ImmutableArray.Create<TypeWithAnnotations>(); 162get { return ImmutableArray.Create<Location>(); } 169return ImmutableArray.Create<SyntaxReference>();
Symbols\MockNamespaceSymbol.cs (2)
94return ImmutableArray.Create<Location>(); 102return ImmutableArray.Create<SyntaxReference>();
Symbols\ModuleInitializers\ModuleInitializersTests.cs (2)
1098var ref1 = CreateCompilation(source1).ToMetadataReference(aliases: ImmutableArray.Create("Alias1")); 1099var ref2 = CreateCompilation(source1).ToMetadataReference(aliases: ImmutableArray.Create("Alias2"));
Symbols\OverriddenOrHiddenMembersTests.cs (2)
84var ofD = ImmutableArray.Create<TypeSymbol>(D); 98var ofV = ImmutableArray.Create<TypeSymbol>(D_MofV.TypeParameters[0]);
Symbols\Retargeting\RetargetingTests.cs (2)
278var i_a_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create<TypeSymbol>(a_v2)); 299var i_ct_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create<TypeSymbol>(c.TypeParameters[0]));
Symbols\Source\BaseClassTests.cs (1)
1567var bothInterfaces = ImmutableArray.Create(baseInterface, derivedInterface);
Symbols\Source\ExternAliasTests.cs (7)
38s_goo1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("Bar")); 63s_goo2 = comp.EmitToImageReference(aliases: ImmutableArray.Create("Bar")); 217var goo1Alias = outputMetadata.GetReference(aliases: ImmutableArray.Create("Baz")); 317var goo1Alias = comp.EmitToImageReference(aliases: ImmutableArray.Create("global")); 396var ref1 = comp1.EmitToImageReference(aliases: ImmutableArray.Create("X")); 399var ref2 = comp2.EmitToImageReference(aliases: ImmutableArray.Create("X")); 471var libRef = new CSharpCompilationReference(CreateCompilation(libSource, assemblyName: "lib"), aliases: ImmutableArray.Create("A"));
Symbols\Source\FileModifierTests.cs (1)
841ImmutableArray.Create(new KeyValuePair<string, string>(root2, root1)));
Symbols\Source\ModifierTests.cs (3)
153var customModifiers = ImmutableArray.Create(CSharpCustomModifier.CreateOptional(intType)); 161var typeMap = new TypeMap(ImmutableArray.Create(typeParamType), ImmutableArray.Create(TypeWithAnnotations.Create(intType)));
Symbols\Source\NullablePublicAPITests.cs (3)
1155public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor1, s_descriptor2); 1782=> ImmutableArray.Create(Descriptor); 4838=> ImmutableArray.Create(Descriptor);
Symbols\Source\TypeMapTests.cs (1)
84Assert.Equal(aebfc, DeepConstruct(c, ImmutableArray.Create<TypeSymbol>(e, f))); // exercise DeepConstruct
Symbols\SymbolErrorTests.cs (2)
7343new CSharpCompilationReference(forwardedTypes1, aliases: ImmutableArray.Create("FT1")) 7362new CSharpCompilationReference(forwardedTypes1, ImmutableArray.Create("FT1"))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Diagnostics\DiagnosticTest.cs (1)
117ImmutableArray.Create(symbol)));
Parsing\CSharpParseOptionsTests.cs (4)
47TestProperty((old, value) => old.WithPreprocessorSymbols(value), opt => opt.PreprocessorSymbols, ImmutableArray.Create<string>("A", "B", "C")); 49Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols(default(ImmutableArray<string>)).PreprocessorSymbols.Length); 50Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols((IEnumerable<string>)null).PreprocessorSymbols.Length); 51Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols((string[])null).PreprocessorSymbols.Length);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
CompilationTestUtils.cs (2)
209public ImmutableArray<ISymbol> CandidateSymbols = ImmutableArray.Create<ISymbol>(); 218public ImmutableArray<ISymbol> MemberGroup = ImmutableArray.Create<ISymbol>();
CSharpTestBase.cs (3)
1474private static readonly ImmutableArray<MetadataReference> s_scriptRefs = ImmutableArray.Create(MscorlibRef_v4_0_30316_17626); 1926localDefinitions = ImmutableArray.Create<ILVisualizer.LocalInfo>(); 1962return ImmutableArray.Create<ILVisualizer.LocalInfo>();
Extensions.cs (1)
151return ImmutableArray.Create(name);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
18private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
32var rules = ImmutableArray.Create(baseIndentationRule).AddRange(CSharpSyntaxFormatting.Instance.GetDefaultFormattingRules());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
227editor.SetStatements(functionDeclaration, ImmutableArray.Create(statement));
Microsoft.CodeAnalysis.Debugging.Package (1)
CustomDebugInfoReader.cs (1)
112yield return new CustomDebugInfoRecord(kind, version, ImmutableArray.Create(customDebugInfo, offset, bodySize - alignmentSize));
Microsoft.CodeAnalysis.EditorFeatures (3)
FindUsages\BufferedFindUsagesContext.cs (1)
30public ImmutableArray<DefinitionItem>.Builder Definitions = ImmutableArray.CreateBuilder<DefinitionItem>();
IntelliSense\AsyncCompletion\FilterSet.cs (1)
69var arrayBuilder = ImmutableArray.CreateBuilder<FilterWithMask>();
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
66return Task.FromResult(ImmutableArray.Create<CodeActionOperation>(committerOperation));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (11)
BracePairs\AbstractBracePairsTests.cs (1)
56if (sortedSpans.SequenceEqual(ImmutableArray.Create(bracePair.Start, bracePair.End)))
Classification\AbstractClassifierTests.cs (2)
48spans = ImmutableArray.Create(new TextSpan(start, length)); 59spans = ImmutableArray.Create(new TextSpan(0, allCode.Length));
NavigateTo\AbstractNavigateToTests.cs (2)
227ImmutableArray.Create<Func<NavigateToItem, IComparable>>( 247=> ImmutableArray.Create(_workspace.CurrentSolution.Projects.First().DocumentIds.First());
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
37var textSpans = ImmutableArray.Create(new TextSpan(0, text.Length));
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
36var textSpans = ImmutableArray.Create(new TextSpan(0, text.Length));
TextEditorFactoryExtensions.cs (1)
27roles = ImmutableArray.Create(PredefinedTextViewRoles.Analyzable,
Workspaces\EditorTestHostDocument.cs (1)
23private static readonly ImmutableArray<string> s_defaultRoles = ImmutableArray.Create<string>
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (2)
22public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 29return Task.FromResult(ImmutableArray.Create(
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Extensions.SnapshotSourceText.cs (1)
354return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldTextLength), this.Length));
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 (111)
CodeFixes\CodeFixServiceTests.cs (34)
77ImmutableArray.Create<DiagnosticAnalyzer>( 101ImmutableArray.Create<DiagnosticAnalyzer>( 131var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzerWithFix, analyzerWithoutFix); 167var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(documentDiagnosticAnalyzer); 198var generators = ImmutableArray.Create<ISourceGenerator>(generator); 201var codeFixes = ImmutableArray.Create<CodeFixProvider>(codeFix); 293var reference = new MockAnalyzerReference(codefix, ImmutableArray.Create(diagnosticAnalyzer)); 333=> ServiceSetup(ImmutableArray.Create(codefix), includeConfigurationFixProviders, throwExceptionInFixerCreation, additionalDocument, code); 426get { return ImmutableArray.Create(Id); } 452private static readonly ImmutableArray<CodeFixProvider> s_defaultFixers = ImmutableArray.Create<CodeFixProvider>(new MockFixer()); 453private static readonly ImmutableArray<DiagnosticAnalyzer> s_defaultAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new MockDiagnosticAnalyzer()); 468: this(fixer != null ? ImmutableArray.Create(fixer) : ImmutableArray<CodeFixProvider>.Empty, 537: this(ImmutableArray.Create((diagnosticId, category))) 547: this(ImmutableArray.Create(MockFixer.Id)) 580: this(ImmutableArray.Create(MockFixer.Id)) 645var fixableDiagnosticIds = ImmutableArray.Create(MockFixer.Id); 688var reportedDiagnosticIds = ImmutableArray.Create(id1, id2); 721nugetFixer: new NuGetCodeFixProvider(ImmutableArray.Create(id1)), 722expectedDiagnosticIdsWithRegisteredCodeActionsByNuGetFixer: ImmutableArray.Create(id1), 723vsixFixer: new VsixCodeFixProvider(ImmutableArray.Create(id2)), 724expectedDiagnosticIdsWithRegisteredCodeActionsByVsixFixer: ImmutableArray.Create(id2), 731nugetFixer: new NuGetCodeFixProvider(ImmutableArray.Create(id1)), 732expectedDiagnosticIdsWithRegisteredCodeActionsByNuGetFixer: ImmutableArray.Create(id1), 734expectedDiagnosticIdsWithRegisteredCodeActionsByVsixFixer: ImmutableArray.Create(id2), 777var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(diagnosticAnalyzer); 828var analyzer = new MockAnalyzerReference.MockDiagnosticAnalyzer(ImmutableArray.Create(diagnosticId)); 847public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(_diagnosticId); 877var fixers = ImmutableArray.Create<CodeFixProvider>(fixer1, fixer2, fixer3, fixer4); 878var analyzerReference = new MockAnalyzerReference(fixers, ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 913public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 940public sealed override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(AdditionalFileAnalyzer.DiagnosticId); 1033var analyzerReference = new MockAnalyzerReference(codeFix, ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 1179public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1220public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DeprioritizedAnalyzer.Descriptor.Id);
CodeFixes\ErrorCases\CodeFixExceptionInGetFixAllProvider.cs (1)
19get { return ImmutableArray.Create(CodeFixServiceTests.MockFixer.Id); }
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethod.cs (1)
18get { return ImmutableArray.Create(CodeFixServiceTests.MockFixer.Id); }
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethodAsync.cs (1)
18get { return ImmutableArray.Create(CodeFixServiceTests.MockFixer.Id); }
CodeGeneration\CodeGenerationTests.CSharp.cs (4)
153thisArguments: ImmutableArray.Create<SyntaxNode>(CS.SyntaxFactory.ParseExpression("42"))); 625typeParameters: ImmutableArray.Create(CodeGenerationSymbolFactory.CreateTypeParameterSymbol("T")), 1465var getMembers = ImmutableArray.Create(getField); 1491var getMembers = ImmutableArray.Create(getField);
CodeGeneration\CodeGenerationTests.VisualBasic.cs (7)
162thisArguments: ImmutableArray.Create<SyntaxNode>(VB.SyntaxFactory.ParseExpression("42"))); 411return ImmutableArray.Create<IEventSymbol>( 472var addStatements = ImmutableArray.Create<SyntaxNode>(VB.SyntaxFactory.ParseExecutableStatement("Console.WriteLine(0)")); 473var removeStatements = ImmutableArray.Create<SyntaxNode>(VB.SyntaxFactory.ParseExecutableStatement("Console.WriteLine(1)")); 474var raiseStatements = ImmutableArray.Create<SyntaxNode>(VB.SyntaxFactory.ParseExecutableStatement("Console.WriteLine(2)")); 593typeParameters: ImmutableArray.Create(CodeGenerationSymbolFactory.CreateTypeParameterSymbol("T")), 1535var getMembers = ImmutableArray.Create(getField);
Completion\CompletionServiceTests.cs (1)
92=> ImmutableArray.Create(_completionProvider);
Completion\FileSystemCompletionHelperTests.cs (8)
31searchPaths: ImmutableArray.Create(@"X:\A", @"X:\B"), 33allowableExtensions: ImmutableArray.Create(".abc", ".def"), 93searchPaths: ImmutableArray.Create(@"X:\A", @"X:\B"), 95allowableExtensions: ImmutableArray.Create(".abc", ".def"), 131allowableExtensions: ImmutableArray.Create(".abc", ".def"), 163allowableExtensions: ImmutableArray.Create(".cs"), 191searchPaths: ImmutableArray.Create(@"/A", @"/B"), 193allowableExtensions: ImmutableArray.Create(".abc", ".def"),
Completion\TestFileSystemCompletionHelper.cs (3)
36_drives = ImmutableArray.CreateRange(drives); 37_directories = ImmutableArray.CreateRange(directories); 38_files = ImmutableArray.CreateRange(files);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (25)
60var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new Analyzer())); 81var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new Analyzer())); 99var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new Analyzer())); 114var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer())); 130var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new CSharpCompilerDiagnosticAnalyzer())); 149var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(new DisabledByDefaultAnalyzer())); 245var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>( 292var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>( 378.AddAnalyzerReference(new AnalyzerImageReference(ImmutableArray.Create(analyzer))) 429var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer); 556var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>( 700var analyzerIdsToRequestDiagnostics = ImmutableArray.Create(analyzer1Id); 701var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2)); 745var analyzerIdsToRequestDiagnostics = ImmutableArray.Create(analyzerId); 746var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 815var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); 823var analyzerIds = ImmutableArray.Create(analyzer.GetAnalyzerId()); 919public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule, s_semanticRule, s_compilationRule); 935public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule, s_semanticRule, s_compilationRule); 949public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule); 952=> Task.FromResult(ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, Location.Create(document.FilePath, TextSpan.FromBounds(0, 0), new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 0)))))); 1011public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule); 1016return ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, root.GetLocation())); 1026public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_rule); 1037=> _supportedDiagnostics = ImmutableArray.Create(new DiagnosticDescriptor(DiagnosticId, "test", "test", "test", defaultSeverity, isEnabledByDefault: true));
Diagnostics\DiagnosticDataTests.cs (2)
159additionalLocations: ImmutableArray.Create(externalAdditionalLocation), 253additionalLocations: ImmutableArray.Create(additionalLocation),
EmbeddedLanguages\StackFrame\StackFrameParserTests.cs (2)
117OpenParenToken.With(trailingTrivia: ImmutableArray.Create(SpaceTrivia(2))), 519line: CreateToken(StackFrameKind.NumberToken, "16", leadingTrivia: ImmutableArray.Create(CreateTrivia(StackFrameKind.LineTrivia, $"{line} "))),
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (3)
77var builder = ImmutableArray.CreateBuilder<StackFrameNodeOrToken>(); 205=> new(path.With(leadingTrivia: ImmutableArray.Create(inTrivia.HasValue ? inTrivia.Value : InTrivia)), colon, line); 211=> CreateToken(StackFrameKind.NumberToken, lineNumber.ToString(), leadingTrivia: ImmutableArray.Create(LineTrivia));
MetadataAsSource\AbstractMetadataAsSourceTests.cs (8)
28AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.MscorlibRef_v46, "mscorlib.v4_6_1038_0.dll", ImmutableArray.Create(Net461.ReferenceInfos.mscorlib.ImageBytes)); 29AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.SystemRef_v46, "System.v4_6_1038_0.dll", ImmutableArray.Create(Net461.ReferenceInfos.System.ImageBytes)); 30AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.SystemCoreRef_v46, "System.Core.v4_6_1038_0.dll", ImmutableArray.Create(Net461.ReferenceInfos.SystemCore.ImageBytes)); 31AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.ValueTupleRef, "System.ValueTuple.dll", ImmutableArray.Create(Net461.ExtraReferenceInfos.SystemValueTuple.ImageBytes)); 32AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.SystemRuntimeFacadeRef, "System.Runtime.dll", ImmutableArray.Create(Net461.Resources.SystemRuntime)); 33AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.MsvbRef, "Microsoft.VisualBasic.dll", ImmutableArray.Create(Net461.Resources.MicrosoftVisualBasic)); 34AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.SystemXmlRef, "System.Xml.v4_0_30319.dll", ImmutableArray.Create(Net461.Resources.SystemXml)); 35AssemblyResolver.TestAccessor.AddInMemoryImage(TestBase.SystemXmlLinqRef, "System.Xml.Linq.v4_0_30319.dll", ImmutableArray.Create(Net461.Resources.SystemXmlLinq));
Preview\PreviewWorkspaceTests.cs (1)
139var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new CommonDiagnosticAnalyzers.NotConfigurableDiagnosticAnalyzer());
UnusedReferences\ProjectAssets\ProjectAssetsReaderTests.cs (7)
29var references = ImmutableArray.Create(myPackage); 39var references = ImmutableArray.Create(myPackage); 49var references = ImmutableArray.Create(PackageReference("MyPackage.dll")); 51var differentReference = ImmutableArray.Create(ProjectReference("MyProject.csproj")); 60var references = ImmutableArray.Create(ProjectReference(mylibraryPath)); 69=> new(ReferenceType.Project, projectPath, treatAsUsed, ImmutableArray.Create(Path.ChangeExtension(projectPath, "dll")), dependencies.ToImmutableArray()); 73=> new(ReferenceType.Package, Path.GetFileNameWithoutExtension(assemblyPath), treatAsUsed, ImmutableArray.Create(assemblyPath), dependencies.ToImmutableArray());
UnusedReferences\UnusedReferencesRemoverTests.cs (3)
185compilationAssemblies: ImmutableArray.Create(assemblyPath), 194compilationAssemblies: ImmutableArray.Create(assemblyPath), 203compilationAssemblies: ImmutableArray.Create(assemblyPath),
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Lightup\ISmartRenameSessionWrapper.cs (2)
60s_renameContextImmutableListCreateBuilderAccessor = LightupHelpers.CreateGenericFunctionAccessor<object?, object?>(typeof(ImmutableArray), 61nameof(ImmutableArray.CreateBuilder),
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (109)
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (3)
45Return ImmutableArray.Create(New TaggedText("", "DisplayText")) 90Return Task.FromResult(ImmutableArray.Create(Of INavigableItem)(New FakeNavigableItem(document))) 94Return Task.FromResult(ImmutableArray.Create(Of INavigableItem)(New FakeNavigableItem(document)))
CodeFixes\CodeFixServiceTests.vb (8)
52Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 88Dim projectAnalyzerReferences = ImmutableArray.Create(Of AnalyzerReference)(projectAnalyzerReference) 124Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 160Dim projectAnalyzerReferences = ImmutableArray.Create(Of AnalyzerReference)(projectAnalyzerReference) 196Return ImmutableArray.Create(DiagDescriptor) 221Return ImmutableArray.Create("TEST0000") 246Return ImmutableArray.Create("TEST1111") 339Return Task.FromResult(ImmutableArray.Create("Title"))
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
138analyzeReferences = {New AnalyzerImageReference(ImmutableArray.Create(analyzer))}
Diagnostics\AdditionalFileDiagnosticsTests.vb (2)
72Return ImmutableArray.Create(Rule) 108Return ImmutableArray.Create(AdditionalFileAnalyzer.Rule.Id)
Diagnostics\DiagnosticProviderTests.vb (1)
284NoCompilationConstants.LanguageName, ImmutableArray.Create(Of DiagnosticAnalyzer)(New NoCompilationDocumentDiagnosticAnalyzer()))
Diagnostics\DiagnosticServiceTests.vb (65)
86Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 109Dim projectAnalyzers1 = ImmutableArray.Create(Of DiagnosticAnalyzer)(projectDiagnosticAnalyzer1) 111Dim projectAnalyzerReferences1 = ImmutableArray.Create(Of AnalyzerReference)(projectAnalyzerReference1) 125Dim projectAnalyzers2 = ImmutableArray.Create(Of DiagnosticAnalyzer)(projectDiagnosticAnalyzer2) 191Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 203Dim projectAnalyzerReferences1 = ImmutableArray.Create(Of AnalyzerReference)(projectAnalyzerReference1) 231ImmutableArray.Create(Of DiagnosticAnalyzer)(New TestDiagnosticAnalyzer1(0)), display:=referenceName) 240ImmutableArray.Create(Of DiagnosticAnalyzer)(New TestDiagnosticAnalyzer1(1)), display:=referenceName) 244project = project.WithAnalyzerReferences(ImmutableArray.Create(Of AnalyzerReference)(projectAnalyzerReference)) 271Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(workspaceDiagnosticAnalyzer)) 340p1 = p1.WithAnalyzerReferences(SpecializedCollections.SingletonCollection(New AnalyzerImageReference(ImmutableArray.Create(analyzer1)))) 344p2 = p2.WithAnalyzerReferences(SpecializedCollections.SingletonCollection(New AnalyzerImageReference(ImmutableArray.Create(analyzer2)))) 383{LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer1)}, 384{LanguageNames.VisualBasic, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer2)} 464Dim analyzerReference1 = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 465Dim analyzerReference2 = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 488Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 523Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 569Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 603Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 636Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 670Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 746Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 782Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 842Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 867Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 906Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 941Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 980Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1003Await TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1015Await TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(ImmutableArray.Create(Of DiagnosticAnalyzer)(dummyAnalyzer, analyzer)) 1088Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(analyzer)) 1131Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(analyzer)) 1174Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(analyzer)) 1226Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1252Return ImmutableArray.Create(Descriptor1) 1289Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1336Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1371Return ImmutableArray.Create(Descriptor1) 1402Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 1451Return ImmutableArray.Create(Descriptor) 1539Return ImmutableArray.Create(DiagDescriptor) 1564Return ImmutableArray.Create(DiagDescriptor) 1591Return ImmutableArray.Create(DiagDescriptor) 1616Return ImmutableArray.Create(DiagDescriptor) 1659Return ImmutableArray.Create(Descriptor) 1687Return ImmutableArray.Create(Descriptor) 1713Return ImmutableArray.Create(Descriptor) 1739Return ImmutableArray.Create(Descriptor) 1767Return ImmutableArray.Create(Descriptor) 1812Return ImmutableArray.Create(Descriptor1, Descriptor2, Descriptor3, Descriptor4, Descriptor5, Descriptor6) 1839End Sub, ImmutableArray.Create(CodeAnalysis.CSharp.SyntaxKind.EqualsValueClause)) 1843End Sub, ImmutableArray.Create(CodeAnalysis.CSharp.SyntaxKind.BaseConstructorInitializer)) 1863End Sub, ImmutableArray.Create(CodeAnalysis.CSharp.SyntaxKind.ArrowExpressionClause)) 1880Return ImmutableArray.Create(Descriptor) 1957Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2084Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2123Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2180Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(analyzer)) 2227Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2272Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(compilerAnalyzer, syntaxAnalyzer, semanticAnalyzer)) 2342Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(compilerAnalyzer, syntaxAnalyzer, semanticAnalyzer)) 2396Return ImmutableArray.Create(Descriptor) 2432Dim analyzerReference = New AnalyzerImageReference(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)) 2512Return ImmutableArray.Create(s_descriptor)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (3)
10770context.AddItem(CompletionItem.Create(displayText:="Add code that write to console", filterText:="cw").WithAdditionalFilterTexts(ImmutableArray.Create("Console", "Write"))) 10771context.AddItem(CompletionItem.Create(displayText:="Add code that write line to console", filterText:="cwl").WithAdditionalFilterTexts(ImmutableArray.Create("Console", "WriteLine"))) 10919Dim result = ImmutableArray.Create("PythiaRecommendName")
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (11)
66MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 116MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 152MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 184MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 216MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 248MockDefaultSource.Defaults = ImmutableArray.Create("MyAB", "MyA") 332MockDefaultSource.Defaults = ImmutableArray.Create("FirstDefault") 389MockDefaultSource.Defaults = ImmutableArray.Create("SecondStarred") 459MockDefaultSource.Defaults = ImmutableArray.Create("if") 568MockDefaultSource.Defaults = ImmutableArray.Create("ItemExpanded1") 608MockDefaultSource.Defaults = ImmutableArray.Create("Title")
IntelliSense\IntellisenseQuickInfoBuilderTests.vb (14)
27ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public), 28ImmutableArray.Create( 31ImmutableArray.Create( 52ImmutableArray.Create(New TaggedText(TextTags.Text, "Writes the specified string value, followed by the current line terminator, to the standard output stream."))), 55ImmutableArray.Create( 119ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public), 120ImmutableArray.Create( 123ImmutableArray.Create( 144ImmutableArray.Create( 204ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public), 205ImmutableArray.Create( 208ImmutableArray.Create( 229ImmutableArray.Create( 243ImmutableArray.Create(
SyncNamespaces\SyncNamespacesServiceTests.vb (1)
44Dim newSolution = Await syncService.SyncNamespacesAsync(ImmutableArray.Create(project), CodeAnalysisProgress.None, CancellationToken.None)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
PDB\MethodDebugInfo.Native.cs (2)
278return ImmutableArray.CreateRange(namespaces.Select(n => n.GetName())); 593importRecordGroups = ImmutableArray.Create(
PDB\MethodDebugInfo.Portable.cs (1)
451var builder = ImmutableArray.CreateBuilder<bool>(reader.Length * 8);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (14)
CSharp\MemberSignatureParser.cs (5)
19var builder = ImmutableArray.CreateBuilder<Token>(); 100var builder = ImmutableArray.CreateBuilder<string>(); 175var builder = ImmutableArray.CreateBuilder<TypeSignature>(); 224ImmutableArray.Create(type)); 263var builder = ImmutableArray.CreateBuilder<ParameterSignature>();
MetadataDecoder.cs (3)
39var builder = ImmutableArray.CreateBuilder<ParameterSignature>(parameterCount); 176var builder = ImmutableArray.CreateBuilder<TypeSignature>(typeArgCount); 279typeArguments = ImmutableArray.Create(typeArguments, typeArgumentOffset, arity);
MetadataResolver.cs (1)
304var builder = ImmutableArray.CreateBuilder<string>();
VisualBasic\MemberSignatureParser.cs (5)
23var builder = ImmutableArray.CreateBuilder<Token>(); 119var builder = ImmutableArray.CreateBuilder<string>(); 201var builder = ImmutableArray.CreateBuilder<TypeSignature>(); 246ImmutableArray.Create(type)); 303var builder = ImmutableArray.CreateBuilder<ParameterSignature>();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (6)
FunctionResolverTestBase.cs (2)
69return ImmutableArray.CreateRange(handles.Select(h => reader.GetString(reader.GetGenericParameter(h).Name))); 202var builder = ImmutableArray.CreateBuilder<string>(arity);
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.ExternalAccess.AspNetCore (4)
EmbeddedLanguages\AspNetCoreCSharpRouteSyntaxDetector.cs (1)
22var identifiers = ImmutableArray.Create("Route");
EmbeddedLanguages\BraceMatching\AspNetCoreBraceMatcherExtensionProvider.cs (1)
18=> ImmutableArray.Create(exportAttribute.Language);
EmbeddedLanguages\Classification\AspNetCoreClassifierExtensionProvider.cs (1)
18=> ImmutableArray.Create(exportAttribute.Language);
EmbeddedLanguages\DocumentHighlighting\AspNetCoreClassifierExtensionProvider.cs (1)
18=> ImmutableArray.Create(exportAttribute.Language);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
59var dummyDescriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (1)
51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (1)
53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (1)
48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Internal\DescriptionService.cs (1)
68var quickInfo = await QuickInfoUtilities.CreateQuickInfoItemAsync(services, semanticModel, span: default, ImmutableArray.Create(symbol), options, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (78)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (1)
91return ImmutableArray.Create<CodeActionOperation>(
AddImport\CodeActions\InstallWithPackageManagerCodeAction.cs (1)
30return Task.FromResult(ImmutableArray.Create<CodeActionOperation>(
AddMissingReference\AddMissingReferenceCodeAction.cs (2)
80return Task.FromResult(ImmutableArray.Create<CodeActionOperation>( 88return Task.FromResult(ImmutableArray.Create(operation));
AddPackage\InstallPackageDirectlyCodeAction.cs (1)
36=> Task.FromResult(ImmutableArray.Create(_installPackageOperation));
AddPackage\InstallWithPackageManagerCodeAction.cs (1)
27return Task.FromResult(ImmutableArray.Create<CodeActionOperation>(
ChangeSignature\AbstractChangeSignatureService.cs (2)
693var newParameters = ImmutableArray.CreateBuilder<T>(); 973var updatedLeadingTrivia = ImmutableArray.CreateBuilder<SyntaxTrivia>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.FixAllProvider.cs (1)
26=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project,
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
104: ImmutableArray.Create(parts, index, parts.Length - index);
Common\GlyphExtensions.cs (1)
16var builder = ImmutableArray.CreateBuilder<Glyph>(initialCapacity: tags.Length);
Completion\CompletionItemRules.cs (2)
212=> With(filterRules: ImmutableArray.Create(rule)); 215=> With(commitRules: ImmutableArray.Create(rule));
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
100return Task.FromResult(ImmutableArray.Create(new SymbolAndSelectionInfo(Symbol: type, Preselect: !isArray)));
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
61public readonly ImmutableArray<TStatement> Destinations = ImmutableArray.CreateRange(destinations);
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
38internal readonly ImmutableArray<TaggedText>.Builder Builder = ImmutableArray.CreateBuilder<TaggedText>();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
645var newActiveStatements = ImmutableArray.CreateBuilder<ActiveStatement>(oldActiveStatements.Length); 648var newExceptionRegions = ImmutableArray.CreateBuilder<ImmutableArray<SourceFileSpan>>(oldActiveStatements.Length);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
38var builder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
EditAndContinue\EditSession.cs (1)
861Telemetry.LogProjectAnalysisSummary(ProjectAnalysisSummary.ValidChanges, newProject.State.ProjectInfo.Attributes.TelemetryId, ImmutableArray.Create(mvidReadError.Descriptor.Id));
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (1)
165var diagnostics = ImmutableArray.Create(new EmbeddedDiagnostic(
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
95var fields = ImmutableArray.Create(field);
Formatting\FormattingRuleUtilities.cs (1)
20var rules = ImmutableArray.Create(formattingRuleFactory.CreateRule(document, position));
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
186var parameters = ImmutableArray.Create(
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (1)
133var parameters = ImmutableArray.Create(
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
41_members = ImmutableArray.CreateRange(filteredMembers);
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (1)
315_lookupTable = ImmutableArray.CreateRange(lookupTable);
QuickInfo\QuickInfoUtilities.cs (8)
47var builder = ImmutableArray.CreateBuilder<TaggedText>(); 59var builder = ImmutableArray.CreateBuilder<TaggedText>(); 85var builder = ImmutableArray.CreateBuilder<TaggedText>(); 96var builder = ImmutableArray.CreateBuilder<TaggedText>(); 105var builder = ImmutableArray.CreateBuilder<TaggedText>(); 113var builder = ImmutableArray.CreateBuilder<TaggedText>(); 121var builder = ImmutableArray.CreateBuilder<TaggedText>(); 155var tags = ImmutableArray.CreateRange(GlyphTags.GetTags(symbol.GetGlyph()));
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (1)
78ImmutableArray.Create(memberAccessExpression.GetLocation()),
SplitOrMergeIfStatements\AbstractMergeIfStatementsCodeRefactoringProvider.cs (1)
119statements = ImmutableArray.Create(parent);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
92editor.ReplaceNode(ifOrElseIf, (currentNode, _) => generator.ScopeBlock(ImmutableArray.Create(currentNode)));
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
122var additionalLocations = ImmutableArray.Create(binaryLike.GetLocation());
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
83var customTagsBuilder = ImmutableArray.CreateBuilder<string>();
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
112additionalLocations: ImmutableArray.Create(nextToken.GetLocation()),
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
82additionalLocations: ImmutableArray.Create(token.GetLocation()),
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
74ImmutableArray.Create(node.GetLocation()));
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
107var additionalLocations = ImmutableArray.Create( 109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
212var notifications = ImmutableArray.Create(unusedParametersOption.Notification, unusedValueExpressionStatementSeverity, unusedValueAssignmentSeverity);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
649var additionalLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
119var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
123var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
182var locations = ImmutableArray.Create(objectCreationExpression.GetLocation());
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
35var additionalUnnecessaryLocations = ImmutableArray.Create( 47var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
163additionalLocations: ImmutableArray.Create(assignment.GetLocation()), 183additionalLocations: ImmutableArray.Create(assignment.GetLocation()), 196additionalLocations: ImmutableArray.Create(assignment.GetLocation()),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
60additionalLocations: ImmutableArray.Create(ifStatement.GetLocation()),
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
132var additionalLocations = ImmutableArray.Create(invocation.GetLocation());
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
190var locations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
99ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
119var nodes = ImmutableArray.Create<SyntaxNode>(containingStatement).AddRange(matches.Select(m => m.Statement)); 123var locations = ImmutableArray.Create(objectCreationExpression.GetLocation());
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
129var allLocations = ImmutableArray.Create(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
132return (ImmutableArray.Create<ISymbol>(disposeImplMethod, disposeInterfaceMethod), finalizer); 221? ImmutableArray.Create(disposeMethod) : default;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
53var diagnostics = ImmutableArray.CreateBuilder<Diagnostic>();
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (6)
61var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 62var modifiers = ImmutableArray.Create(new ModifierKind(ModifierKindEnum.IsAsync)); 71var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field), new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local)); 80var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary)); 81var modifiers = ImmutableArray.Create(new ModifierKind(ModifierKindEnum.IsAsync)); 90var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(MethodKind.Ordinary));
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
69var rules = ImmutableArray.Create(GetMultiLineFormattingRule());
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
112yield return new CustomDebugInfoRecord(kind, version, ImmutableArray.Create(customDebugInfo, offset, bodySize - alignmentSize));
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
41var diagnosticAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(DiagnosticAnalyzer);
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
102var compilationAssemblies = ImmutableArray.CreateBuilder<string>();
UnusedReferences\UnusedReferencesRemover.cs (3)
68var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 138var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 197var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\MockManagedEditAndContinueDebuggerService.cs (1)
41=> ValueTaskFactory.FromResult(GetCapabilitiesImpl?.Invoke() ?? ImmutableArray.Create("Baseline", "AddDefinitionToExistingType", "NewTypeDefinition"));
Microsoft.CodeAnalysis.Features.UnitTests (88)
EditAndContinue\ActiveStatementsMapTests.cs (12)
34var array = ImmutableArray.Create( 50var array = ImmutableArray.Create( 69var array = ImmutableArray.Create( 82var array = ImmutableArray.Create( 131var debugInfos = ImmutableArray.Create( 187var debugInfos = ImmutableArray.Create( 237var debugInfos = ImmutableArray.Create( 259=> remapping.Add(debugInfos[ordinal].ActiveInstruction.Method, ImmutableArray.Create(new NonRemappableRegion(oldSpan, newSpan, isExceptionRegion: false))); 304reverse ? ImmutableArray.Create(mapping1, mapping2) : ImmutableArray.Create(mapping2, mapping1)); 342reverse ? ImmutableArray.Create(mapping1, mapping2) : ImmutableArray.Create(mapping2, mapping1));
EditAndContinue\EditAndContinueCapabilitiesTests.cs (5)
16var capabilities = ImmutableArray.Create("Baseline"); 27var capabilities = ImmutableArray.Create("BaseLine"); 37var capabilities = ImmutableArray.Create("Baseline", "Invalid", "NewTypeDefinition"); 48var capabilities = ImmutableArray.Create("Baseline", "90", "NewTypeDefinition"); 61var capabilities = ImmutableArray.Create(name);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (32)
420_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline"); 422var openDocumentIds = open ? ImmutableArray.Create(designTimeOnlyDocumentId) : ImmutableArray<DocumentId>.Empty; 432var activeStatements = ImmutableArray.Create( 453var asSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(designTimeOnlyDocumentId), CancellationToken.None); 1037var activeStatements = ImmutableArray.Create( 1879var activeStatements = ImmutableArray.Create( 1903var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentA1.Id, documentB2.Id), CancellationToken.None); 1910var trackedActiveSpans = ImmutableArray.Create( 1953_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline", "ChangeCustomAttributes"); 1978_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline"); 2003_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline", "ChangeCustomAttributes"); 2066_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline"); 2101_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline"); 2376var activeStatements = ImmutableArray.Create( 2610var activeStatements = ImmutableArray.Create(new ManagedActiveStatementDebugInfo( 3133_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline"); 3410Assert.True((await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document1.Id), CancellationToken.None)).IsDefault); 3416var activeStatements = ImmutableArray.Create( 3433var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document1.Id), CancellationToken.None); 3440var trackedActiveSpans1 = ImmutableArray.Create(activeStatementSpan11, activeStatementSpan12); 3452var trackedActiveSpans2 = ImmutableArray.Create(activeStatementSpan21, activeStatementSpan22); 3492var activeStatements = ImmutableArray.Create( 3506var baseSpans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentId), CancellationToken.None)).Single(); 3544var activeStatements = ImmutableArray.Create( 3557var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document.Id), CancellationToken.None); 3563baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document.Id), CancellationToken.None); 3742var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document.Id), CancellationToken.None); 3749baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(document.Id), CancellationToken.None); 4031var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentId), CancellationToken.None)).Single(); 4134var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentId), CancellationToken.None)).Single(); 4147spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentId), CancellationToken.None)).Single(); 4244var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, ImmutableArray.Create(documentId), CancellationToken.None)).Single();
EditAndContinue\EditSessionActiveStatementsTests.cs (14)
250var newActiveStatementsInChangedDocuments = ImmutableArray.Create( 253newStatements: ImmutableArray.Create( 257newExceptionRegions: ImmutableArray.Create( 265updatedMethodTokens: ImmutableArray.Create(0x06000004), // contains only recompiled methods in the project we are interested in (module2) 366var newActiveStatementsInChangedDocuments = ImmutableArray.Create( 369newStatements: ImmutableArray.Create( 372newExceptionRegions: ImmutableArray.Create( 380updatedMethodTokens: ImmutableArray.Create(0x06000001), // F1 502{ new ManagedMethodId(module1, 0x06000003, 1), ImmutableArray.Create( 508{ new ManagedMethodId(module1, 0x06000004, 1), ImmutableArray.Create( 556var newActiveStatementsInChangedDocuments = ImmutableArray.Create( 559newStatements: ImmutableArray.Create( 564newExceptionRegions: ImmutableArray.Create( 573updatedMethodTokens: ImmutableArray.Create(0x06000002, 0x06000004), // F2, F4
EditAndContinue\EmitSolutionUpdateResultsTests.cs (5)
78var diagnostics = ImmutableArray.Create( 87customTags: ImmutableArray.Create("Test2"), 103customTags: ImmutableArray.Create("Test2"), 120customTags: ImmutableArray.Create("Test3"), 129var rudeEdits = ImmutableArray.Create(new ProjectDiagnostics(document.Project.Id,
EditAndContinue\RemoteEditAndContinueServiceTests.cs (20)
110var activeSpans1 = ImmutableArray.Create( 145GetActiveStatementsImpl = () => ImmutableArray.Create(as1) 148captureMatchingDocuments: ImmutableArray.Create(documentId), 183var deltas = ImmutableArray.Create(new ManagedHotReloadUpdate( 187ilDelta: ImmutableArray.Create<byte>(1, 2), 188metadataDelta: ImmutableArray.Create<byte>(3, 4), 189pdbDelta: ImmutableArray.Create<byte>(5, 6), 190updatedMethods: ImmutableArray.Create(0x06000001), 191updatedTypes: ImmutableArray.Create(0x02000001), 192sequencePoints: ImmutableArray.Create(new SequencePointUpdates("file.cs", ImmutableArray.Create(new SourceLineUpdate(1, 2)))), 193activeStatements: ImmutableArray.Create(new ManagedActiveStatementUpdate(instructionId1.Method.Method, instructionId1.ILOffset, span1.ToSourceSpan())), 194exceptionRegions: ImmutableArray.Create(exceptionRegionUpdate1), 204var diagnostics = ImmutableArray.Create(new ProjectDiagnostics(project.Id, [documentDiagnostic, projectDiagnostic])); 205var documentsWithRudeEdits = ImmutableArray.Create(new ProjectDiagnostics(project.Id, [])); 260return ImmutableArray.Create(ImmutableArray.Create(activeStatementSpan1)); 263var baseActiveSpans = await sessionProxy.GetBaseActiveStatementSpansAsync(localWorkspace.CurrentSolution, ImmutableArray.Create(documentId, inProcOnlyDocumentId), CancellationToken.None); 272return ImmutableArray.Create(activeStatementSpan1); 289mockEncService.GetDocumentDiagnosticsImpl = (document, activeStatementProvider) => ImmutableArray.Create(diagnostic);
Microsoft.CodeAnalysis.InteractiveHost (19)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
83metadataReferencePaths: ImmutableArray.Create(typeof(object).Assembly.Location, typeof(InteractiveScriptGlobals).Assembly.Location),
Interactive\Core\InteractiveHost.Service.cs (2)
109private static readonly ImmutableArray<string> s_systemNoShadowCopyDirectories = ImmutableArray.Create( 506var metadataReferencePaths = ImmutableArray.CreateBuilder<string>();
Interactive\Core\RemoteInitializationResult.cs (2)
21ImmutableArray.Create(MetadataReferencePaths), 22ImmutableArray.Create(Imports));
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (12)
79return ImmutableArray.Create(map(items[0])); 82return ImmutableArray.Create(map(items[0]), map(items[1])); 85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2])); 88return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]), map(items[3])); 119return ImmutableArray.Create(map(items[0], arg)); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg)); 128return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg), map(items[3], arg)); 159return ImmutableArray.Create(map(items[0], 0, arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 168return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg));
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
Microsoft.CodeAnalysis.LanguageServer (3)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
35var watchedDirectoriesBuilder = ImmutableArray.CreateBuilder<WatchedDirectory>(watchedDirectories.Length); 36var watcherBuilder = ImmutableArray.CreateBuilder<FileSystemWatcher>(watchedDirectories.Length);
HostWorkspace\HostDiagnosticAnalyzerProvider.cs (1)
24_analyzerReferences = ImmutableArray.Create<(AnalyzerFileReference reference, string extensionId)>((
Microsoft.CodeAnalysis.LanguageServer.Protocol (51)
Extensions\ProtocolConversions.cs (38)
55{ WellKnownTags.Public, ImmutableArray.Create(LSP.CompletionItemKind.Keyword) }, 56{ WellKnownTags.Protected, ImmutableArray.Create(LSP.CompletionItemKind.Keyword) }, 57{ WellKnownTags.Private, ImmutableArray.Create(LSP.CompletionItemKind.Keyword) }, 58{ WellKnownTags.Internal, ImmutableArray.Create(LSP.CompletionItemKind.Keyword) }, 59{ WellKnownTags.File, ImmutableArray.Create(LSP.CompletionItemKind.File) }, 60{ WellKnownTags.Project, ImmutableArray.Create(LSP.CompletionItemKind.File) }, 61{ WellKnownTags.Folder, ImmutableArray.Create(LSP.CompletionItemKind.Folder) }, 62{ WellKnownTags.Assembly, ImmutableArray.Create(LSP.CompletionItemKind.File) }, 63{ WellKnownTags.Class, ImmutableArray.Create(LSP.CompletionItemKind.Class) }, 64{ WellKnownTags.Constant, ImmutableArray.Create(LSP.CompletionItemKind.Constant) }, 65{ WellKnownTags.Delegate, ImmutableArray.Create(LSP.CompletionItemKind.Class, LSP.CompletionItemKind.Delegate) }, 66{ WellKnownTags.Enum, ImmutableArray.Create(LSP.CompletionItemKind.Enum) }, 67{ WellKnownTags.EnumMember, ImmutableArray.Create(LSP.CompletionItemKind.EnumMember) }, 68{ WellKnownTags.Event, ImmutableArray.Create(LSP.CompletionItemKind.Event) }, 69{ WellKnownTags.ExtensionMethod, ImmutableArray.Create(LSP.CompletionItemKind.Method, LSP.CompletionItemKind.ExtensionMethod) }, 70{ WellKnownTags.Field, ImmutableArray.Create(LSP.CompletionItemKind.Field) }, 71{ WellKnownTags.Interface, ImmutableArray.Create(LSP.CompletionItemKind.Interface) }, 72{ WellKnownTags.Intrinsic, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 73{ WellKnownTags.Keyword, ImmutableArray.Create(LSP.CompletionItemKind.Keyword) }, 74{ WellKnownTags.Label, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 75{ WellKnownTags.Local, ImmutableArray.Create(LSP.CompletionItemKind.Variable) }, 76{ WellKnownTags.Namespace, ImmutableArray.Create(LSP.CompletionItemKind.Module, LSP.CompletionItemKind.Namespace) }, 77{ WellKnownTags.Method, ImmutableArray.Create(LSP.CompletionItemKind.Method) }, 78{ WellKnownTags.Module, ImmutableArray.Create(LSP.CompletionItemKind.Module) }, 79{ WellKnownTags.Operator, ImmutableArray.Create(LSP.CompletionItemKind.Operator) }, 80{ WellKnownTags.Parameter, ImmutableArray.Create(LSP.CompletionItemKind.Variable) }, 81{ WellKnownTags.Property, ImmutableArray.Create(LSP.CompletionItemKind.Property) }, 82{ WellKnownTags.RangeVariable, ImmutableArray.Create(LSP.CompletionItemKind.Variable) }, 83{ WellKnownTags.Reference, ImmutableArray.Create(LSP.CompletionItemKind.Reference) }, 84{ WellKnownTags.Structure, ImmutableArray.Create(LSP.CompletionItemKind.Struct) }, 85{ WellKnownTags.TypeParameter, ImmutableArray.Create(LSP.CompletionItemKind.TypeParameter) }, 86{ WellKnownTags.Snippet, ImmutableArray.Create(LSP.CompletionItemKind.Snippet) }, 87{ WellKnownTags.Error, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 88{ WellKnownTags.Warning, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 89{ WellKnownTags.StatusInformation, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 90{ WellKnownTags.AddReference, ImmutableArray.Create(LSP.CompletionItemKind.Text) }, 91{ WellKnownTags.NuGet, ImmutableArray.Create(LSP.CompletionItemKind.Text) } 102{ WellKnownTags.Deprecated, ImmutableArray.Create(LSP.CompletionItemTag.Deprecated) },
Features\CodeCleanup\DiagnosticSet.cs (1)
33: this(description, ImmutableArray.Create(diagnosticIds), isAnyDiagnosticIdExplicitlyEnabled: true)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (1)
168var builder = ImmutableArray.CreateBuilder<StateSet>();
Features\FindUsages\SimpleFindUsagesContext.cs (2)
23ImmutableArray.CreateBuilder<DefinitionItem>(); 26ImmutableArray.CreateBuilder<SourceReferenceItem>();
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
185suggestedActions = ImmutableArray.CreateBuilder<IUnifiedSuggestedAction>();
Handler\CodeActions\CodeActionHelpers.cs (1)
112var codeActionPathList = ImmutableArray.Create(codeAction.Title);
Handler\Diagnostics\DocumentPullDiagnosticHandler.cs (1)
60return ImmutableArray.Create(new PreviousPullResult(diagnosticsParams.PreviousResultId, diagnosticsParams.TextDocument));
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler.cs (1)
86return ImmutableArray.Create(new PreviousPullResult(diagnosticsParams.PreviousResultId, diagnosticsParams.TextDocument));
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
85return ImmutableArray.Create(codeSnippetsElement);
Handler\SpellCheck\DocumentSpellCheckHandler.cs (1)
28return ImmutableArray.Create(new PreviousPullResult(requestParams.PreviousResultId, requestParams.TextDocument));
RoslynLanguageServer.cs (1)
144var builder = ImmutableArray.CreateBuilder<BaseService>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (2)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length); 59var builder = ImmutableArray.CreateBuilder<(Type? RequestType, Type? ResponseType, Type RequestContextType)>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (28)
Completion\CompletionFeaturesTests.cs (2)
600var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>(); 930var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>();
Completion\CompletionTests.cs (1)
357completionParams, document, preselect: true, commitCharacters: ImmutableArray.Create(' ', '(', '[', '{', ';', '.')).ConfigureAwait(false);
Definitions\GoToDefinitionTests.cs (1)
94AssertLocationsEqual(ImmutableArray.Create(TestSpanMapper.MappedFileLocation), results);
Diagnostics\AbstractPullDiagnosticTestsBase.cs (7)
43builder.Add(LanguageNames.CSharp, ImmutableArray.Create( 50builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic))); 51builder.Add(InternalLanguageNames.TypeScript, ImmutableArray.Create<DiagnosticAnalyzer>(new MockTypescriptDiagnosticAnalyzer())); 291return ImmutableArray.Create(new TestDiagnosticResult(vsTextDocumentIdentifier, diagnostics.Value.Second.ResultId!, null)); 295return ImmutableArray.Create(new TestDiagnosticResult(vsTextDocumentIdentifier, diagnostics.Value.First.ResultId!, diagnostics.Value.First.Items)); 377public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 384return Task.FromResult(ImmutableArray.Create(
Diagnostics\AdditionalFileDiagnosticsTests.cs (2)
118=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create( 129=> ImmutableArray.Create(_descriptor);
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (4)
53builder.Add(LanguageNames.CSharp, ImmutableArray.Create( 57builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create( 93public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 105public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor);
Diagnostics\NonLocalDiagnosticTests.cs (2)
71=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create( 80public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(NonLocalDescriptor, CompilationEndDescriptor);
Diagnostics\PullDiagnosticTests.cs (3)
132public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 146public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 1095ImmutableArray.Create("HACK:2", $"TODO:{priString}", "UNDONE:2", "UnresolvedMergeConflict:3"));
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (2)
67=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create( 78=> ImmutableArray.Create(_descriptor);
References\FindImplementationsTests.cs (1)
97AssertLocationsEqual(ImmutableArray.Create(TestSpanMapper.MappedFileLocation), results);
Rename\RenameTests.cs (1)
180var expectedMappedRanges = ImmutableArray.Create(TestSpanMapper.MappedFileLocation.Range, TestSpanMapper.MappedFileLocation.Range);
SemanticTokens\AbstractSemanticTokensTests.cs (1)
119var convertedStringsBuilder = ImmutableArray.CreateBuilder<string>(data.Length / 5);
VSTypeScriptHandlerTests.cs (1)
123ImmutableArray.Create(InternalLanguageNames.TypeScript),
Microsoft.CodeAnalysis.PooledObjects.Package (2)
ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
Microsoft.CodeAnalysis.Rebuild (3)
CompilationOptionsReader.cs (3)
298var builder = ImmutableArray.CreateBuilder<SyntaxTree>(sourceFileCount); 324var builder = ImmutableArray.CreateBuilder<MetadataReference>(); 355var builder = ImmutableArray.CreateBuilder<MetadataReference>();
Microsoft.CodeAnalysis.Rebuild.UnitTests (7)
BasicDeterministicKeyBuilderTests.cs (1)
91var key = compilation.GetDeterministicKey(additionalTexts: ImmutableArray.Create<AdditionalText>(additionalText));
CSharpDeterministicKeyBuilderTests.cs (1)
196var key = compilation.GetDeterministicKey(additionalTexts: ImmutableArray.Create<AdditionalText>(additionalText));
DeterministicKeyBuilderTests.cs (5)
516.WithInstrumentationKinds(ImmutableArray.Create(kind)); 580(string, string) => ImmutableArray.Create(KeyValuePairUtil.Create(pathMapFrom, pathMapTo)), 728(string, string) => ImmutableArray.Create(KeyValuePairUtil.Create(pathMapFrom, pathMapTo)), 735ImmutableArray.Create<AdditionalText>(additionalText), 760ImmutableArray.Create<AdditionalText>(additionalText));
Microsoft.CodeAnalysis.Remote.ServiceHub (4)
Host\RemoteWorkspace.SolutionCreator.cs (2)
490lazyDocumentsToAdd ??= ImmutableArray.CreateBuilder<DocumentInfo>(); 511lazyDocumentsToRemove ??= ImmutableArray.CreateBuilder<DocumentId>();
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (2)
490var projectBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 491var hostBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>();
Microsoft.CodeAnalysis.Scripting (20)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
94_noShadowCopyDirectories = ImmutableArray.CreateRange(noShadowCopyDirectories.Select(FileUtilities.NormalizeDirectoryPath)); 465moduleBuilder = ImmutableArray.CreateBuilder<ModuleMetadata>(); 478var modules = (moduleBuilder != null) ? moduleBuilder.ToImmutable() : ImmutableArray.Create(manifestModule);
Hosting\CommandLine\CommandLineRunner.cs (3)
168references: ImmutableArray.CreateRange(resolvedReferences), 328var newReferenceSearchPaths = ImmutableArray.CreateRange(globals.ReferencePaths); 329var newSourceSearchPaths = ImmutableArray.CreateRange(globals.SourcePaths);
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (6)
30MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("<implicit>")); 45internal static ImmutableArray<string> AssemblyExtensions = ImmutableArray.Create(".dll", ".exe"); 161return ImmutableArray.Create(result); 170return ImmutableArray.Create(CreateFromFile(resolvedPath, properties)); 181return ImmutableArray.Create(CreateFromFile(path, properties)); 190return ImmutableArray.Create(result);
Script.cs (3)
240MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("<host>")).WithRecursiveAliases(true); 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));
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (2)
38? ImmutableArray.Create(ProcessorArchitecture.None, ProcessorArchitecture.MSIL, ProcessorArchitecture.X86) 39: ImmutableArray.Create(ProcessorArchitecture.None, ProcessorArchitecture.MSIL, ProcessorArchitecture.Amd64);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
38s_rootLocations = ImmutableArray.Create(GetLocation(ASM_CACHE.ROOT), GetLocation(ASM_CACHE.ROOT_EX));
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
133ImmutableArray.Create(gacAssemblyName.GetPublicKeyToken()));
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (2)
GlobalAssemblyCacheTests.cs (1)
33names = gac.GetAssemblyIdentities(new AssemblyName("mscorlib"), ImmutableArray.Create(ProcessorArchitecture.MSIL, ProcessorArchitecture.X86)).ToArray();
MetadataShadowCopyProviderTests.cs (1)
31: ImmutableArray.Create(
Microsoft.CodeAnalysis.Scripting.TestUtilities (2)
TestRuntimeMetadataReferenceResolver.cs (2)
17private static readonly MetadataReferenceProperties s_resolvedMissingAssemblyReferenceProperties = MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("<implicit>")); 53return ImmutableArray.Create(MetadataReference.CreateFromFile(reference, properties));
Microsoft.CodeAnalysis.Scripting.UnitTests (8)
RuntimeMetadataReferenceResolverTests.cs (3)
31new RelativePathResolver(ImmutableArray.Create(directory.Path), directory.Path), 32packageResolver: new PackageResolver(ImmutableDictionary<string, ImmutableArray<string>>.Empty.Add("nuget:N/1.0", ImmutableArray.Create(assembly1.Path, assembly2.Path))), 51searchPaths: ImmutableArray.Create(directory.Path),
ScriptOptionsTests.cs (5)
87Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((MetadataReference)null))); 93Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((Assembly)null))); 99Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((string)null))); 129Assert.Throws<ArgumentNullException>("imports[0]", () => options.AddImports(ImmutableArray.Create((string)null))); 150Assert.Throws<ArgumentNullException>("imports[0]", () => options.WithImports(ImmutableArray.Create((string)null)));
Microsoft.CodeAnalysis.Test.Utilities (126)
AssemblyLoadTestFixture.cs (1)
416var realSciReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location);
CommonTestBase.cs (1)
210return ImmutableArray.Create<byte>(File.ReadAllBytes(path));
Compilation\IRuntimeEnvironment.cs (1)
76return ImmutableArray.Create(bytes);
Diagnostics\BoxingOperationAnalyzer.cs (1)
35get { return ImmutableArray.Create(BoxingDescriptor); }
Diagnostics\CommonDiagnosticAnalyzers.cs (52)
60return ImmutableArray.Create(Descriptor1, Descriptor2); 518=> ImmutableArray.Create(Descriptor1, Descriptor2); 555return ImmutableArray.Create(EnabledRule, DisabledRule); 602return ImmutableArray.Create(CodeBlockTopLevelRule, CodeBlockPerCompilationRule); 649public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptor); 679ImmutableArray.Create(Rule); 718ImmutableArray.Create(Rule); 743public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DummyRule); 760public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 785ImmutableArray.Create(Rule); 821public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 832public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create((DiagnosticDescriptor)null); 852public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 873public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 896public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 959public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 998public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1037public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1069public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1102public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1136public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1199public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1327public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1385public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1416public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1461public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1518public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning, Error, Summary, Summary2); 1562ImmutableArray.Create(ClassDeclarationSyntaxKind)); 1691public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1792public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(GeneratedCodeDescriptor, NonGeneratedCodeDescriptor, UniqueTextFileDescriptor, NumberOfUniqueTextFileDescriptor); 1855public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ParameterDescriptor); 1963return ImmutableArray.Create( 2169=> ImmutableArray.Create(SuppressionDescriptor); 2186var builder = ImmutableArray.CreateBuilder<SuppressionDescriptor>(); 2231=> ImmutableArray.Create(SuppressionDescriptor); 2274=> ImmutableArray.Create(_descriptor); 2302=> ImmutableArray.Create(_supportedDescriptor); 2334=> ImmutableArray.Create(_supportedDescriptor); 2366=> ImmutableArray.Create(_descriptor1, _descriptor2); 2416public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_rule); 2482public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2532public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2560public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2592public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2638public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2679public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2727public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2875public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2922public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 3006public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 3096public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 3237public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
39get { return ImmutableArray.Create(LocalCouldHaveMoreSpecificTypeDescriptor, FieldCouldHaveMoreSpecificTypeDescriptor); }
Diagnostics\DiagnosticExtensions.cs (5)
404builder.Add(LanguageNames.CSharp, ImmutableArray.Create(GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp))); 405builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic))); 412return new AnalyzerImageReference(ImmutableArray.Create(analyzer), display: analyzer.GetType().FullName); 418builder.Add(LanguageNames.CSharp, ImmutableArray.Create(GetCompilerDiagnosticAnalyzerReference(LanguageNames.CSharp))); 419builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(GetCompilerDiagnosticAnalyzerReference(LanguageNames.VisualBasic)));
Diagnostics\EmptyArrayAnalyzer.cs (1)
40get { return ImmutableArray.Create(UseArrayEmptyDescriptor); }
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
31get { return ImmutableArray.Create(FieldCouldBeReadOnlyDescriptor); }
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
31get { return ImmutableArray.Create(LocalCouldBeConstDescriptor); }
Diagnostics\OperationTestAnalyzer.cs (35)
48get { return ImmutableArray.Create(InvalidExpressionDescriptor, InvalidStatementDescriptor, IsInvalidDescriptor); } 94get { return ImmutableArray.Create(ExpressionDescriptor); } 136get { return ImmutableArray.Create(BigForDescriptor); } 327return ImmutableArray.Create(SparseSwitchDescriptor, 531return ImmutableArray.Create(BigParamArrayArgumentsDescriptor, 622get { return ImmutableArray.Create(SeventeenDescriptor); } 659get { return ImmutableArray.Create(NullArgumentsDescriptor); } 707get { return ImmutableArray.Create(DoNotUseFieldInitializerDescriptor, DoNotUsePropertyInitializerDescriptor); } 744get { return ImmutableArray.Create(DoNotUseMemberAssignmentDescriptor); } 786get { return ImmutableArray.Create(DoNotUseLargeListOfArrayInitializersDescriptor); } 834get { return ImmutableArray.Create(TooManyLocalVarDeclarationsDescriptor, LocalVarInitializedDeclarationDescriptor); } 891get { return ImmutableArray.Create(HasDefaultCaseDescriptor, MultipleCaseClausesDescriptor); } 946public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ImplicitInstanceDescriptor, ExplicitInstanceDescriptor); 1021ImmutableArray.Create(EventReferenceDescriptor, 1093public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LongParamsDescriptor, InvalidConstructorDescriptor); 1174public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(EqualsValueDescriptor); 1218get { return ImmutableArray.Create(NoneOperationDescriptor); } 1254ImmutableArray.Create(AddressOfDescriptor, InvalidAddressOfReferenceDescriptor); 1304ImmutableArray.Create(LambdaExpressionDescriptor, 1368return ImmutableArray.Create(StaticMemberDescriptor, 1442public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LabelDescriptor, GotoDescriptor); 1508public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(OperatorAddMethodDescriptor, OperatorMinusMethodDescriptor, DoubleMultiplyDescriptor, BooleanNotDescriptor); 1562=> ImmutableArray.Create(BinaryUserDefinedOperatorDescriptor); 1601=> ImmutableArray.Create(BinaryOperatorDescriptor, UnaryOperatorDescriptor); 1686get { return ImmutableArray.Create(NullOperationSyntaxDescriptor, ParamsArrayOperationDescriptor); } 1776public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(InvalidBinaryDescriptor, 1837get { return ImmutableArray.Create(ConditionalAccessOperationDescriptor, ConditionalAccessInstanceOperationDescriptor); } 1886get { return ImmutableArray.Create(InvalidConversionExpressionDescriptor); } 1918get { return ImmutableArray.Create(ForLoopConditionCrashDescriptor); } 1964=> ImmutableArray.Create(UnaryTrueDescriptor, UnaryFalseDescriptor); 2007get { return ImmutableArray.Create(AssignmentOperationDescriptor, AssignmentSyntaxDescriptor); } 2043get { return ImmutableArray.Create(LiteralDescriptor); } 2072=> ImmutableArray.Create(OperationActionDescriptor); 2100=> ImmutableArray.Create(OperationActionDescriptor); 2132=> ImmutableArray.Create(GetOperationDescriptor);
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (7)
34return ImmutableArray.Create(s_rule); 84return ImmutableArray.Create(s_rule); 109return ImmutableArray.Create(s_rule); 131return ImmutableArray.Create(s_rule); 196return ImmutableArray.Create(s_rule); 235return ImmutableArray.Create(s_rule); 271return ImmutableArray.Create(s_rule);
Diagnostics\TestDiagnosticAnalyzer.cs (2)
30return ImmutableArray.CreateRange(Enum.GetValues(typeof(T)).Cast<T>()); 76return ImmutableArray.Create(DefaultDiagnostic);
InstrumentationChecker.cs (1)
322var peImage = compilation.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)));
MarkedSource\SourceWithMarkedNodes.cs (1)
47MarkedSpans = ImmutableArray.CreateRange(GetSpansRecursive(markedSource, 0, getSyntaxKind));
Metadata\AggregatedMetadataReader.cs (1)
29Readers = ImmutableArray.CreateRange(readers);
Metadata\ILValidation.cs (2)
299ImmutableArray.Create<ILVisualizer.LocalInfo>(), 300ImmutableArray.Create<ILVisualizer.HandlerSpan>());
Mocks\TestMetadataReference.cs (1)
61: this(ImmutableArray.Create(metadataBytes), display)
Mocks\TestMetadataReferenceResolver.cs (1)
53return map.TryGetValue(reference, out var result) ? ImmutableArray.Create(result) : ImmutableArray<PortableExecutableReference>.Empty;
Platform\Custom\SigningTestHelpers.cs (1)
38internal static readonly ImmutableArray<byte> PublicKey = ImmutableArray.Create(TestResources.General.snPublicKey);
SourceGeneration\TestGenerators.cs (2)
96return ImmutableArray.Create((hint, string.IsNullOrWhiteSpace(source) 107return ImmutableArray.Create((hint, string.IsNullOrWhiteSpace(source)
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 (229)
AnalyzerAssemblyLoaderTests.cs (1)
1203var immutableReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location);
Analyzers\AnalyzerConfigTests.cs (4)
110var set = AnalyzerConfigSet.Create(ImmutableArray.Create(config)); 132var set = AnalyzerConfigSet.Create(ImmutableArray.Create(config)); 2372var set = AnalyzerConfigSet.Create(ImmutableArray.Create(config)); 2387var set = AnalyzerConfigSet.Create(ImmutableArray.Create(config));
Analyzers\AnalyzerFileReferenceTests.cs (7)
150var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 169var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 186var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 246var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 264var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 286var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 497var builder = ImmutableArray.CreateBuilder<ISourceGenerator>();
CachingLookupTests.cs (12)
164s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 170s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 177s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 196s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 202s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 209s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 227var look2 = new CachingDictionary<string, int>(s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 232look2 = new CachingDictionary<string, int>(s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 238look2 = new CachingDictionary<string, int>(s => dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(), 263return dict.TryGetValue(s, out var value) ? value : ImmutableArray.Create<int>(); 313return ImmutableArray.Create<FullyPopulateRaceHelper>(new FullyPopulateRaceHelper()); 356return ImmutableArray.Create<FullyPopulateRaceHelper>(new FullyPopulateRaceHelper());
Collections\ImmutableArrayExtensionsTests.cs (90)
25a = ImmutableArray.Create<int>(2); 29Assert.Throws<ArgumentNullException>(() => ImmutableArray.CreateRange<int>((IEnumerable<int>)null)); 31a = ImmutableArray.CreateRange<int>(Enumerable.Range(1, 2)); 59nullOrEmpty = ImmutableArray.Create<int>(); 86var empty = ImmutableArray.Create<int>(); 117var singleton1 = ImmutableArray.Create<int>(1); 118var singleton2 = ImmutableArray.Create<int>(2); 144Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single()); 145Assert.Equal(1, ImmutableArray.Create<int>(1).Single()); 146Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2).Single()); 151Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single(isOdd)); 152Assert.Equal(1, ImmutableArray.Create<int>(1, 2).Single(isOdd)); 153Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single(isOdd)); 160Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single((x, a) => x == a, 1)); 161Assert.Equal(1, ImmutableArray.Create<int>(1).Single((x, a) => x == a, 1)); 162Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 1).Single((x, a) => x == a, 1)); 165Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single((x, a) => x % a == 1, 2)); 166Assert.Equal(1, ImmutableArray.Create<int>(1, 2).Single((x, a) => x % a == 1, 2)); 167Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single((x, a) => x % a == 1, 2)); 190var notnull = ImmutableArray.Create<int>(); 265var empty = ImmutableArray.Create<int>(); 266var a = ImmutableArray.Create<int>(0, 2, 4); 271Assert.True(a.Concat(a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 4, 0, 2, 4))); 277var empty = ImmutableArray.Create<int>(); 278var a = ImmutableArray.Create<int>(0, 2, 4); 283Assert.True(a.AddRange(a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 4, 0, 2, 4))); 288Assert.True(a.AddRange((IEnumerable<int>)a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 4, 0, 2, 4))); 294var empty = ImmutableArray.Create<int>(); 295var a = ImmutableArray.Create<int>(0, 2, 4); 301Assert.True(a.InsertRange(2, a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 0, 2, 4, 4))); 338var a = ImmutableArray.Create<string>("A", "B", "C"); 339var b = ImmutableArray.Create<string>("A", "b", "c"); 340var c = ImmutableArray.Create<string>("A", "b"); 348var r = ImmutableArray.Create<int>(1, 2, 3); 353var s = ImmutableArray.Create<int>(10, 20, 30); 360var empty = ImmutableArray.Create<object>(); 368var a = ImmutableArray.Create<int>(3, 2, 1, 0); 369var b = ImmutableArray.Create<int>(0, 1, 2, 3); 370var c = ImmutableArray.Create<int>(2, 2, 2, 2); 378AssertEx.Equal(new[] { 10 }, ImmutableArray.Create(1).SelectAsArray(i => 10 * i)); 379AssertEx.Equal(new[] { 10, 20 }, ImmutableArray.Create(1, 2).SelectAsArray(i => 10 * i)); 380AssertEx.Equal(new[] { 10, 20, 30 }, ImmutableArray.Create(1, 2, 3).SelectAsArray(i => 10 * i)); 381AssertEx.Equal(new[] { 10, 20, 30, 40 }, ImmutableArray.Create(1, 2, 3, 4).SelectAsArray(i => 10 * i)); 382AssertEx.Equal(new[] { 10, 20, 30, 40, 50 }, ImmutableArray.Create(1, 2, 3, 4, 5).SelectAsArray(i => 10 * i)); 390var array = ImmutableArray.Create(1, 2, 3, 4, 5); 399var empty = ImmutableArray.Create<object>(); 402var single1 = ImmutableArray.Create(1); 403var single2 = ImmutableArray.Create(10); 404var single3 = ImmutableArray.Create(11); 407var pair1 = ImmutableArray.Create(1, 2); 408var pair2 = ImmutableArray.Create(10, 11); 409var pair3 = ImmutableArray.Create(11, 13); 412var triple1 = ImmutableArray.Create(1, 2, 3); 413var triple2 = ImmutableArray.Create(10, 11, 12); 414var triple3 = ImmutableArray.Create(11, 13, 15); 417var quad1 = ImmutableArray.Create(1, 2, 3, 4); 418var quad2 = ImmutableArray.Create(10, 11, 12, 13); 419var quad3 = ImmutableArray.Create(11, 13, 15, 17); 422var quin1 = ImmutableArray.Create(1, 2, 3, 4, 5); 423var quin2 = ImmutableArray.Create(10, 11, 12, 13, 14); 424var quin3 = ImmutableArray.Create(11, 13, 15, 17, 19); 431var empty = ImmutableArray.Create<object>(); 434var single1 = ImmutableArray.Create(1); 435var single2 = ImmutableArray.Create(10); 436var single3 = ImmutableArray.Create(13); 439var pair1 = ImmutableArray.Create(1, 2); 440var pair2 = ImmutableArray.Create(10, 11); 441var pair3 = ImmutableArray.Create(13, 16); 444var triple1 = ImmutableArray.Create(1, 2, 3); 445var triple2 = ImmutableArray.Create(10, 11, 12); 446var triple3 = ImmutableArray.Create(13, 16, 19); 449var quad1 = ImmutableArray.Create(1, 2, 3, 4); 450var quad2 = ImmutableArray.Create(10, 11, 12, 13); 451var quad3 = ImmutableArray.Create(13, 16, 19, 22); 454var quin1 = ImmutableArray.Create(1, 2, 3, 4, 5); 455var quin2 = ImmutableArray.Create(10, 11, 12, 13, 14); 456var quin3 = ImmutableArray.Create(13, 16, 19, 22, 25); 463var empty = ImmutableArray.Create<object>(); 469var a = ImmutableArray.Create<int>(0, 1, 2, 3, 4, 5); 473Assert.True(a.WhereAsArray(i => false).SequenceEqual(ImmutableArray.Create<int>())); 475Assert.True(a.WhereAsArray(i => i > 0).SequenceEqual(ImmutableArray.Create<int>(1, 2, 3, 4, 5))); 477Assert.True(a.WhereAsArray(i => i < 5).SequenceEqual(ImmutableArray.Create<int>(0, 1, 2, 3, 4))); 479Assert.True(a.WhereAsArray(i => i == 0).SequenceEqual(ImmutableArray.Create<int>(0))); 481Assert.True(a.WhereAsArray(i => i == 5).SequenceEqual(ImmutableArray.Create<int>(5))); 483Assert.True(a.WhereAsArray(i => i < 3).SequenceEqual(ImmutableArray.Create<int>(0, 1, 2))); 485Assert.True(a.WhereAsArray(i => i > 2).SequenceEqual(ImmutableArray.Create<int>(3, 4, 5))); 487Assert.True(a.WhereAsArray(i => i % 2 == 0).SequenceEqual(ImmutableArray.Create<int>(0, 2, 4))); 489Assert.True(a.WhereAsArray(i => i % 2 == 1).SequenceEqual(ImmutableArray.Create<int>(1, 3, 5))); 496Assert.Same(x, ImmutableArray.Create<object>(x).WhereAsArray((o, arg) => o == arg, x)[0]); 498var a = ImmutableArray.Create(0, 1, 2, 3, 4, 5);
Collections\ImmutableListTestBase.cs (1)
475var reverseSorted = System.Collections.Immutable.ImmutableArray.CreateRange(Enumerable.Range(1, 150).Select(n => n * 2).Reverse());
CryptoBlobParserTests.cs (6)
27var key = ImmutableArray.Create(TestResources.General.snKey); 70var key = ImmutableArray.Create(TestResources.General.snKey2); 113var key = ImmutableArray.Create(TestResources.General.snKey); 124var key = ImmutableArray.Create(TestResources.General.snKey2); 135var key = ImmutableArray.Create(TestResources.General.snPublicKey); 153var publicKeyBlob = ImmutableArray.Create(buf);
Diagnostics\AnalysisContextInfoTests.cs (1)
68public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_rule);
Diagnostics\CompilationWithAnalyzersTests.cs (1)
60var analyzers = ImmutableArray.Create(analyzer);
Diagnostics\DiagnosticLocalizationTests.cs (1)
378return ImmutableArray.Create(_descriptor);
Diagnostics\OperationTests.cs (5)
37arguments = ImmutableArray.Create((IOperation)null); 45arguments = ImmutableArray.Create((IOperation)null); 55arguments = ImmutableArray.Create((IOperation)null); 56argumentNames = ImmutableArray.Create(name); 57argumentRefKinds = ImmutableArray.Create(refKind);
Diagnostics\SuppressMessageAttributeCompilerTests.cs (1)
63return ImmutableArray.Create(TestBase.MscorlibRef, compRef, TestBase.ValueTupleRef);
Emit\CustomDebugInfoTests.cs (15)
154var e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0x01, 0x68, 0xff }), ImmutableArray<byte>.Empty)); 157e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0x01, 0x68, 0xff, 0xff, 0xff, 0xff }), ImmutableArray<byte>.Empty)); 160e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0xff, 0xff, 0xff, 0xff }), ImmutableArray<byte>.Empty)); 171e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(largeData), ImmutableArray<byte>.Empty)); 196var slots = ImmutableArray.Create( 221var closures = ImmutableArray.Create( 226var lambdas = ImmutableArray.Create( 252var lambdas = ImmutableArray.Create(new LambdaDebugInfo(20, new DebugId(0, 0), LambdaDebugInfo.StaticClosureOrdinal)); 303stateMachineStates: ImmutableArray.Create( 340compressedStateMachineStateMap: ImmutableArray.Create<byte>(0x06, 0x00, 0x02, 0x20, 0x04, 0x10, 0x00, 0x10, 0x06, 0x20, 0x08, 0x20, 0x0A, 0x30))); 346var slots = ImmutableArray.Create( 350var closures = ImmutableArray.Create( 355var lambdas = ImmutableArray.Create( 654(LocalName: "a", SlotIndex: 1, ScopeStart: 0, ScopeEnd: 0, Names: ImmutableArray.Create("e")), 655(LocalName: "b", SlotIndex: -1, ScopeStart: 0, ScopeEnd: 10, Names: ImmutableArray.Create("u", null, "v")),
Emit\EmitOptionsTests.cs (3)
67TestProperty((old, value) => old.WithInstrumentationKinds(value), opt => opt.InstrumentationKinds, ImmutableArray.Create(InstrumentationKind.TestCoverage)); 126instrumentationKinds: ImmutableArray.Create(InstrumentationKind.TestCoverage)); 140instrumentationKinds: ImmutableArray.Create(InstrumentationKind.TestCoverage),
Emit\SemanticEditTests.cs (3)
38var instrumentation = new MethodInstrumentation() { Kinds = ImmutableArray.Create(InstrumentationKind.TestCoverage) }; 47instrumentation: new MethodInstrumentation() { Kinds = ImmutableArray.Create(InstrumentationKindExtensions.LocalStateTracing) })); 50instrumentation: new MethodInstrumentation() { Kinds = ImmutableArray.Create((InstrumentationKind)123) }));
FileSystem\RelativePathResolverTests.cs (2)
38searchPaths: ImmutableArray.Create<string>(), 171ImmutableArray.Create(dir1.Path, dir2.Path),
InternalUtilities\OneOrManyTests.cs (38)
47Verify(OneOrMany.Create(ImmutableArray.Create(2)), 2); 50Verify(new OneOrMany<int>(ImmutableArray.Create(2)), 2); 65Verify(OneOrMany.Create(ImmutableArray.Create(1, 2, 3)).Add(4), 1, 2, 3, 4); 66Verify(OneOrMany.Create(ImmutableArray.Create(1, 2, 3, 4)), 1, 2, 3, 4); 68Verify(new OneOrMany<int>(ImmutableArray.Create(1, 2, 3)).Add(4), 1, 2, 3, 4); 69Verify(new OneOrMany<int>(ImmutableArray.Create(1, 2, 3, 4)), 1, 2, 3, 4); 71Verify(OneOrMany.Create(ImmutableArray.Create(1)).Add(4), 1, 4); 72Verify(OneOrMany.Create(ImmutableArray.Create(1)), 1); 85Assert.True(OneOrMany.Create(ImmutableArray.Create(1)).Contains(1)); 86Assert.False(OneOrMany.Create(ImmutableArray.Create(1)).Contains(0)); 88Assert.True(OneOrMany.Create(ImmutableArray.Create(1, 2)).Contains(1)); 89Assert.True(OneOrMany.Create(ImmutableArray.Create(1, 2)).Contains(2)); 90Assert.False(OneOrMany.Create(ImmutableArray.Create(1, 2)).Contains(0)); 102Verify(OneOrMany.Create(ImmutableArray.Create(1, 1, 1, 2)).RemoveAll(1), 2); 110Verify(OneOrMany.Create(ImmutableArray.Create(1)).Select(i => i + 1), 2); 111Verify(OneOrMany.Create(ImmutableArray.Create(1, 2)).Select(i => i + 1), 2, 3); 119Verify(OneOrMany.Create(ImmutableArray.Create(1)).Select((i, a) => i + a, 1), 2); 120Verify(OneOrMany.Create(ImmutableArray.Create(1, 2)).Select((i, a) => i + a, 1), 2, 3); 129Assert.Equal(1, OneOrMany.Create(ImmutableArray.Create(1)).FirstOrDefault(i => i < 2)); 130Assert.Equal(0, OneOrMany.Create(ImmutableArray.Create(1)).FirstOrDefault(i => i > 2)); 131Assert.Equal(1, OneOrMany.Create(ImmutableArray.Create(1, 3)).FirstOrDefault(i => i < 2)); 132Assert.Equal(3, OneOrMany.Create(ImmutableArray.Create(1, 3)).FirstOrDefault(i => i > 2)); 141Assert.Equal(1, OneOrMany.Create(ImmutableArray.Create(1)).FirstOrDefault((i, a) => i < a, 2)); 142Assert.Equal(0, OneOrMany.Create(ImmutableArray.Create(1)).FirstOrDefault((i, a) => i > a, 2)); 143Assert.Equal(1, OneOrMany.Create(ImmutableArray.Create(1, 3)).FirstOrDefault((i, a) => i < a, 2)); 144Assert.Equal(3, OneOrMany.Create(ImmutableArray.Create(1, 3)).FirstOrDefault((i, a) => i > a, 2)); 211var quad = OneOrMany.Create(ImmutableArray.Create<int>(10, 20, 30, 40)); 233Assert.False(OneOrMany.Create(1, 2).SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3)))); 234Assert.True(OneOrMany.Create(1).SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1)))); 252Assert.False(new[] { 1, 2 }.SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3)))); 255Assert.False(ImmutableArray.Create(1).SequenceEqual(OneOrMany<int>.Empty)); 256Assert.False(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany<int>.Empty)); 257Assert.True(ImmutableArray.Create(1).SequenceEqual(OneOrMany.Create(1))); 258Assert.False(ImmutableArray.Create(1).SequenceEqual(OneOrMany.Create(2))); 259Assert.True(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany.Create(1, 2))); 260Assert.False(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany.Create(1, 0))); 261Assert.False(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3))));
MetadataReferences\AssemblyMetadataTests.cs (3)
30Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(ImmutableArray.Create<ModuleMetadata>())); 38Assert.Throws<ArgumentNullException>(() => AssemblyMetadata.Create(ImmutableArray.Create(m1, m2, null))); 39Assert.Throws<ArgumentNullException>(() => AssemblyMetadata.Create(ImmutableArray.Create((ModuleMetadata)null)));
MetadataReferences\MetadataReferencePropertiesTests.cs (9)
25m = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases: ImmutableArray.Create("\\/[.'\":_)??\t\n*#$@^%*&)", "goo"), embedInteropTypes: true); 43Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("blah"))); 45Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create(""))); 46Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("x\0x"))); 48Assert.Throws<ArgumentException>(() => MetadataReferenceProperties.Module.WithAliases(ImmutableArray.Create("blah"))); 56var a = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: true); 62Assert.Equal(a.WithAliases(new[] { "goo", "aaa" }), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("goo", "aaa"), embedInteropTypes: true)); 63Assert.Equal(a.WithEmbedInteropTypes(false), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: false)); 64Assert.Equal(a.WithRecursiveAliases(true), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: true, hasRecursiveAliases: true));
MetadataReferences\MetadataReferenceTests.cs (9)
172var props = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true, hasRecursiveAliases: true); 216var props = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true, hasRecursiveAliases: true); 225var r = (PortableExecutableReference)MetadataReference.CreateFromAssemblyInternal(assembly, new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true), documentation: doc); 230AssertEx.Equal(ImmutableArray.Create("a", "b"), r.Properties.Aliases); 292aliases: ImmutableArray.Create("a"), 309var r3 = r.WithAliases(ImmutableArray.Create("b", "c")); 330var r6 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 358var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 389var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true));
SourceFileResolverTest.cs (6)
34ImmutableArray.Create(""), 36ImmutableArray.Create(KeyValuePairUtil.Create<string, string>("key", null))); 46ImmutableArray.Create(""), 48ImmutableArray.Create(KeyValuePairUtil.Create<string, string>("key", ""))); 57ImmutableArray.Create(""), 59ImmutableArray.Create(KeyValuePairUtil.Create<string, string>("key", "value")));
StrongNameProviderTests.cs (4)
36searchPaths: ImmutableArray.Create(subdir)); 37var subdirSearchPath = ImmutableArray.Create(subdir); 44var searchPathsSP = ImmutableArray.Create(@"C:\goo", dir, subdir); 61var searchPathsNullBaseSP = ImmutableArray.Create(dir, subdir);
Text\SourceTextTests.cs (3)
115var checksumNoBOM = ImmutableArray.Create<byte>(0xa, 0xa, 0x9f, 0x2a, 0x67, 0x72, 0x94, 0x25, 0x57, 0xab, 0x53, 0x55, 0xd7, 0x6a, 0xf4, 0x42, 0xf8, 0xf6, 0x5e, 0x1); 116var checksumBOM = ImmutableArray.Create<byte>(0xb2, 0x19, 0x0, 0x9b, 0x61, 0xce, 0xcd, 0x50, 0x7b, 0x2e, 0x56, 0x3c, 0xc0, 0xeb, 0x96, 0xe2, 0xa1, 0xd9, 0x3f, 0xfc); 118var expectedContentHash = ImmutableArray.Create<byte>(0xa9, 0x94, 0xb1, 0x1f, 0x7e, 0x49, 0x29, 0x4d, 0xd4, 0x90, 0xe0, 0x6e, 0xc8, 0xcc, 0x3c, 0xdd);
Text\TextChangeTests.cs (4)
590return new LargeText(ImmutableArray.Create(chunks), Encoding.UTF8, default(ImmutableArray<byte>), SourceHashAlgorithms.Default, default(ImmutableArray<byte>)); 925var oldChanges = ImmutableArray.Create( 931var newChanges = ImmutableArray.Create( 940var expected = ImmutableArray.Create(
Microsoft.CodeAnalysis.VisualBasic (637)
Binding\Binder_Conversions.vb (3)
391Construct(ImmutableArray.Create(Of TypeSymbol)(targetType)) 1154arguments:=ImmutableArray.Create(Of BoundExpression)(argument), 1459ImmutableArray.Create(anonymousDelegateType.DelegateInvokeMethod),
Binding\Binder_Delegates.vb (3)
204ImmutableArray.Create(boundArguments), 1107ImmutableArray.Create(unconstructedTargetMethod), 1271statementList = ImmutableArray.Create(returnstmt)
Binding\Binder_Diagnostics.vb (1)
43If(nodes.IsEmpty, ImmutableArray(Of BoundExpression).Empty, ImmutableArray.Create(nodes)),
Binding\Binder_Expressions.vb (10)
297Return New BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), resultType, hasErrors:=True) 305Return New BoundBadExpression(node, resultKind, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), resultType, hasErrors:=True) 326Return New BoundBadExpression(wrappedExpression.Syntax, resultKind, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(wrappedExpression), wrappedExpression.Type, hasErrors:=True) 337ImmutableArray.Create(BindRValue(arguments(0).Expression, diagnostics)), 1665initializers = ImmutableArray.Create(Of BoundExpression)(arrayInitialization) 3134If(receiver IsNot Nothing, ImmutableArray.Create(receiver), ImmutableArray(Of BoundExpression).Empty), 3743ImmutableArray.Create( 3768Dim boundArguments = ImmutableArray.Create(Of BoundExpression)(arg) 3792boundArguments:=ImmutableArray.Create(Of BoundExpression)(arg), 3824ImmutableArray.Create(
Binding\Binder_Initializers.vb (3)
247ImmutableArray.Create(Of FieldSymbol)(fieldSymbol), 478ImmutableArray.Create(Of FieldSymbol)(fieldSymbol), 532ImmutableArray.Create(boundInitValue),
Binding\Binder_Invocation.vb (3)
307ImmutableArray.Create(Of MethodSymbol)(delegateInvoke), 1627childBoundNodes = ImmutableArray.Create(Of BoundExpression)(groupOpt) 3268ImmutableArray.Create(Of BoundExpression)(argument),
Binding\Binder_Lambda.vb (1)
469ImmutableArray.Create(Of BoundStatement)(boundReturn),
Binding\Binder_ObjectInitializer.vb (2)
130ImmutableArray.Create(constructorSymbol), LookupResultKind.Good, Nothing, 495ImmutableArray.Create(Of Symbol)(methodResult.Candidate.UnderlyingSymbol),
Binding\Binder_Operators.vb (9)
604ImmutableArray.Create(Of MethodSymbol)( 608ImmutableArray.Create(Of BoundExpression)(left, right), 618ImmutableArray.Create(Of BoundExpression)(left, right), 746PassArguments(node, bitwiseAnalysis, ImmutableArray.Create(Of BoundExpression)(left, right), diagnostics) 753ImmutableArray.Create(Of MethodSymbol)( 757ImmutableArray.Create(Of BoundExpression)(leftPlaceholder, argumentInfo.Arguments(1)), 1255ImmutableArray.Create(Of MethodSymbol)( 1259ImmutableArray.Create(Of BoundExpression)(operand), 1269ImmutableArray.Create(Of BoundExpression)(operand),
Binding\Binder_Query.vb (77)
222ImmutableArray.Create(Of Binder)(intoBinder), 239ImmutableArray.Create(Of Binder)(intoBinder), 272ImmutableArray.Create(Of Binder)(intoBinder), 316ImmutableArray.Create(letSelectorParam)) 346underlyingExpression = BadExpression(aggregate, ImmutableArray.Create(Of BoundExpression)(source, letSelectorLambda), 358ImmutableArray.Create(Of BoundExpression)(letSelectorLambda), 404ImmutableArray.Create(Of Binder)(firstSelectSelectorBinder, intoBinder), 434ImmutableArray.Create(selectSelectorParam)) 541underlyingExpression = BadExpression(aggregate, ImmutableArray.Create(Of BoundExpression)(letOperator, selectSelectorLambda), 553ImmutableArray.Create(Of BoundExpression)(selectSelectorLambda), 562ImmutableArray.Create(Of Binder)(firstSelectSelectorBinder, intoBinder), 598ImmutableArray.Create(param)) 624ImmutableArray.Create(Of BoundExpression)(selectorLambda), 662ImmutableArray.Create(param)) 685boundCallOrBadExpression = BadExpression(clauseSyntax, ImmutableArray.Create(Of BoundExpression)(source, selectorLambda), 695ImmutableArray.Create(Of BoundExpression)(selectorLambda), 704ImmutableArray.Create(Of Binder)(selectorBinder), 781ImmutableArray.Create(Me), 799ImmutableArray.Create(param)) 822boundCallOrBadExpression = BadExpression(variable, ImmutableArray.Create(Of BoundExpression)(source, selectorLambda), 841ImmutableArray.Create(Of BoundExpression)(selectorLambda), 850ImmutableArray.Create(Of Binder)(selectorBinder), 986ImmutableArray.Create(rangeVar), 988ImmutableArray.Create(Me), 996ImmutableArray.Create(Me), 1024ImmutableArray.Create(manySelectorParam)) 1075ImmutableArray.Create(joinSelectorParamLeft, joinSelectorParamRight)) 1092lambdaBinders = ImmutableArray.Create(Of Binder)(manySelectorBinder, joinSelectorBinder) 1120lambdaBinders = ImmutableArray.Create(Of Binder)(manySelectorBinder) 1137boundCallOrBadExpression = BadExpression(variable, ImmutableArray.Create(Of BoundExpression)(source, manySelectorLambda, joinSelectorLambda), 1157ImmutableArray.Create(Of BoundExpression)(manySelectorLambda, joinSelectorLambda), 1294ImmutableArray.Create(absorbingJoin.Binders.Last), 1308ImmutableArray.Create(absorbingJoin.Binders.Last), 1405ImmutableArray.Create(rangeVar), 1468ImmutableArray.Create(joinSelectorParamLeft, joinSelectorParamRight)) 1486lambdaBinders = ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder, joinSelectorBinder) 1504lambdaBinders = ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder) 1519boundCallOrBadExpression = BadExpression(join, ImmutableArray.Create(Of BoundExpression)(outer, inner, outerKeyLambda, innerKeyLambda, joinSelectorLambda), 1534ImmutableArray.Create(Of BoundExpression)(inner, outerKeyLambda, innerKeyLambda, joinSelectorLambda), 1651ImmutableArray.Create(rangeVar), 1702boundCallOrBadExpression = BadExpression(groupJoin, ImmutableArray.Create(Of BoundExpression)(outer, inner, outerKeyLambda, innerKeyLambda, intoLambda), 1720ImmutableArray.Create(Of BoundExpression)(inner, outerKeyLambda, innerKeyLambda, intoLambda), 1729ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder, intoBinder), 1799lambdaBinders = ImmutableArray.Create(Of Binder)(keysLambdaBinder, intoBinder) 1802lambdaBinders = ImmutableArray.Create(Of Binder)(keysLambdaBinder, itemsLambdaBinder, intoBinder) 1809ImmutableArray.Create(Of BoundExpression)(source).AddRange(groupByArguments), 1870ImmutableArray.Create(itemsParam)) 1914ImmutableArray.Create(keysParam)) 2122ImmutableArray.Create(keyParam, groupParam)) 2319ImmutableArray.Create(param)) 2376boundCallOrBadExpression = BadExpression(operatorSyntax, ImmutableArray.Create(Of BoundExpression)(source, filterLambda), 2386ImmutableArray.Create(Of BoundExpression)(filterLambda), 2395ImmutableArray.Create(Of Binder)(filterBinder), 2484boundCallOrBadExpression = BadExpression(partition, ImmutableArray.Create(source, boundCount), 2494ImmutableArray.Create(boundCount), 2537ImmutableArray.Create(Me), 2554ImmutableArray.Create(param)) 2573boundCallOrBadExpression = BadExpression(ordering, ImmutableArray.Create(Of BoundExpression)(sourceOrPreviousOrdering, keyLambda), 2607ImmutableArray.Create(Of BoundExpression)(keyLambda), 2626ImmutableArray.Create(Of Binder)(keyBinder), 2754declaredRangeVariables = ImmutableArray.Create(Of RangeVariableSymbol)(rangeVar) 2764declaredRangeVariables = ImmutableArray.Create(RangeVariableSymbol.CreateForErrorRecovery(Me, selectorSyntax, selector.Type)) 2945declaredRangeVariables = ImmutableArray.Create(rangeVar) 3010declaredRangeVariables = ImmutableArray.Create(Of RangeVariableSymbol)( 3099declaredRangeVariables = ImmutableArray.Create(Of RangeVariableSymbol)(groupRangeVar) 3276ImmutableArray.Create(outerKeyParam)) 3286ImmutableArray.Create(innerKeyParam)) 3924ImmutableArray.Create(aggregationParam)) 3948arguments = ImmutableArray.Create(Of BoundExpression)(aggregationLambda) 3956ImmutableArray.Create(m_GroupReference).AddRange(arguments), 3976ImmutableArray.Create(Of Binder)(aggregationBinder), 4234ImmutableArray.Create(variable), variableType, 4267ImmutableArray.Create(param)) 4295ImmutableArray.Create(Of BoundExpression)(selectorLambda), 4305ImmutableArray.Create(Of Binder)(selectorBinder), 4394ImmutableArray.Create(Of TypeSymbol)(inferredType)), 4692childBoundNodes = ImmutableArray.Create(If(methodGroup, source))
Binding\Binder_Statements.vb (14)
72Return New BoundBadStatement(node, ImmutableArray.Create(Of BoundNode)(condition), hasErrors:=True) 229ImmutableArray.Create(Of BoundNode)(BindBooleanExpression(whileOrUntilClause.Condition, diagnostics))) 240ImmutableArray.Create(Of BoundNode)(BindBooleanExpression(whenClause.Filter, diagnostics))) 400locals = ImmutableArray.Create(localForFunctionValue) 847Return New BoundBadStatement(node, ImmutableArray.Create(Of BoundNode)(boundLabelExpression), hasErrors:=True) 2469Return New BoundBadStatement(node, ImmutableArray.Create(Of BoundNode)(target), True) 2589ImmutableArray.Create(fireMethod), 3064nextVariables = ImmutableArray.Create(boundVariable) 3611ImmutableArray.Create(controlVariable), 3802ImmutableArray.Create(collection), 3855ImmutableArray.Create(collection), 3903ImmutableArray.Create(DirectCast(member, MethodSymbol)), 3926ImmutableArray.Create(DirectCast(member, MethodSymbol)), 3959ImmutableArray.Create(DirectCast(member, PropertySymbol)),
Binding\Binder_Symbols.vb (1)
291Return Binder.GetErrorSymbol(GetBaseNamesForDiagnostic(typeSyntax), diagInfo, ImmutableArray.Create(Of Symbol)(sym), LookupResultKind.NotATypeOrNamespace)
Binding\Binder_Utils.vb (1)
298Dim constructedType = nullableType.Construct(ImmutableArray.Create(typeArgument))
Binding\Binder_XmlLiterals.vb (21)
27ImmutableArray.Create(Of BoundExpression)(str), 42ImmutableArray.Create(Of BoundExpression)(declaration, New BoundLiteral(syntax, ConstantValue.Nothing, Nothing)), 63ImmutableArray.Create(Of BoundExpression)(version, encoding, standalone), 83ImmutableArray.Create(Of BoundExpression)(target, data), 188ImmutableArray.Create(Of BoundExpression)(argument), 303sideEffectBuilder.Add(BindInvocationExpressionIfGroupNotNothing(syntax, addGroup, ImmutableArray.Create(Of BoundExpression)(expr), diagnostics)) 319sideEffectBuilder.Add(BindInvocationExpressionIfGroupNotNothing(syntax, addGroup, ImmutableArray.Create(Of BoundExpression)(attribute), diagnostics)) 327sideEffectBuilder.Add(BindInvocationExpressionIfGroupNotNothing(syntax, addGroup, ImmutableArray.Create(Of BoundExpression)(xmlnsAttributesPlaceholder), diagnostics)) 369ImmutableArray.Create(Of BoundExpression)(prefixesPlaceholder, namespacesPlaceholder, xmlnsAttributesPlaceholder, expr), 426ImmutableArray.Create(Of BoundExpression)(prefix, [namespace]), 431objectCreation = BindInvocationExpressionIfGroupNotNothing(syntax, group, ImmutableArray.Create(Of BoundExpression)(prefix, [namespace]), diagnostics) 490ImmutableArray.Create(Of BoundExpression)(name, value), 503ImmutableArray.Create(Of BoundExpression)(name, value), 666memberAccess = BindInvocationExpressionIfGroupNotNothing(syntax, group, ImmutableArray.Create(Of BoundExpression)(receiver, name), diagnostics) 674memberAccess = BadExpression(syntax, ImmutableArray.Create(receiver, name), Compilation.GetSpecialType(SpecialType.System_String)) 713arguments = ImmutableArray.Create(Of BoundExpression)(name) 720arguments = ImmutableArray.Create(Of BoundExpression)(receiver, name) 734memberAccess = BadExpression(syntax, ImmutableArray.Create(receiver, name), ErrorTypeSymbol.UnknownResultType) 858Dim objectCreation = BindInvocationExpressionIfGroupNotNothing(syntax, group, ImmutableArray.Create(Of BoundExpression)(localName, [namespace]), diagnostics) 894Dim objectCreation = BindInvocationExpressionIfGroupNotNothing(syntax, group, ImmutableArray.Create(Of BoundExpression)([namespace]), diagnostics) 919ImmutableArray.Create(Of BoundExpression)(value),
Binding\CatchBlockBinder.vb (1)
60Return ImmutableArray.Create(localVar)
Binding\DocumentationCommentBinder.vb (1)
161Return ImmutableArray.Create(Of Symbol)(p)
Binding\DocumentationCommentCrefBinder.vb (4)
231ImmutableArray.Create(Of Symbol)(result)) 314Return ImmutableArray.Create(Of Symbol)(New CrefTypeParameterSymbol(ordinal, identifier.Identifier.ValueText, identifier)) 318Return ImmutableArray.Create(Of Symbol)(New CrefTypeParameterSymbol(ordinal, StringConstants.NamedSymbolErrorName, name)) 368Return ImmutableArray.Create(Of Symbol)(Me.Compilation.GlobalNamespace)
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
49Return ImmutableArray.Create(Of Symbol)(result)
Binding\DocumentationCommentTypeParamRefBinder.vb (1)
48Return ImmutableArray.Create(Of Symbol)(symbol)
Binding\ForOrForEachBlockBinder.vb (1)
101Return ImmutableArray.Create(localVar)
Binding\InitializerSemanticModel.vb (3)
117Dim fields = ImmutableArray.CreateRange(GetInitializedFieldsOrProperties(binder).Cast(Of FieldSymbol)) 129Return New BoundFieldInitializer(initializer, ImmutableArray.Create(DirectCast(Me.MemberSymbol, FieldSymbol)), Nothing, expressionInitializer, binderOpt:=Nothing) 134Dim propertySymbols = ImmutableArray.CreateRange(GetInitializedFieldsOrProperties(binder).Cast(Of PropertySymbol))
Binding\MemberSemanticModel.vb (2)
710Return ImmutableArray.Create(Of ISymbol)() 1959_guardedBoundNodeMap.Add(bindingRoot, ImmutableArray.Create(Of BoundNode)(boundRoot))
Binding\SyntheticBoundTrees\AnonymousTypeSyntheticMethods.vb (10)
74boundMeReference, ImmutableArray.Create(Of BoundExpression)(boundTryCast), 79ImmutableArray.Create(Of BoundStatement)( 178ImmutableArray.Create(Of BoundStatement)( 224ImmutableArray.Create(localMyFieldBoxed, localOtherFieldBoxed), 225ImmutableArray.Create(Of BoundStatement)( 276ImmutableArray.Create(Of BoundExpression)(boundLocalOtherFieldBoxed), 296ImmutableArray.Create(Of BoundExpression)(assignLocalMyField, assignLocalOtherField), 366ImmutableArray.Create(Of BoundExpression)( 374ImmutableArray.Create(Of BoundExpression)( 385ImmutableArray.Create(Of BoundStatement)(
Binding\SyntheticBoundTrees\SynthesizedConstructorSymbol.vb (1)
19Return New BoundBlock(Me.Syntax, Nothing, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundStatement)(returnStmt))
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (2)
85locals = ImmutableArray.Create(Of LocalSymbol)(local) 284ImmutableArray.Create(Of BoundExpression)(parameterAccess),
Binding\SyntheticBoundTrees\SynthesizedStringSwitchHashMethod.vb (1)
95ImmutableArray.Create(Of LocalSymbol)(hashCode, i),
BoundTree\BoundLocalDeclaration.vb (1)
26Return ImmutableArray.Create(Of BoundLocalDeclarationBase)(Me)
BoundTree\Expression.vb (20)
27Return ImmutableArray.Create(Of BoundNode)(Me.Left, Me.Right) 35Return ImmutableArray.Create(Of BoundNode)(Me.ReceiverOpt) 43Return ImmutableArray.Create(Of BoundNode)(Me.MethodGroup) 52Return ImmutableArray.Create(Of BoundNode)(Me.ReceiverOpt) 65Return ImmutableArray.Create(Of BoundNode)(Me.Operand) 71Return ImmutableArray.Create(Of BoundNode)(Me.Operand) 95Return ImmutableArray.Create(Of BoundNode)(Me.MemberAccess) 111Return ImmutableArray.Create(Of BoundNode)(Me.Value) 127Return ImmutableArray.Create(Of BoundNode)(Me.LastOperator) 139Return ImmutableArray.Create(Of BoundNode)(Me.Expression) 147Return ImmutableArray.Create(Of BoundNode)(Me.ConversionCall) 155Return ImmutableArray.Create(Of BoundNode)(Me.Source) 163Return ImmutableArray.Create(Of BoundNode)(Me.UnderlyingExpression) 171Return ImmutableArray.Create(Of BoundNode)(Me.UnderlyingExpression) 179Return ImmutableArray.Create(Of BoundNode)(Me.Expression) 187Return ImmutableArray.Create(Of BoundNode)(Me.Value) 195Return ImmutableArray.Create(Of BoundNode)(Me.CapturedGroupOpt, Me.UnderlyingExpression) 203Return ImmutableArray.Create(Of BoundNode)(Me.Group) 211Return ImmutableArray.Create(Of BoundNode)(Me.Original, Me.Start, Me.LengthOpt, Me.Source) 219Return ImmutableArray.Create(Of BoundNode)(Me.Argument)
BoundTree\GroupTypeInferenceLambda.vb (1)
23ImmutableArray.Create(New AnonymousTypeField(GeneratedNameConstants.ItAnonymous,
BoundTree\Statement.vb (5)
37Return ImmutableArray.Create(Of BoundNode)(Me.CaseStatement, Me.Body) 78Return ImmutableArray.Create(Of BoundNode)(Me.EventInvocation) 86Return ImmutableArray.Create(Of BoundNode)(Me.LabelExpressionOpt) 94Return ImmutableArray.Create(Of BoundNode)(Me.LabelExpressionOpt) 102Return ImmutableArray.Create(Of BoundNode)(Me.Body)
Compilation\MethodCompiler.vb (2)
262compiler.CompileSynthesizedMethods(ImmutableArray.Create(DirectCast(hotReloadException, NamedTypeSymbol))) 2104methods:=ImmutableArray.Create(Of MethodSymbol)(constructorToCall),
Compilation\SemanticModel.vb (5)
887Return ImmutableArray.Create(s) 909Dim result = ImmutableArray.CreateRange(symbolSet) 1501bindingSymbols = ImmutableArray.Create(Of Symbol)(constructor) 3370Return ImmutableArray.Create(symbol) 3373Return ImmutableArray.Create(Of ISymbol)()
Compilation\SpeculativeSyntaxTreeSemanticModel.vb (1)
95Return SymbolInfoFactory.Create(ImmutableArray.Create(Of ISymbol)(aliasSymbol), If(aliasSymbol IsNot Nothing, LookupResultKind.Good, LookupResultKind.Empty))
Compilation\VisualBasicCompilation.vb (1)
1129Return ImmutableArray.Create(
Compilation\VisualBasicCompilerDiagnosticAnalyzer.vb (1)
24Dim builder = ImmutableArray.CreateBuilder(Of Integer)
Declarations\DeclarationTreeBuilder.vb (2)
157children:=ImmutableArray.Create(Of SingleNamespaceOrTypeDeclaration)(decl)) 328children = ImmutableArray.Create(Of SingleNamespaceOrTypeDeclaration)(ns)
Declarations\MergedNamespaceDeclaration.vb (2)
28Return New MergedNamespaceDeclaration(ImmutableArray.CreateRange(Of SingleNamespaceDeclaration)(declarations)) 63Return ImmutableArray.Create(loc)
Declarations\MergedTypeDeclaration.vb (2)
122Return ImmutableArray.Create(Declarations(0).NameLocation) 142Function(g) New MergedTypeDeclaration(ImmutableArray.CreateRange(Of SingleTypeDeclaration)(g))
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (2)
195Return New AnonymousTypeKey(ImmutableArray.Create(properties)) 241Return ImmutableArray.CreateRange(PreviousGeneration.SynthesizedTypes.AnonymousTypes.Keys)
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (1)
214Return ImmutableArray.Create(result)
Emit\NoPia\EmbeddedType.vb (1)
220ImmutableArray.Create(New TypedConstant(stringType, TypedConstantKind.Primitive, guidString),
Emit\NoPia\EmbeddedTypesManager.vb (2)
100ImmutableArray.Create(constructorArguments(0), constructorArguments(0)), 109ImmutableArray.Create(New TypedConstant(ctor.Parameters(0).Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
Emit\SynthesizedPrivateImplementationDetailsSharedConstructor.vb (1)
86factory.Array(payloadArrayType.ElementType, ImmutableArray.Create(factory.MaximumMethodDefIndex()), ImmutableArray(Of BoundExpression).Empty)))
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Await.vb (4)
182ImmutableArray.Create(Of TypeSymbol)(asCriticalNotifyCompletion.Type, Me.F.Me().Type), 199ImmutableArray.Create(Of TypeSymbol)(asNotifyCompletion.Type, Me.F.Me().Type), 204ImmutableArray.Create(Of LocalSymbol)(asCriticalNotifyCompletion, asNotifyCompletion), 233ImmutableArray.Create(Of TypeSymbol)(awaiterType, Me.F.Me().Type),
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (1)
893Dim allExpressions = ImmutableArray.Create(Of BoundExpression)(expression).Concat(indices)
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.vb (2)
223ImmutableArray.Create(Me._exprRetValue, Me.CachedState), 224ImmutableArray.Create(Me.CachedState)),
Lowering\AsyncRewriter\AsyncRewriter.vb (3)
202Me.F.CloseMethod(F.Block(ImmutableArray.Create(F.BaseInitialization(), F.Return()))) 240ImmutableArray.Create(Of TypeSymbol)(frameType), 532ImmutableArray.Create(Of BoundExpression)(arguments),
Lowering\AsyncRewriter\AsyncStateMachine.vb (1)
23ImmutableArray.Create(asyncMethod.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_IAsyncStateMachine)))
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (2)
361ImmutableArray.Create(Of TypeSymbol)(delegateType), 836arguments:=ImmutableArray.Create(Of BoundExpression)(arguments),
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (5)
87Me._factory.Sequence(ImmutableArray.Create(Of LocalSymbol)( 89ImmutableArray.Create(Of BoundExpression)( 96ImmutableArray.Create(Of BoundExpression)( 150arguments:=ImmutableArray.Create(Of BoundExpression)(expression), 228ImmutableArray.Create(Of BoundExpression)(parameter),
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (1)
163ImmutableArray.Create(Of BoundExpression)(
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (3)
258indices:=ImmutableArray.Create(_methodBodyFactory.MethodDefIndex(_method)))) 267indices:=ImmutableArray.Create(_methodBodyFactory.MethodDefIndex(_method))) 472indices:=ImmutableArray.Create(Of BoundExpression)(statementFactory.Literal(spansIndex)))
Lowering\Instrumentation\DebugInfoInjector.vb (1)
334ImmutableArray.Create(Of BoundStatement)(
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.vb (2)
60If(shareLocal, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(lazyConditionalBranchLocal)), 61ImmutableArray.Create(MakeAssignmentExpression(conditionSyntax, MakeLocalWrite(conditionSyntax, lazyConditionalBranchLocal), condition)),
Lowering\IteratorRewriter\IteratorRewriter.IteratorMethodToClassRewriter.vb (1)
81ImmutableArray.Create(Me._methodValue, Me.CachedState),
Lowering\IteratorRewriter\IteratorRewriter.vb (1)
259F.CloseMethod(F.Block(ImmutableArray.Create(resultVariable), bodyBuilder.ToImmutableAndFree()))
Lowering\IteratorRewriter\IteratorStateMachine.vb (1)
37Dim parameters = ImmutableArray.Create(Of ParameterSymbol)(
Lowering\LambdaRewriter\LambdaFrame.vb (1)
143members = members.AddRange(ImmutableArray.Create(Of Symbol)(_constructor, _sharedConstructor, _singletonCache))
Lowering\LambdaRewriter\LambdaFrameCopyConstructor.vb (1)
29_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SourceSimpleParameterSymbol(Me, "arg0", 0, containingType, Nothing))
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (1)
277Dim previousBlock = PushBlock(node, ImmutableArray.Create(Of LocalSymbol)(node.LocalOpt))
Lowering\LambdaRewriter\LambdaRewriter.vb (2)
536ImmutableArray.Create(Of BoundExpression)(frameAccess)) 1428ImmutableArray.Create(Of BoundExpression)(_meProxyDeferredInit))
Lowering\LambdaRewriter\SynthesizedLambdaMethod.vb (1)
63Me._locations = ImmutableArray.Create(lambdaNode.Syntax.GetLocation())
Lowering\LocalRewriter\LocalRewriter.vb (3)
437Return New BoundStatementList(statement.Syntax, ImmutableArray.Create(prologueOpt, statement)) 449ImmutableArray.Create(Of BoundStatement)(prologueOpt, block)) 514ImmutableArray.Create(result),
Lowering\LocalRewriter\LocalRewriter_AddRemoveHandler.vb (8)
134marshalArguments = ImmutableArray.Create(Of BoundExpression)(addDelegate, removeDelegate, rewrittenHandler) 137marshalArguments = ImmutableArray.Create(Of BoundExpression)(removeDelegate, rewrittenHandler) 147ImmutableArray.Create(Of Symbol)(eventSymbol), 173locals:=ImmutableArray.Create(Of LocalSymbol)(boundTemp.LocalSymbol), 174statements:=ImmutableArray.Create(Of BoundStatement)( 239ImmutableArray.Create(handler), 305ImmutableArray.Create(Of Symbol)([event]), 306ImmutableArray.Create(receiver, handler),
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (6)
105ImmutableArray.Create(Of BoundExpression)(result), 321ImmutableArray.Create(Of BoundExpression)(result), 452ImmutableArray.Create(result), Nothing, getObjectValueMethod.ReturnType) 489RewriteCallArguments(ImmutableArray.Create(node.Left, midResult.Start, 515ImmutableArray.Create(Of LocalSymbol)(temp), 516ImmutableArray.Create(Of BoundExpression)(New BoundAssignmentOperator(node.Syntax,
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (17)
72ImmutableArray.Create(Of LocalSymbol)(temp), 486ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 525ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 589ImmutableArray.Create(left), Nothing, memberSymbol.ReturnType) 594ImmutableArray.Create(right), Nothing, memberSymbol.ReturnType) 637ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 665ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 698ImmutableArray.Create(left, 730ImmutableArray.Create(left, 763ImmutableArray.Create(left, 788ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType, suppressObjectClone:=True) 1013ImmutableArray.Create(Of LocalSymbol)(leftTemp), 1014ImmutableArray.Create(Of BoundExpression)(leftInit), 1040ImmutableArray.Create(If(operandHasValue, NullableValueOrDefault(operand), operand)), 1138ImmutableArray.Create(Of LocalSymbol)(temp), 1139ImmutableArray.Create(tempInit), 1453ImmutableArray.Create(Of BoundExpression)(leftCallInput, rightCallInput),
Lowering\LocalRewriter\LocalRewriter_Call.vb (4)
105ImmutableArray.Create(Of BoundExpression)(node), 136arguments = ImmutableArray.Create(Of BoundExpression)(receiver) 246Return New BoundSequence(rewrittenArgument.Syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(storeVal), boundTemp, rewrittenArgument.Type) 382Return New BoundSequence(argument.Syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(storeVal), boundTemp, argument.Type)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (4)
168result = New BoundSequence(node.Syntax, ImmutableArray.Create(temp), ImmutableArray.Create(assignment, result), Nothing, result.Type) 170result = New BoundSequence(node.Syntax, ImmutableArray.Create(temp), ImmutableArray.Create(assignment), result, result.Type)
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (2)
118locals:=ImmutableArray.Create(Of LocalSymbol)(tempVariableSymbol), 288ImmutableArray.Create(Of LocalSymbol)(temp),
Lowering\LocalRewriter\LocalRewriter_Constant.vb (1)
125ImmutableArray.Create(Of BoundExpression)(
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (11)
676ImmutableArray.Create(inputToOperatorMethod), 697ImmutableArray.Create(Of LocalSymbol)(temp), 812ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 890ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 984ImmutableArray.Create(operand), 990ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 1035ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 1123ImmutableArray.Create(operand), 1129ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 1172ImmutableArray.Create(operand), Nothing, memberSymbol.ReturnType) 1225ImmutableArray.Create(operand), Nothing, mathRound.ReturnType)
Lowering\LocalRewriter\LocalRewriter_DelegateCreation.vb (2)
63ImmutableArray.Create(Of LocalSymbol)(captureTemp), 64ImmutableArray.Create(Of BoundExpression)(capture),
Lowering\LocalRewriter\LocalRewriter_DoLoop.vb (4)
127Return New BoundStatementList(node.Syntax, ImmutableArray.Create( 137Return New BoundStatementList(node.Syntax, ImmutableArray.Create( 195Return New BoundStatementList(syntax, ImmutableArray.Create( 205Return New BoundStatementList(syntax, ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_FieldAccess.vb (2)
75ImmutableArray.Create(Of Symbol)(tupleField), 76ImmutableArray.Create(rewrittenReceiver),
Lowering\LocalRewriter\LocalRewriter_ForEach.vb (12)
282ImmutableArray.Create(Of BoundExpression)(boundIndex.MakeRValue()), 297ImmutableArray.Create(Of BoundExpression)(boundIndex.MakeRValue()), 302ImmutableArray.Create(Of BoundExpression)(boundIndex.MakeRValue()), elementType, hasErrors:=True) 445incrementAssignment = New BoundStatementList(statementSyntax, ImmutableArray.Create(epilogue, incrementAssignment)) 451Dim rewrittenBodyStatements = ImmutableArray.Create(Of BoundStatement)(currentAssignment, 461ImmutableArray.Create(Of LocalSymbol)(forEachStatement.DeclaredOrInferredLocalOpt), 606Dim rewrittenBodyStatements = ImmutableArray.Create(Of BoundStatement)(DirectCast(Visit(boundCurrentAssignment), BoundStatement), 611Dim rewrittenBodyBlock As BoundBlock = New BoundBlock(syntaxNode, Nothing, If(node.DeclaredOrInferredLocalOpt IsNot Nothing, ImmutableArray.Create(Of LocalSymbol)(node.DeclaredOrInferredLocalOpt), ImmutableArray(Of LocalSymbol).Empty), rewrittenBodyStatements) 659ImmutableArray.Create(Of BoundStatement)(boundEnumeratorAssignment, 664ImmutableArray.Create(Of BoundStatement)(disposalStatement)), 719ImmutableArray.Create(rewrittenBoundLocal, rewrittenCondition), 720ImmutableArray.Create(Of BoundExpression)(rewrittenBoundLocal)),
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (3)
427Dim arguments = ImmutableArray.Create( 485arguments = ImmutableArray.Create( 538Dim statements = ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_If.vb (2)
166Return New BoundStatementList(syntaxNode, ImmutableArray.Create(condGoto, rewrittenConsequence, afterIfStatement)) 202Return New BoundStatementList(syntaxNode, ImmutableArray.Create(Of BoundStatement)(
Lowering\LocalRewriter\LocalRewriter_Label.vb (1)
39statement = New BoundStatementList(node.Syntax, ImmutableArray.Create(statement, trackLineNumber))
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (1)
128statementList = ImmutableArray.Create(returnstmt)
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (28)
80Return New BoundArrayCreation(node, ImmutableArray.Create(bounds), initializer, booleanArrayType) 113Dim arrayCreation = New BoundArrayCreation(node, ImmutableArray.Create(bounds), Nothing, objectArrayType) 140Dim indices = ImmutableArray.Create(indexExpr) 151Return New BoundSequence(node, ImmutableArray.Create(arrayTemp), sideeffects.ToImmutableAndFree, arrayTempRef, arrayTempRef.Type) 177rewrittenArguments = ImmutableArray.Create(rewrittenValue) 202Dim arrayCreation = New BoundArrayCreation(node, ImmutableArray.Create(bounds), Nothing, objectArrayType) 241Return New BoundSequence(node, ImmutableArray.Create(arrayTemp), sideeffects.ToImmutableAndFree, arrayTempRef, arrayTempRef.Type) 253ImmutableArray.Create(indexExpr), 273Return New BoundArrayCreation(node, ImmutableArray.Create(bounds), Nothing, objectArrayType) 294Return New BoundArrayCreation(node, ImmutableArray.Create(bounds), initializer, objectArrayType) 327Return New BoundArrayCreation(node, ImmutableArray.Create(bounds), initializer, stringArrayType) 344Dim indices = ImmutableArray.Create(index) 349ImmutableArray.Create(index), 375ImmutableArray.Create(Of BoundExpression)(value, getTypeExpr), 455ImmutableArray.Create(assignment), 492Dim callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 531Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(memberAccess), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 536Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(memberAccess), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 557callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 569callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 610Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(invocation), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 615Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(invocation), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 628callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 637callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 798Dim callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 841ImmutableArray.Create(Of LocalSymbol)(valueArrayTemp, copyBackFlagArrayTemp, valueTemp), 842ImmutableArray.Create(Of BoundExpression)(store).Concat(copyBackBuilder.ToImmutableAndFree), 959Return New BoundArrayCreation(node, ImmutableArray.Create(bounds), initializer, typeArrayType)
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.vb (6)
226ImmutableArray.Create(Of BoundExpression)(flag, newFlagInstance, New BoundLiteral(syntax, ConstantValue.Nothing, flag.Type)), 293New BoundStatementList(syntax, ImmutableArray.Create(flagStateAssignTwo, rewrittenInitialization)), 305locals = ImmutableArray.Create(boundLockTakenLocal.LocalSymbol) 307statementsInTry = ImmutableArray.Create(boundMonitorEnterCall, conditionalValueInit) 311statementsInTry = ImmutableArray.Create(Of BoundStatement)(conditionalValueInit) 328ImmutableArray.Create(flagStateAssignOne, monitorExit))
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (7)
21ImmutableArray.Create(expr), 26Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), nullableType, hasErrors:=True) 206Return If(isOptional, Nothing, New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), expr.Type.GetNullableUnderlyingType(), hasErrors:=True)) 219ImmutableArray.Create(defaultValue), 255Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), expr.Type.GetNullableUnderlyingType(), hasErrors:=True) 283Return New BoundBadExpression(expr.Syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(expr), 529ImmutableArray.Create(sideeffects),
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (3)
141method = method.Construct(ImmutableArray.Create(Of TypeSymbol)(typeParameter)) 258ImmutableArray.Create(Of LocalSymbol)(tempLocalSymbol), 321sequenceTemporaries = ImmutableArray.Create(Of LocalSymbol)(tempLocalSymbol)
Lowering\LocalRewriter\LocalRewriter_Query.vb (3)
202ImmutableArray.Create(rewrittenBody)).MakeCompilerGenerated() 242ImmutableArray.Create(Of LocalSymbol)(groupLocal), 243ImmutableArray.Create(Of BoundExpression)(
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (4)
90ImmutableArray.Create(temp), 91ImmutableArray.Create(Of BoundStatement)( 138arguments:=ImmutableArray.Create(Of BoundExpression)(rewrittenReceiver), 165Return New BoundBadExpression(syntax, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(rewrittenReceiver), ErrorTypeSymbol.UnknownResultType, hasErrors:=True)
Lowering\LocalRewriter\LocalRewriter_RedimClause.vb (2)
65ImmutableArray.Create(Of BoundExpression)(arrayValueAccess, valueBeingAssigned), 91ImmutableArray.Create(Of BoundExpression)(assignmentOperator),
Lowering\LocalRewriter\LocalRewriter_Return.vb (1)
82Return New BoundStatementList(syntaxNode, ImmutableArray.Create(assignment, jump))
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (1)
235tempLocals = ImmutableArray.Create(Of LocalSymbol)(tempLocal)
Lowering\LocalRewriter\LocalRewriter_StringConcat.vb (1)
288Return factory.Call(Nothing, memberSymbol, ImmutableArray.Create(Of BoundExpression)(argArray))
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (10)
99ImmutableArray.Create(Of BoundExpression)(boundLockObjectLocal), 117locals = ImmutableArray.Create(Of LocalSymbol)(tempLockObjectLocal, boundLockTakenLocal.LocalSymbol) 119tryStatements = ImmutableArray.Create(Of BoundStatement)(boundMonitorEnterCallStatement, 122locals = ImmutableArray.Create(tempLockObjectLocal) 124tryStatements = ImmutableArray.Create(Of BoundStatement)(DirectCast(Visit(node.Body), BoundBlock)) 138ImmutableArray.Create(Of BoundStatement)(statementInFinally)) 199parameters = ImmutableArray.Create(Of BoundExpression)(boundLockObject, boundLockTakenLocal) 205parameters = ImmutableArray.Create(Of BoundExpression)(boundLockObject) 244ImmutableArray.Create(Of BoundExpression)(boundLockObject), 249boundMonitorExitCall = New BoundBadExpression(syntaxNode, LookupResultKind.NotReferencable, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(boundLockObject), ErrorTypeSymbol.UnknownResultType, hasErrors:=True)
Lowering\LocalRewriter\LocalRewriter_Throw.vb (1)
30ImmutableArray.Create(Of BoundExpression)(expressionOpt),
Lowering\LocalRewriter\LocalRewriter_Try.vb (1)
92ImmutableArray.Create(Of BoundStatement)(tryBlock,
Lowering\LocalRewriter\LocalRewriter_TupleLiteralExpression.vb (2)
44Dim smallestCtorArguments As ImmutableArray(Of BoundExpression) = ImmutableArray.Create(rewrittenArguments, 88Dim ctorArguments As ImmutableArray(Of BoundExpression) = ImmutableArray.Create(rewrittenArguments,
Lowering\LocalRewriter\LocalRewriter_UnaryOperators.vb (5)
132ImmutableArray.Create(node.Operand), Nothing, memberSymbol.ReturnType) 156ImmutableArray.Create(node.Operand), Nothing, memberSymbol.ReturnType) 203ImmutableArray.Create(Of LocalSymbol)(temp), 204ImmutableArray.Create(tempInit), 272ImmutableArray.Create(Of BoundExpression)(callInput),
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (5)
55ImmutableArray.Create(Of LocalSymbol)(_currentLineTemporary), 259ImmutableArray.Create(New BoundCatchBlock( 270nodeFactory.Block(ImmutableArray.Create(Of BoundStatement)(nodeFactory.Goto(onErrorLabel))), 284ImmutableArray.Create(Of BoundExpression)(nodeFactory.Literal(E_INTERNALERROR)), 412ImmutableArray.Create(Of BoundExpression)(nodeFactory.Literal(E_RESUMEWITHOUTERROR)),
Lowering\LocalRewriter\LocalRewriter_Using.vb (5)
167Return New BoundStatementList(node.UsingInfo.UsingStatementSyntax, ImmutableArray.Create(Of BoundStatement)(prologue, currentBody)) 169Return New BoundStatementList(node.UsingInfo.UsingStatementSyntax, ImmutableArray.Create(Of BoundStatement)(currentBody)) 244finallyStatements = ImmutableArray.Create(disposePrologue, disposeCall) 246finallyStatements = ImmutableArray.Create(disposeCall) 261ImmutableArray.Create(boundResourceInitializationAssignment, tryFinally))
Lowering\LocalRewriter\LocalRewriter_While.vb (1)
141Return New BoundStatementList(statementSyntax, ImmutableArray.Create(Of BoundStatement)(
Lowering\LocalRewriter\LocalRewriter_XmlLiterals.vb (4)
257ImmutableArray.Create(Of BoundExpression)( 273ImmutableArray.Create(Of BoundExpression)( 320arguments:=ImmutableArray.Create([namespace]), 352result = New BoundArrayCreation(syntax, ImmutableArray.Create(Of BoundExpression)(size), initializer, arrayType)
Lowering\MethodToClassRewriter\MethodToClassRewriter.MyBaseMyClassWrapper.vb (2)
121ImmutableArray.Create(Of BoundStatement)( 174Me._locations = ImmutableArray.Create(Of Location)(syntax.GetLocation())
Lowering\StateMachineRewriter\StateMachineRewriter.vb (1)
159ImmutableArray.Create(Of LocalSymbol)(stateMachineVariable),
Lowering\StateMachineRewriter\SynthesizedContainer.vb (2)
220Return ImmutableArray.Create(Of Symbol)(Me.Constructor) 225ImmutableArray.Create(Of Symbol)(Me.Constructor), ImmutableArray(Of Symbol).Empty)
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (2)
40Me._locations = ImmutableArray.Create(syntax.GetLocation()) 141Return ImmutableArray.Create(Me._interfaceMethod)
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.vb (1)
60Return ImmutableArray.Create(ImplementedProperty)
Lowering\SyntheticBoundNodeFactory.vb (11)
241Return nullableType.Construct(ImmutableArray.Create(type)) 330Return Block(ImmutableArray.Create(Of BoundStatement)(statements)) 334Return Block(locals, ImmutableArray.Create(Of BoundStatement)(statements)) 348Dim boundNode As New BoundStatementList(Syntax, ImmutableArray.Create(first, second)) 459Dim boundNode = New BoundBadExpression(_syntax, LookupResultKind.Empty, ImmutableArray(Of Symbol).Empty, ImmutableArray.Create(subExpressions), ErrorTypeSymbol.UnknownResultType, hasErrors:=True) 471Dim boundNode = New BoundObjectCreationExpression(_syntax, ctor, ImmutableArray.Create(args), Nothing, ctor.ContainingType) 590Return [Call](receiver, method, ImmutableArray.Create(Of BoundExpression)(args)) 678Return Sequence(ImmutableArray.Create(Of LocalSymbol)(temp), parts) 692Dim sectionsArray = ImmutableArray.CreateRange(Of BoundCaseBlock)(sections) 740Dim boundCaseBlock = New BoundCaseBlock(_syntax, boundCaseStatement, Block(ImmutableArray.Create(Of BoundStatement)(statements))) 1039Return New BoundArrayCreation(_syntax, ImmutableArray.Create(Of BoundExpression)(Literal(elements.Length)), boundArrayInit, arrayType)
Lowering\UseTwiceRewriter.vb (5)
90receiver = New Result(New BoundSequence(capture.Syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(capture), boundTemp, boundTemp.Type), 97receiver = New Result(New BoundSequence(capture.Syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(capture), boundTemp, boundTemp.Type), 323receiver = New Result(New BoundSequence(capture.Syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(capture), boundTemp, boundTemp.Type), 347ImmutableArray.Create(Of BoundExpression)(clone), 358ImmutableArray.Create(Of BoundExpression)(receiver.First.MakeRValue()),
Operations\VisualBasicOperationFactory.vb (7)
1087Return ImmutableArray.Create(Of ICaseClauseOperation)( 1099Return ImmutableArray.Create(Create(boundCaseBlock.Body)) 1108Dim body As ImmutableArray(Of IOperation) = ImmutableArray.Create(Create(boundCaseBlock.Body)) 1165ImmutableArray.Create(Of ILocalSymbol)(boundForToStatement.DeclaredOrInferredLocalOpt), 1246ImmutableArray.Create(Of ILocalSymbol)(boundForEachStatement.DeclaredOrInferredLocalOpt), 1289ImmutableArray.Create(Of ILocalSymbol)(boundCatchBlock.LocalOpt), 1366GetVariableDeclarationStatementVariables(ImmutableArray.Create(Of BoundLocalDeclarationBase)(boundLocalDeclaration))
Semantics\Conversions.vb (1)
1485nullableOfBoolean = nullableOfT.Construct(ImmutableArray.Create(Of TypeSymbol)(booleanType))
Semantics\Operators.vb (4)
3235ImmutableArray.Create(param1), 3236ImmutableArray.Create(Of ParameterSymbol)(param1, param2)), 3251ImmutableArray.Create(argument1), 3252ImmutableArray.Create(Of BoundExpression)(argument1, argument2)),
Symbols\AliasSymbol.vb (1)
77Me._aliasLocations = ImmutableArray.Create(aliasLocation)
Symbols\AnonymousTypes\PublicSymbols\AnonymousDelegate_TypePublicSymbol.vb (3)
55ImmutableArray.Create(Of ParameterSymbol)( 73_members = ImmutableArray.Create(delegateCtor, delegateInvoke) 111_members = ImmutableArray.Create(delegateCtor, delegateBeginInvoke, delegateEndInvoke, delegateInvoke)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_PropertyPublicAccessors.vb (1)
73_parameters = ImmutableArray.Create(Of ParameterSymbol)(
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_PropertyPublicSymbol.vb (1)
79Return ImmutableArray.Create(Me._container.TypeDescriptor.Fields(Me.PropertyIndex).Location)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType_TypePublicSymbol.vb (4)
74Dim equatableInterface As NamedTypeSymbol = Me.Manager.System_IEquatable_T.Construct(ImmutableArray.Create(Of TypeSymbol)(Me)) 75Me._interfaces = ImmutableArray.Create(Of NamedTypeSymbol)(equatableInterface) 112method.SetParameters(ImmutableArray.Create(Of ParameterSymbol)( 124method.SetParameters(ImmutableArray.Create(Of ParameterSymbol)(
Symbols\AnonymousTypes\PublicSymbols\AnonymousTypeOrDelegatePublicSymbol.vb (2)
129Return ImmutableArray.CreateRange(Of Symbol)(From member In GetMembers() Where CaseInsensitiveComparison.Equals(member.Name, name)) 172Return ImmutableArray.Create(Of Location)(Me.TypeDescriptor.Location)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (6)
69ImmutableArray.Create(Of ParameterSymbol)( 82_members = ImmutableArray.Create(delegateCtor, delegateInvoke) 119_members = ImmutableArray.Create(delegateCtor, delegateBeginInvoke, delegateEndInvoke, delegateInvoke) 183ImmutableArray.Create(value), 184ImmutableArray.Create(New KeyValuePair(Of WellKnownMember, TypedConstant)( 212Return ImmutableArray.Create(TypeDescr.Location)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_EqualsMethodSymbol.vb (1)
22_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SynthesizedParameterSimpleSymbol(Me, container.Manager.System_Object, 0, "obj"))
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_IEquatable_EqualsMethodSymbol.vb (2)
22_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SynthesizedParameterSimpleSymbol(Me, container, 0, "val")) 23_interfaceMethod = ImmutableArray.Create(interfaceMethod)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_PropertyAccessors.vb (1)
92_parameters = ImmutableArray.Create(Of ParameterSymbol)(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (3)
77Dim equatableInterface As NamedTypeSymbol = Me.Manager.System_IEquatable_T.Construct(ImmutableArray.Create(Of TypeSymbol)(Me)) 78_interfaces = ImmutableArray.Create(Of NamedTypeSymbol)(equatableInterface) 184ImmutableArray.Create(New TypedConstant(Manager.System_String, TypedConstantKind.Primitive, builder.ToStringAndFree())))
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (1)
228Return ImmutableArray.CreateRange(From member In GetMembers() Where CaseInsensitiveComparison.Equals(member.Name, name))
Symbols\ArrayTypeSymbol.vb (3)
86Return ImmutableArray.Create(iReadOnlyListOfT.Construct(elementType)) 89Return ImmutableArray.Create(iListOfT.Construct(elementType)) 91Return ImmutableArray.Create(iListOfT.Construct(elementType), iReadOnlyListOfT.Construct(elementType))
Symbols\Attributes\SourceAttributeData.vb (1)
48Me._namedArguments = If(namedArgs.IsDefault, ImmutableArray.Create(Of KeyValuePair(Of String, TypedConstant))(), namedArgs)
Symbols\ExtendedErrorTypeSymbol.vb (1)
84_candidateSymbols = ImmutableArray.Create(Of Symbol)(nonErrorGuessType)
Symbols\FieldOrPropertyInitializer.vb (2)
59Me.FieldsOrProperties = ImmutableArray.Create(Of Symbol)(field) 87Me.FieldsOrProperties = ImmutableArray.Create(Of Symbol)([property])
Symbols\MergedNamespaceSymbol.vb (5)
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)) 347Return ImmutableArray.CreateRange(Of Location)((From ns In _namespacesToMerge, loc In ns.Locations Select loc)) 353Return ImmutableArray.CreateRange(Of SyntaxReference)(From ns In _namespacesToMerge, reference In ns.DeclaringSyntaxReferences Select reference)
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
1054Dim builder = ImmutableArray.CreateBuilder(Of ParameterSymbol)(count) 1130Dim ownedParams = ImmutableArray.CreateBuilder(Of TypeParameterSymbol)(gpHandles.Count)
Symbols\Metadata\PE\PEModuleSymbol.vb (1)
71ImmutableArray.Create(Of MetadataLocation)(New MetadataLocation(Me))
Symbols\Metadata\PE\PENamedTypeSymbol.vb (2)
297Return ImmutableArray.Create(Of NamedTypeSymbol)(New UnsupportedMetadataTypeSymbol(mrEx)) 692membersDict.Add(g.Key, ImmutableArray.CreateRange(g))
Symbols\Metadata\PE\PENamespaceSymbol.vb (1)
206members.Add(ns.Name, ImmutableArray.Create(Of Symbol)(ns))
Symbols\MethodSymbol.vb (1)
638Return Construct(ImmutableArray.Create(typeArguments))
Symbols\MissingAssemblySymbol.vb (1)
72_lazyModules = ImmutableArray.Create(Of ModuleSymbol)(m_ModuleSymbol)
Symbols\NamespaceSymbol.vb (1)
97Return ImmutableArray.Create(Of NamespaceSymbol)(Me)
Symbols\ReducedExtensionMethodSymbol.vb (1)
95arguments:=ImmutableArray.Create(Of BoundExpression)(
Symbols\Source\CrefTypeParameterSymbol.vb (2)
106Return ImmutableArray.Create(Of SyntaxReference)(Me._syntaxReference) 112Return ImmutableArray.Create(Of Location)(Me._syntaxReference.GetLocation())
Symbols\Source\CustomEventAccessorSymbol.vb (1)
27MyBase.New(container, flags, syntaxRef, locations:=ImmutableArray.Create(location))
Symbols\Source\ImplementsHelper.vb (1)
685Return ImmutableArray.Create(Of TSymbol)(substitutedImplementations)
Symbols\Source\LambdaParameterSymbol.vb (1)
33_location = ImmutableArray.Create(Of Location)(location)
Symbols\Source\LambdaSymbol.vb (2)
260Return ImmutableArray.Create(_syntaxNode.GetLocation()) 266Return ImmutableArray.Create(_syntaxNode.GetReference())
Symbols\Source\LocalSymbol.vb (3)
194Return ImmutableArray.Create(Me.IdentifierLocation) 588Return ImmutableArray.Create(_identifierToken.Parent.GetReference()) 929Return ImmutableArray.Create(Of SyntaxReference)(_modifiedIdentifierOpt.GetReference())
Symbols\Source\RangeVariableSymbol.vb (5)
185Return ImmutableArray.Create(Of Location)(_identifierToken.GetLocation()) 204Return ImmutableArray.Create(Of SyntaxReference)(collectionRange.GetReference()) 209Return ImmutableArray.Create(Of SyntaxReference)(expressionRange.GetReference()) 214Return ImmutableArray.Create(Of SyntaxReference)(aggregationRange.GetReference()) 267Return ImmutableArray.Create(Of Location)(_syntax.GetLocation())
Symbols\Source\SourceAssemblySymbol.vb (5)
1554ImmutableArray.Create(typedConstantNoStringInterning))) 1573ImmutableArray.Create(New KeyValuePair(Of WellKnownMember, TypedConstant)( 1610ImmutableArray.Create(typedConstantDebugMode))) 1624AddSynthesizedAttribute(attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyNameAttribute__ctor, ImmutableArray.Create(typedConstant))) 1633AddSynthesizedAttribute(attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyFileAttribute__ctor, ImmutableArray.Create(typedConstant)))
Symbols\Source\SourceComplexParameterSymbol.vb (1)
84Return OneOrMany.Create(ImmutableArray.Create(attributes, otherAttributes))
Symbols\Source\SourceDelegateMethodSymbol.vb (1)
227InitializeParameters(ImmutableArray.Create(Of ParameterSymbol)(
Symbols\Source\SourceEnumConstantSymbol.vb (1)
59Return ImmutableArray.Create(DirectCast(Syntax, EnumMemberDeclarationSyntax).Identifier.GetLocation())
Symbols\Source\SourceEventSymbol.vb (1)
446Return ImmutableArray.Create(_location)
Symbols\Source\SourceFieldSymbol.vb (2)
620Return ImmutableArray.Create(Of Location)(GetSymbolLocation(_syntaxRef)) 693ImmutableArray.Create(
Symbols\Source\SourceLabelSymbol.vb (2)
56Return ImmutableArray.Create(Of Location)(_labelName.GetLocation()) 64Return ImmutableArray.Create(Of SyntaxReference)(DirectCast(parentNode.GetReference(), SyntaxReference))
Symbols\Source\SourceMemberMethodSymbol.vb (2)
143Return OneOrMany.Create(ImmutableArray.Create(AttributeDeclarationSyntaxList, Me.SourcePartialImplementation.AttributeDeclarationSyntaxList)) 814ImmutableArray.Create(Of MethodSymbol)(handlingMethod),
Symbols\Source\SourceMethodSymbol.vb (2)
842ImmutableArray.Create(location)), 1199Return New BoundBlock(methodBlock, methodBlock.Statements, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(boundStatement))
Symbols\Source\SourceNamedTypeSymbol.vb (5)
2490ImmutableArray.Create( 2505ImmutableArray.Create( 2511ImmutableArray.Create( 2532ImmutableArray.Create( 2559ImmutableArray.Create(New TypedConstant(compilation.GetWellKnownType(WellKnownType.System_Type), TypedConstantKind.Type, originalType)),
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (8)
199interfaces = ImmutableArray.Create(comClassInterface) 201interfaces = ImmutableArray.Create(Of NamedTypeSymbol)(comClassInterface, 993ImmutableArray.Create( 1000ImmutableArray.Create( 1008ImmutableArray.Create(New TypedConstant(_comClass.GetSpecialType(SpecialType.System_Boolean), 1015ImmutableArray.Create(New TypedConstant(_comClass.GetSpecialType(SpecialType.System_String), 1363ImmutableArray.Create(New TypedConstant(_interface.ComClass.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32), 1869ImmutableArray.Create(New TypedConstant(_interface.ComClass.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32),
Symbols\Source\SourceParameterSymbol.vb (2)
72Return ImmutableArray.Create(Of Location)(_location) 284Dim newArgs = ImmutableArray.Create(New TypedConstant(oldTypedConstant.TypeInternal, oldTypedConstant.Kind, correctedParameterName))
Symbols\Source\SourceParameterSymbolBase.vb (1)
63ImmutableArray.Create(New TypedConstant(compilation.GetSpecialType(SpecialType.System_Int64),
Symbols\Source\SourcePropertyAccessorSymbol.vb (2)
61Return ImmutableArray.Create(valueParameter) 114ImmutableArray.Create(syntax.DeclarationKeyword.GetLocation()))
Symbols\Source\SourcePropertySymbol.vb (1)
453Return ImmutableArray.Create(_location)
Symbols\Source\SourceTypeParameterSymbol.vb (1)
340Return ImmutableArray.Create(GetSymbolLocation(_syntaxRef))
Symbols\Source\SourceWithEventsBackingFieldSymbol.vb (1)
75ImmutableArray.Create(New TypedConstant(compilation.GetSpecialType(SpecialType.System_String),
Symbols\Source\SynthesizedEntryPointSymbol.vb (6)
307ImmutableArray.Create(Of LocalSymbol)(scriptLocal.LocalSymbol), 308ImmutableArray.Create(Of BoundStatement)(scriptAssignment, scriptInitialize, returnStatement)).MakeCompilerGenerated() 321_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SynthesizedParameterSymbol(Me, submissionArrayType, ordinal:=0, isByRef:=False, name:="submissionArray")) 369ImmutableArray.Create(Of BoundExpression)(submissionArrayParameter), 387ImmutableArray.Create(Of LocalSymbol)(submissionLocal.LocalSymbol), 388ImmutableArray.Create(Of BoundStatement)(submissionAssignment, returnStatement)).MakeCompilerGenerated()
Symbols\Source\SynthesizedEventAccessorSymbol.vb (12)
62Dim parameterList = ImmutableArray.Create(Of ParameterSymbol)(parameter) 201arguments:=ImmutableArray.Create(Of BoundExpression)(fieldAccess), 220arguments:=ImmutableArray.Create(Of BoundExpression)(parameterAccess), 233statements:=ImmutableArray.Create(Of BoundStatement)(returnStatement)).MakeCompilerGenerated() 245statements:=ImmutableArray.Create(Of BoundStatement)(callStatement, returnStatement)).MakeCompilerGenerated() 299ImmutableArray.Create(Of BoundStatement)([return]) 343ImmutableArray.Create(Of BoundExpression)( 364ImmutableArray.Create(Of BoundStatement)( 372compareExchangeMethod = compareExchangeMethod.Construct(ImmutableArray.Create(Of TypeSymbol)(delegateType)) 420ImmutableArray.Create(Of BoundExpression)( 443ImmutableArray.Create(Of BoundExpression)(boundBackingField, boundTmps(2).MakeRValue(), boundTmps(1).MakeRValue()), 473ImmutableArray.Create(Of BoundStatement)(
Symbols\Source\SynthesizedInteractiveInitializerMethod.vb (2)
140ImmutableArray.Create(FunctionLocal), 141ImmutableArray.Create(Of BoundStatement)(New BoundLabelStatement(syntax, ExitLabel)))
Symbols\Source\SynthesizedMainTypeEntryPoint.vb (3)
75New BoundMethodGroup(syntaxNode, Nothing, ImmutableArray.Create(runMethod), LookupResultKind.Good, Nothing, QualificationKind.QualifiedViaTypeName), 76ImmutableArray.Create(instance), Nothing, diagnostics, 82Return New BoundBlock(syntaxNode, Nothing, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(statement, New BoundReturnStatement(syntaxNode, Nothing, Nothing, Nothing)))
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
128Return New BoundBlock(accessorBlock, Nothing, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundStatement)(boundStatement))
Symbols\Source\SynthesizedSubmissionConstructorSymbol.vb (5)
36_parameters = ImmutableArray.Create(Of ParameterSymbol)( 52ImmutableArray.Create(Of BoundStatement)(New BoundReturnStatement(node, Nothing, Nothing, Nothing))) 79New BoundArrayAccess(syntax, submissionArrayReference, ImmutableArray.Create(Of BoundExpression)(New BoundLiteral(syntax, ConstantValue.Create(slotIndex), intType)), isLValue:=True, type:=objectType), 93New BoundArrayAccess(syntax, submissionArrayReference, ImmutableArray.Create(Of BoundExpression)(New BoundLiteral(syntax, ConstantValue.Create(0), intType)), isLValue:=False, type:=objectType), 113New BoundArrayAccess(syntax, submissionArrayReference, ImmutableArray.Create(Of BoundExpression)(New BoundLiteral(syntax, ConstantValue.Create(targetSubmissionId), intType)), isLValue:=False, type:=objectType),
Symbols\Symbol.vb (1)
430Return ImmutableArray.Create(Of SyntaxReference)(New BeginOfBlockSyntaxReference(reference))
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (3)
77members = ImmutableArray.Create(Of Symbol)(ctor, invoke) 79members = ImmutableArray.Create(Of Symbol)(ctor, beginInvoke, endInvoke, invoke) 221Return ImmutableArray.Create(_syntaxRef.GetLocation())
Symbols\SynthesizedSymbols\SynthesizedGlobal_StringSwitchHashMethodSymbol.vb (1)
34_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SynthesizedParameterSimpleSymbol(Me, compilation.GetSpecialType(SpecialType.System_String), 0, "s"))
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionConstructorSymbol.vb (2)
19_parameters = ImmutableArray.Create(Of ParameterSymbol)( 80ImmutableArray.Create(Of BoundStatement)(
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionSymbol.vb (1)
29_members = ImmutableArray.Create(Of Symbol)(
Symbols\SynthesizedSymbols\SynthesizedLocal.vb (2)
36Return If(_syntaxOpt Is Nothing, ImmutableArray(Of Location).Empty, ImmutableArray.Create(_syntaxOpt.GetLocation())) 42Return If(_syntaxOpt Is Nothing, ImmutableArray(Of SyntaxReference).Empty, ImmutableArray.Create(_syntaxOpt.GetReference()))
Symbols\SynthesizedSymbols\SynthesizedMethod.vb (1)
193Return ImmutableArray.Create(Of SyntaxReference)(node.GetReference)
Symbols\SynthesizedSymbols\SynthesizedParameterSymbol.vb (1)
429Me._locations = ImmutableArray.Create(Of location)(location)
Symbols\SynthesizedSymbols\SynthesizedSimpleMethodSymbol.vb (1)
37ImmutableArray.Create(Of MethodSymbol)(interfaceMethod))
Symbols\Tuples\TupleErrorFieldSymbol.vb (1)
47Me._locations = If((location Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(location))
Symbols\Tuples\TupleFieldSymbol.vb (1)
151Me._locations = If((location Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(location))
Symbols\Tuples\TupleTypeSymbol.vb (4)
336Me.New(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 403Return TupleTypeSymbol.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 554Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (TupleTypeSymbol.RestPosition - 1), remainder)) 563Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (TupleTypeSymbol.RestPosition - 1), TupleTypeSymbol.RestPosition - 1).Add(namedTypeSymbol)
Symbols\TypeSymbolExtensions.vb (1)
1288ImmutableArray.Create(Of Cci.ICustomAttribute)(attr))
Symbols\WellKnownMembers.vb (6)
43Dim system_Runtime_CompilerServices = Me.GlobalNamespace.LookupNestedNamespace(ImmutableArray.Create(MetadataHelpers.SystemString, "Runtime", "CompilerServices")) 224Return TrySynthesizeAttribute(ctor, ImmutableArray.Create(arg)) 244ImmutableArray.Create( 260ImmutableArray.Create(New TypedConstant(GetWellKnownType(WellKnownType.System_Diagnostics_DebuggerBrowsableState), 276ImmutableArray.Create(New TypedConstant(GetWellKnownType(WellKnownType.System_ComponentModel_EditorBrowsableState), 712Dim args = ImmutableArray.Create(New TypedConstant(stringArray, names))
Utilities\TypeUnification.vb (2)
174ImmutableArray.Create(t2.CustomModifiers, t1.CustomModifiers.Length, t2.CustomModifiers.Length - t1.CustomModifiers.Length))) 190ImmutableArray.Create(t1.CustomModifiers, t2.CustomModifiers.Length, t1.CustomModifiers.Length - t2.CustomModifiers.Length)))
VisualBasicExtensions.vb (7)
637Return ImmutableArray.Create(Of INamedTypeSymbol)() 653Return ImmutableArray.Create(Of INamedTypeSymbol)() 745Return ImmutableArray.Create(Of IAliasSymbol)() 760Return ImmutableArray.Create(Of INamespaceOrTypeSymbol)() 1532Return ImmutableArray.Create(Of ISymbol) 1545Return ImmutableArray.Create(Of ISymbol) 1558Return ImmutableArray.Create(Of ISymbol)
VisualBasicParseOptions.vb (2)
44If(preprocessorSymbols Is Nothing, DefaultPreprocessorSymbols, ImmutableArray.CreateRange(preprocessorSymbols)), 81s_defaultPreprocessorSymbols = ImmutableArray.Create(KeyValuePairUtil.Create("_MYTYPE", CObj("Empty")))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (12)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
65Dim additionalLocations = ImmutableArray.Create(member.GetLocation())
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
21Private Shared ReadOnly s_kinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\NamingStyle\VisualBasicNamingStyleDiagnosticAnalyzer.vb (1)
15ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
19ImmutableArray.Create(SyntaxKind.CTypeExpression,
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\Utilities.vb (1)
10ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\UseInferredMemberName\VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
62additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))) 86additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan))))
src\Analyzers\VisualBasic\Analyzers\UseIsNotExpression\VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
76ImmutableArray.Create(notExpression.GetLocation()),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SelectedMembers\VisualBasicSelectedMembers.vb (1)
34Return ImmutableArray.Create((declaration:=DirectCast(member, SyntaxNode), identifier:=member.GetNameToken()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
267ImmutableArray.Create(Of ISymbol)(preprocessingSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (1)
605localVariables = ImmutableArray.Create(DirectCast(model.GetDeclaredSymbol(forEach), ILocalSymbol))
src\Workspaces\VisualBasic\Portable\Formatting\VisualBasicSyntaxFormatting.vb (1)
20Private ReadOnly _rules As ImmutableArray(Of AbstractFormattingRule) = ImmutableArray.Create(Of AbstractFormattingRule)(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (33)
src\Analyzers\VisualBasic\CodeFixes\AddAnonymousTypeMemberName\VisualBasicAddAnonymousTypeMemberNameCodeFixProvider.vb (1)
28ImmutableArray.Create(BC36556)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
34Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30512, BC42016, BC30518, BC30519)
src\Analyzers\VisualBasic\CodeFixes\AddObsoleteAttribute\VisualBasicAddObsoleteAttributeCodeFixProvider.vb (1)
18ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
46Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AliasAmbiguousType\VisualBasicAliasAmbiguousTypeCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30561)
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (1)
22Friend ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(Of String)(BC37001)
src\Analyzers\VisualBasic\CodeFixes\DocumentationComments\VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (1)
48Friend ReadOnly Id As ImmutableArray(Of String) = ImmutableArray.Create(BC42305, BC42306, BC42307, BC42313, BC42315, BC42317)
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorDiagnosticIds.vb (3)
21Friend Shared ReadOnly AllDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057, BC30272, BC30274, BC30389, BC30455, BC32006, BC30512, BC30387, BC30516) 22Friend Shared ReadOnly TooManyArgumentsDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057) 23Friend Shared ReadOnly CannotConvertDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30512, BC32006, BC30311, BC36625)
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
26ImmutableArray.Create(BC30387, BC40056)
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC30456)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC30311)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
50Return ImmutableArray.Create(BC30518, BC30519, BC30520, BC30521, BC30057, BC30112, BC30451, BC30455, BC30456, BC30401, BC30516, BC32016, BC32045, BC32087, BC36625, BC30107, BC30108, BC30109, BC30110, BC30111)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
159parameters:=ImmutableArray.Create(CodeGenerationSymbolFactory.CreateParameterSymbol(parameterSymbol, "v")),
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (1)
90Return ImmutableArray.Create(typeParameter)
src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
34Return ImmutableArray.Create(BC30456, BC30401, BC30451, BC36610)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30149)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
66interfaceTypes = ImmutableArray.Create(GetInterfaceType(model, interfaceNode, cancellationToken))
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
23Friend Shared ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(BC36942)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
25Friend Shared ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(BC30451)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
24Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
21Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC42356)
src\Analyzers\VisualBasic\CodeFixes\MakeTypeAbstract\VisualBasicMakeTypeAbstractCodeFixProvider.vb (1)
23ImmutableArray.Create("BC31411")
src\Analyzers\VisualBasic\CodeFixes\MakeTypePartial\VisualBasicMakeTypePartialCodeFixProvider.vb (1)
23Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC40046)
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\VisualBasicRemoveAsyncModifierCodeFixProvider.vb (1)
21Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC42356)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
27ImmutableArray.Create(IDEDiagnosticIds.RemoveUnnecessaryByValDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
31ImmutableArray.Create(IDEDiagnosticIds.RemoveUnnecessaryCastDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(IDEDiagnosticIds.SimplifyObjectCreationDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\UnsealClass\VisualBasicUnsealClassCodeFixProvider.vb (1)
24ImmutableArray.Create(BC30299)
src\Analyzers\VisualBasic\CodeFixes\UseIsNotExpression\VisualBasicUseIsNotExpressionCodeFixProvider.vb (1)
26Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(IDEDiagnosticIds.UseIsNotExpressionDiagnosticId)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (1)
46Dim rules = ImmutableArray.Create(New SpecialFormattingRule(options.IndentStyle), baseIndentationRule).
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\InitializeParameterHelpers.vb (1)
34Return SyntaxFactory.List(ImmutableArray.Create(convertedStatement))
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (13)
CommandLineTests.vb (13)
2520Return ImmutableArray.Create(MetadataReference.CreateFromFile(resolvedPath, properties)) 3459Assert.Equal(ImmutableArray.Create(Of KeyValuePair(Of String, String))(), parsedArgs.PathMap) 3476Assert.Equal(ImmutableArray.Create(Of KeyValuePair(Of String, String))(), parsedArgs.PathMap) 3565AssertEx.Equal(ImmutableArray.Create(Of String)(), args.KeyFileSearchPaths) 3577AssertEx.Equal(ImmutableArray.Create(sdkPath), parser.ReferencePaths) 3605AssertEx.Equal(ImmutableArray.Create(sdkDir.Path), parser.ReferencePaths) 9696$"Could not load file or assembly '{GetType(ImmutableArray).Assembly.FullName}' or one of its dependencies. The system cannot find the file specified.", 10986Return ImmutableArray.Create(Hidden01) 11011Return ImmutableArray.Create(Info01, Info02) 11037Return ImmutableArray.Create(Warning01, Warning02, Warning03) 11061Return ImmutableArray.Create(Warning04) 11085Return ImmutableArray.Create(Error01) 11106Return ImmutableArray.Create(Rule)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (6)
CodeCleanup\VisualBasicCodeCleanupService.vb (1)
21Private Shared ReadOnly s_diagnosticSets As ImmutableArray(Of DiagnosticSet) = ImmutableArray.Create(
LineCommit\CommitFormatter.vb (2)
97ImmutableArray.Create(textSpanToFormat), 106ImmutableArray.Create(textSpanToFormat),
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (3)
70formatterRules = ImmutableArray.Create(Of AbstractFormattingRule)(LineAdjustmentFormattingRule.Instance).AddRange(formatterRules) 196handlesExpressions:=ImmutableArray.Create(Of SyntaxNode)(handlesSyntax)) 239statements:=ImmutableArray.Create(finalizeCall))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (284)
Attributes\AttributeTests.vb (5)
2193Dim classYOfW As NamedTypeSymbol = classY.Construct(ImmutableArray.Create(Of TypeSymbol)(classW)) 2200Dim classYOfInt As NamedTypeSymbol = classY.Construct(ImmutableArray.Create(Of TypeSymbol)(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32))) 2209Dim substNestedZ As NamedTypeSymbol = classYOfInt.GetTypeMember("Z").Construct(ImmutableArray.Create(Of TypeSymbol)(classW)) 3943Assert.Equal(ImmutableArray.Create(Of VisualBasicAttributeData)(), e.GetFieldAttributes) 3948Assert.Equal(ImmutableArray.Create(Of VisualBasicAttributeData)(), p.GetFieldAttributes)
Attributes\AttributeTests_Conditional.vb (14)
283TestConditionAttributeType_SameSource(condDefs, ImmutableArray.Create(Of KeyValuePair(Of String, Object))()) 287TestConditionAttributeType_DifferentSource(condDefsSrcFile1, ImmutableArray.Create(Of KeyValuePair(Of String, Object))(), condDefsSrcFile2, ImmutableArray.Create(Of KeyValuePair(Of String, Object))()) 337Dim preprocessorSymbols = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond1", 1), 342Dim preprocessorSymbolsDummy = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond2", 1), 380Dim preprocessorSymbols = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond1", 1), 395Dim preprocessorSymbolsDummy = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond2", 1), 561TestConditionalMethod_SameSource(condDefs, ImmutableArray.Create(Of KeyValuePair(Of String, Object))()) 574TestConditionalMethod_DifferentSource(condDefsSrcFile1, ImmutableArray.Create(Of KeyValuePair(Of String, Object))(), condDefsSrcFile2, ImmutableArray.Create(Of KeyValuePair(Of String, Object))()) 624Dim preprocessorSymbols = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond1", 1), 629Dim preprocessorSymbolsDummy = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond2", 1), 668Dim preprocessorSymbols = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond1", 1), 683Dim preprocessorSymbolsDummy = ImmutableArray.Create(Of KeyValuePair(Of String, Object))(New KeyValuePair(Of String, Object)("cond2", 1),
Attributes\AttributeTests_Synthesized.vb (1)
1827namedArguments:=ImmutableArray.Create(New KeyValuePair(Of WellKnownMember, TypedConstant)(
Attributes\AttributeTests_WellKnownAttributes.vb (1)
188Assert.Equal(ImmutableArray.Create(Of SyntaxReference)(), m.DeclaringSyntaxReferences)
Attributes\InternalsVisibleToAndStrongNameTests.vb (2)
52Return New DesktopStrongNameProvider(ImmutableArray.Create(keyFilePath), New VirtualizedStrongNameFileSystem()) 478WithCryptoPublicKey(ImmutableArray.Create(Of Byte)(1, 2, 3)).
CodeGen\CodeGenTuples.vb (51)
6868Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item1"))) 6873ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, elementLocations:=ImmutableArray.Create(loc1))) 6890Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create(Of String)(Nothing, Nothing)) 6924vt2, ImmutableArray.Create("i1", "i2"), ImmutableArray.Create(loc1, loc2)) 6963Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")) 6984Dim tupleWithSomeNames = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create(Nothing, "Item2", "Charlie")) 7003Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")) 7050Dim tuple8WithNames = comp.CreateTupleTypeSymbol(vt8, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")) 7100Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")) 7125Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")) 7173Dim tuple2 = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create("123", " ", Nothing)) 7177Dim tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")) 7194Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))) 7224Assert.Throws(Of ArgumentException)(Sub() comp.CreateTupleTypeSymbol(elementTypes:=ImmutableArray.Create(intType), elementNames:=Nothing)) 7227Assert.Throws(Of ArgumentException)(Sub() comp.CreateTupleTypeSymbol(elementTypes:=ImmutableArray.Create(intType, intType), elementNames:=ImmutableArray.Create("Item1"))) 7230Assert.Throws(Of ArgumentNullException)(Sub() comp.CreateTupleTypeSymbol(elementTypes:=ImmutableArray.Create(intType, Nothing), elementNames:=Nothing)) 7246Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create(Of String)(Nothing, Nothing)) 7273ImmutableArray.Create(intType, stringType), 7274ImmutableArray.Create("i1", "i2"), 7275ImmutableArray.Create(loc1, loc2)) 7293Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), Nothing) 7311Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create("Alice", "Bob")) 7328Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("Item2", "Item1")) 7345Dim tuple8WithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType), 7366Dim tuple8WithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType), 7367ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")) 7387Dim tuple9WithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType, intType), 7408Dim tuple9WithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType, intType, stringType, intType, stringType, intType, stringType, intType), 7409ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")) 7433Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, ErrorTypeSymbol.UnknownResultType), Nothing) 7452Dim tuple2 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("123", " ")) 7456Dim tuple3 = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("return", "class")) 7483Assert.Throws(Of ArgumentException)(Sub() comp.CreateTupleTypeSymbol(ImmutableArray.Create(stringType, csType), Nothing)) 7506Dim twoStringsWithNames = DirectCast(comp.CreateTupleTypeSymbol(twoStrings, ImmutableArray.Create("a", "b")), TypeSymbol) 7510Dim tuple3 = DirectCast(comp.CreateTupleTypeSymbol(ImmutableArray.Create(Of ITypeSymbol)(intType, intType, intType, intType, intType, intType, intType, stringType, stringType), 7511ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")), TypeSymbol) 7514ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")), TypeSymbol) 7619elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)) 7625elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)) 7631elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)) 7680elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)) 7686elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)) 7692elementNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)) 7724Return ImmutableArray.CreateRange(Enumerable.Range(0, n).Select(Function(i) annotation))
Emit\CompilationEmitTests.vb (2)
1798MetadataReaderUtils.AssertNotThrowNull(ImmutableArray.CreateRange(output.GetBuffer())) 1799MetadataReaderUtils.AssertEmptyOrThrowNull(ImmutableArray.CreateRange(metadataOutput.GetBuffer()))
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.vb (8)
76Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 193Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 293Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 361Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 455Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 560Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 650Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 747Dim peImage = c.EmitToArray(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)))
Emit\DynamicAnalysis\DynamicInstrumentationTests.vb (7)
158Dim preprocessorSymbols = ImmutableArray.Create(New KeyValuePair(Of String, Object)("_MyType", "Console")) 1915Dim diagnostics As ImmutableArray(Of Diagnostic) = CreateCompilation(source).GetEmitDiagnostics(EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 2345Dim verifier = CompileAndVerify(c, emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 2382Dim verifier = CompileAndVerify(c, emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 2819emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 2827emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))) 2835emitOptions:=EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)),
Emit\EditAndContinue\AssemblyReferencesTests.vb (9)
81ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1))) 87ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2))) 187ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1))) 191ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2), 272ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1))) 343ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1))) 469ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, m0, m1, GetSyntaxMapFromMarkers(source0, source1)))) 478ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))) 490ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, m2, m3, GetSyntaxMapFromMarkers(source2, source3))))
Emit\EditAndContinue\EditAndContinueClosureTests.vb (33)
54ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, compilation1.GetMember(Of MethodSymbol)("C.F"), compilation1.GetMember(Of MethodSymbol)("C.F")))) 112ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 163ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 215ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 268ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 347ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, ctor0, ctor1, GetSyntaxMapFromMarkers(source0, source1)))) 431ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 540ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 634ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, ctor0, ctor1, GetSyntaxMapFromMarkers(source0, source1)))) 703ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 776ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 840ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 906ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 987ImmutableArray.Create( 1013ImmutableArray.Create( 1103ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 1147ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))) 1203ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f2, f3, GetSyntaxMapFromMarkers(source2, source3)))) 1346ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 1370ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))) 1477ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, f_int1))) 1492ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, f_byte2))) 1557Dim diff1 = compilation1.EmitDifference(generation0, ImmutableArray.Create( 1673ImmutableArray.Create( 1772ImmutableArray.Create( 1859ImmutableArray.Create( 1900ImmutableArray.Create( 2013ImmutableArray.Create( 2045ImmutableArray.Create( 2134ImmutableArray.Create( 2145ImmutableArray.Create( 2212ImmutableArray.Create( 2223ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinuePdbTests.vb (2)
154ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, syntaxMap1), 254ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, syntaxMap2),
Emit\EditAndContinue\EditAndContinueStateMachineTests.vb (58)
61ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, compilation1.GetMember(Of MethodSymbol)("C.G")))) 415ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, compilation1.GetMember(Of MethodSymbol)("C.F")))) 742ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 850ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 929ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 977ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 1538ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 1987ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 1991ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))) 2578ImmutableArray.Create( 3040ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 3210ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 3599ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 3704ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 3814ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 3920ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 4053ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 4220ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 4481ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 4643ImmutableArray.Create( 4973ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 5481ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 5920ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 6377ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 6530ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 6688ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 6842ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 7100ImmutableArray.Create( 7112ImmutableArray.Create( 7123ImmutableArray.Create( 7601ImmutableArray.Create( 7613ImmutableArray.Create( 7624ImmutableArray.Create( 8069ImmutableArray.Create( 8078ImmutableArray.Create( 8087ImmutableArray.Create( 8096ImmutableArray.Create( 8207ImmutableArray.Create( 8220ImmutableArray.Create( 8334ImmutableArray.Create( 8444ImmutableArray.Create( 8565ImmutableArray.Create( 8576ImmutableArray.Create( 8706ImmutableArray.Create( 8717ImmutableArray.Create( 8779ImmutableArray.Create( 8790ImmutableArray.Create( 8803ImmutableArray.Create( 8814ImmutableArray.Create( 8825ImmutableArray.Create( 8875ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 8933ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 8989ImmutableArray.Create( 9051ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 9104ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 9143ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 9182ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 9222ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1))))
Emit\EditAndContinue\EditAndContinueTests.vb (77)
101ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, e0, e1, GetSyntaxMapFromMarkers(source0, source1)))) 108ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, g0, g1, GetSyntaxMapFromMarkers(source0, source1)))) 155ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, g0, g1, GetSyntaxMapFromMarkers(source0, source1)))) 193Dim diff1 = compilation1.EmitDifference(generation0, ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 255Dim diff1 = compilation1.EmitDifference(generation0, ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 358ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 442ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, type1))) 485ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1, method2))) 508ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, type3))) 574ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 650ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, compilation1.GetMembers("M.C.M1")(2)), 705ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, compilation1.GetMembers("M.C.M2")(0), compilation2.GetMembers("M.C.M2")(0)))) 774ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, compilation1.GetMember("M.G")))) 840ImmutableArray.Create( 1070ImmutableArray.Create( 1085ImmutableArray.Create( 1153ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 1253ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1A, GetEquivalentNodesMap(method1A, method0)))) 1264ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1B, GetEquivalentNodesMap(method1B, method0)))) 1332ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 1812ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, c0, c1))) 1833ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, c1, c2))) 2000ImmutableArray.Create( 2008ImmutableArray.Create( 2017ImmutableArray.Create( 2085ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, syntaxMap:=Function(s) Nothing))) 2174ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, method1))) 2234ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, getter0, getter1))) 2765ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 2930ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 2984ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1, method2, GetEquivalentNodesMap(method2, method1)))) 3041ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method2, method3, GetEquivalentNodesMap(method3, method2)))) 3132ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, method1, Nothing))) 3137ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1, method2, GetEquivalentNodesMap(method2, method1)))) 3216ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 3290ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 3376ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 3470ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 3555ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 3690ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 3871ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 4050ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 4246ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 4402ImmutableArray.Create(edit)) 4503ImmutableArray.Create(edit)) 4604ImmutableArray.Create(edit)) 4800ImmutableArray.Create( 4820ImmutableArray.Create( 4876ImmutableArray.Create( 4892ImmutableArray.Create( 4977ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 5099ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source0, source1)))) 5126ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1, method2, GetSyntaxMapFromMarkers(source1, source2)))) 5158ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method2, method3, GetSyntaxMapFromMarkers(source2, source3)))) 5278ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0F, method1F, GetEquivalentNodesMap(method1F, method0F)))) 5286ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1G, method2G, GetEquivalentNodesMap(method2G, method1G)))) 5294ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method2G, method3G, GetEquivalentNodesMap(method3G, method2G)))) 5347ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 5429ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 5458ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method1, method2, GetEquivalentNodesMap(method2, method1)))) 5581ImmutableArray.Create( 5592ImmutableArray.Create( 5664ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 5690ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2)))) 5776ImmutableArray.Create(edit)) 5857ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 5894ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0)))) 6669ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, compilation1.GetMember(Of MethodSymbol)("C.Main"))), 6714ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1))) 6783ImmutableArray.Create( 6792ImmutableArray.Create( 6847ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetEquivalentNodesMap(f1, f0)))) 6866ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetEquivalentNodesMap(f2, f1)))) 6928ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 7071ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 7216ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, e0, e1, GetSyntaxMapFromMarkers(source0, source1)))) 7223ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Insert, Nothing, g1)))
Emit\EditAndContinue\LocalSlotMappingTests.vb (4)
121ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source, source)))) 287ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, method0, method1, GetSyntaxMapFromMarkers(source, source)))) 995ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f0, f1, GetSyntaxMapFromMarkers(source0, source1)))) 1026ImmutableArray.Create(New SemanticEdit(SemanticEditKind.Update, f1, f2, GetSyntaxMapFromMarkers(source1, source2))))
Emit\EditAndContinue\SymbolMatcherTests.vb (7)
336Assert.Equal("VB$AnonymousType_0", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(New AnonymousTypeKeyField("A", isKey:=False, ignoreCase:=True)))).Name) 337Assert.Equal("VB$AnonymousType_1", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(New AnonymousTypeKeyField("B", isKey:=False, ignoreCase:=True)))).Name) 406Assert.Equal("VB$AnonymousType_0", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(New AnonymousTypeKeyField("A", isKey:=False, ignoreCase:=True)))).Name) 407Assert.Equal("VB$AnonymousType_1", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(New AnonymousTypeKeyField("X", isKey:=False, ignoreCase:=True)))).Name) 408Assert.Equal("VB$AnonymousType_2", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(New AnonymousTypeKeyField("Y", isKey:=False, ignoreCase:=True)))).Name) 477Assert.Equal("VB$AnonymousDelegate_0", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create( 481Assert.Equal("VB$AnonymousDelegate_1", anonymousTypeMap0(New AnonymousTypeKey(ImmutableArray.Create(
Emit\EmitMetadata.vb (2)
481Assert.Equal(ImmutableArray.Create(Of Location)(), method1Ret.Locations) 482Assert.Equal(ImmutableArray.Create(Of SyntaxReference)(), method1Ret.DeclaringSyntaxReferences)
Emit\NoPiaEmbedTypes.vb (1)
2677Dim dispIdDefinition = CreateCSharpCompilation(dispId, assemblyName:="DispId", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib461Extended, Nothing)).EmitToImageReference(aliases:=ImmutableArray.Create("dispId"))
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (22)
CompilationContext.vb (2)
161additionalTypes:=ImmutableArray.Create(DirectCast(synthesizedType, NamedTypeSymbol)), 219Return ImmutableArray.Create(Of MethodSymbol)(constructor)
EvaluationContext.vb (9)
308Dim projectLevelImportRecords = ImmutableArray.CreateRange([imports].Select( 319Dim importRecordGroups = ImmutableArray.Create(fileLevelImportRecords, projectLevelImportRecords) 571Return ImmutableArray.Create(identity) 578Return ImmutableArray.Create(identity) 589Return ImmutableArray.Create(identity) 592Return ImmutableArray.Create(linqLibrary) 622Return ImmutableArray.Create(identity) 628Return ImmutableArray.Create(SystemIdentity, linqLibrary, SystemXmlIdentity, SystemXmlLinqIdentity) 630Return ImmutableArray.Create(MicrosoftVisualBasicIdentity)
Rewriters\LocalDeclarationRewriter.vb (1)
82arguments:=ImmutableArray.Create(Of BoundExpression)(type, name, customTypeInfoPayloadId, customTypeInfoPayload),
Symbols\EEConstructorSymbol.vb (1)
22ImmutableArray.Create(Of BoundStatement)(
Symbols\EELocalSymbolBase.vb (1)
26Friend Shared ReadOnly NoLocations As ImmutableArray(Of Location) = ImmutableArray.Create(NoLocation.Singleton)
Symbols\EEMethodSymbol.vb (1)
71_locations = ImmutableArray.Create(location)
Symbols\EENamedTypeSymbol.vb (2)
36MyClass.New(container, baseType, syntax, currentFrame, typeName, Function(m, t) ImmutableArray.Create(Of MethodSymbol)(context.CreateMethod(t, methodName, syntax, generateMethodBody))) 265Return ImmutableArray.Create(_syntax.GetLocation())
Symbols\ObjectIdLocalSymbol.vb (1)
111arguments:=ImmutableArray.Create(Of BoundExpression)(argument),
Symbols\ReturnValueLocalSymbol.vb (1)
44arguments:=ImmutableArray.Create(Of BoundExpression)(argument),
VisualBasicInstructionDecoder.vb (3)
77ImmutableArray.Create(typeParameters, 0, methodArgumentStartIndex), 78ImmutableArray.Create(typeArguments, 0, methodArgumentStartIndex)) 82method = method.Construct(ImmutableArray.Create(typeArguments, methodArgumentStartIndex, methodArity))
Microsoft.CodeAnalysis.VisualBasic.Features (262)
AddImport\VisualBasicAddImportCodeFixProvider.vb (1)
98Return ImmutableArray.Create(BC30002, BC30451, BC30456, BC32042, BC36593, BC32045, BC30389, BC31504, BC32016, BC36610,
AddImport\VisualBasicAddMissingImportsFeatureService.vb (1)
26Return ImmutableArray.Create(Of AbstractFormattingRule)(New CleanUpNewLinesFormatter(text))
AddPackage\VisualBasicAddSpecificPackageCodeFixProvider.vb (1)
25Return ImmutableArray.Create(BC37267)
ChangeSignature\VisualBasicChangeSignatureService.vb (5)
28Private Shared ReadOnly _declarationKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create( 38_declarationKinds.Concat(ImmutableArray.Create( 47Private Shared ReadOnly _nodeKindsToIgnore As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create( 50Private Shared ReadOnly _updatableNodeKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create( 71Private Shared ReadOnly _updatableAncestorKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
CodeFixes\AddMissingReference\VisualBasicAddMissingReferenceCodeFixProvider.vb (1)
27ImmutableArray.Create(BC30005, BC30652)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
26Return ImmutableArray.Create(BC30070, BC30451)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
53Return ImmutableArray.Create(BC30025, BC30026, BC30027, BC30081, BC30082, BC30083, BC30084, BC30085, BC30185, BC30253, BC30384, BC30481, BC30624, BC30625,
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
34Return ImmutableArray.Create(BC30401, BC30590, BC30456, BC30451)
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.vb (1)
39Return ImmutableArray.Create(BC30002, IDEDiagnosticIds.UnboundIdentifierId, BC30182, BC30451, BC30456, BC32042, BC32043, BC32045, BC40056)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
48Return ImmutableArray.Create(BC30781, BC30782, BC30783, BC30784, BC30240, BC30065, BC30066, BC30067, BC30089, BC30096, BC30097, BC30099, BC30393, BC30689)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC36938, BC36945)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
33Return ImmutableArray.Create(BC30465, BC30637, BC30627)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
76newNode = Await cleanupService.CleanupAsync(newNode, ImmutableArray.Create(newNode.Span), options, services, cleanupService.GetDefaultProviders(), cancellationToken).ConfigureAwait(False)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (1)
28Return ImmutableArray.Create(BC40003, BC40004)
CodeRefactorings\NodeSelectionHelpers.vb (2)
22Return ImmutableArray.Create(Of SyntaxNode)(methodMember) 33Return ImmutableArray.Create(Of SyntaxNode)(modifiedIdentifier)
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
104Dim additionalFilterTexts = ImmutableArray.Create(symbols(0).Symbol.Name)
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
251symbols:=ImmutableArray.Create(symbol),
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
151item = item.AddTag(WellKnownTags.TargetTypeMatch).WithAdditionalFilterTexts(ImmutableArray.Create(symbols(0).Symbol.Name))
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (2)
187Return ImmutableArray.CreateRange(Of ISymbol)([interface].AllInterfaces.SelectMany(Function(i) i.GetMembers()).Where(Function(s) s.IsAccessibleWithin(within))) _ 263Return symbols.Concat(ImmutableArray.Create(Of ISymbol)(withGlobalContainer.ContainingNamespace))
Completion\CompletionProviders\KeywordCompletionProvider.vb (2)
23Private Shared ReadOnly s_tags As ImmutableArray(Of String) = ImmutableArray.Create(WellKnownTags.Intrinsic) 28MyBase.New(ImmutableArray.Create(Of IKeywordRecommender(Of VisualBasicSyntaxContext))(
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (2)
96symbols:=ImmutableArray.Create(parameter), 164ImmutableArray.CreateRange(namedParameters))
Completion\CompletionProviders\ObjectCreationCompletionProvider.vb (1)
61commitCharacterRules:=ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, " "c, "("c)),
Completion\CompletionProviders\PartialTypeCompletionProvider.vb (1)
69Return ImmutableArray.Create(
Completion\CompletionProviders\SymbolCompletionProvider.vb (1)
42commitCharacterRules:=ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, "."c)))
Completion\KeywordRecommenders\ArrayStatements\EraseKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Erase", VBFeaturesResources.Used_to_release_array_variables_and_deallocate_the_memory_used_for_their_elements))
Completion\KeywordRecommenders\ArrayStatements\PreserveKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Preserve", VBFeaturesResources.Prevents_the_contents_of_an_array_from_being_cleared_when_the_dimensions_of_the_array_are_changed))
Completion\KeywordRecommenders\ArrayStatements\ReDimKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("ReDim", VBFeaturesResources.Reallocates_storage_space_for_an_array_variable))
Completion\KeywordRecommenders\Declarations\AliasKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Alias", VBFeaturesResources.Indicates_that_an_external_procedure_has_another_name_in_its_DLL))
Completion\KeywordRecommenders\Declarations\AsKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("As", VBFeaturesResources.Specifies_a_data_type_in_a_declaration_statement))
Completion\KeywordRecommenders\Declarations\AsyncKeywordRecommender.vb (1)
15ImmutableArray.Create(New RecommendedKeyword("Async", VBFeaturesResources.Indicates_an_asynchronous_method_that_can_use_the_Await_operator))
Completion\KeywordRecommenders\Declarations\AttributeScopesKeywordRecommender.vb (1)
19ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\CharsetModifierKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\ClassKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Class", VBFeaturesResources.Declares_the_name_of_a_class_and_introduces_the_definitions_of_the_variables_properties_and_methods_that_make_up_the_class))
Completion\KeywordRecommenders\Declarations\ConstKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Const", VBFeaturesResources.Declares_and_defines_one_or_more_constants))
Completion\KeywordRecommenders\Declarations\CovarianceModifiersKeywordRecommender.vb (1)
16Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\CustomEventKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Custom Event", VBFeaturesResources.Specifies_that_an_event_has_additional_specialized_code_for_adding_handlers_removing_handlers_and_raising_events))
Completion\KeywordRecommenders\Declarations\DeclareKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Declare", VBFeaturesResources.Declares_a_reference_to_a_procedure_implemented_in_an_external_file))
Completion\KeywordRecommenders\Declarations\DelegateKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Delegate", VBFeaturesResources.Used_to_declare_a_delegate_A_delegate_is_a_reference_type_that_refers_to_a_shared_method_of_a_type_or_to_an_instance_method_of_an_object_Any_procedure_that_is_convertible_or_that_has_matching_parameter_types_and_return_type_may_be_used_to_create_an_instance_of_this_delegate_class))
Completion\KeywordRecommenders\Declarations\DelegateSubFunctionKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\DimKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Dim", VBFeaturesResources.Declares_and_allocates_storage_space_for_one_or_more_variables_Dim_var_bracket_As_bracket_New_bracket_dataType_bracket_boundList_bracket_bracket_bracket_initializer_bracket_bracket_var2_bracket))
Completion\KeywordRecommenders\Declarations\EnumKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Enum", VBFeaturesResources.Declares_an_enumeration_and_defines_the_values_of_its_members))
Completion\KeywordRecommenders\Declarations\EventKeywordRecommender.vb (1)
20ImmutableArray.Create(New RecommendedKeyword("Event", VBFeaturesResources.Declares_a_user_defined_event))
Completion\KeywordRecommenders\Declarations\ExternalSubFunctionKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\FunctionKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Function", VBFeaturesResources.Declares_the_name_parameters_and_code_that_define_a_Function_procedure_that_is_a_procedure_that_returns_a_value_to_the_calling_code))
Completion\KeywordRecommenders\Declarations\ImplementsKeywordRecommender.vb (2)
28Return ImmutableArray.Create(New RecommendedKeyword("Implements", VBFeaturesResources.Specifies_one_or_more_interfaces_or_interface_members_that_must_be_implemented_in_the_class_or_structure_definition_in_which_the_Implements_statement_appears)) 47Return ImmutableArray.Create(New RecommendedKeyword("Implements", VBFeaturesResources.Indicates_that_a_class_or_structure_member_is_providing_the_implementation_for_a_member_defined_in_an_interface))
Completion\KeywordRecommenders\Declarations\ImportsKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Imports", VBFeaturesResources.Imports_all_or_specified_elements_of_a_namespace_into_a_file))
Completion\KeywordRecommenders\Declarations\InheritsKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Inherits", VBFeaturesResources.Causes_the_current_class_or_interface_to_inherit_the_attributes_variables_properties_procedures_and_events_from_another_class_or_set_of_interfaces))
Completion\KeywordRecommenders\Declarations\InKeywordRecommender.vb (2)
40Return ImmutableArray.Create(New RecommendedKeyword("In", VBFeaturesResources.Specifies_the_group_that_the_loop_variable_in_a_For_Each_statement_is_to_traverse)) 47Return ImmutableArray.Create(New RecommendedKeyword("In", VBFeaturesResources.Specifies_the_group_that_the_range_variable_is_to_traverse_in_a_query))
Completion\KeywordRecommenders\Declarations\InterfaceKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Interface", VBFeaturesResources.Declares_the_name_of_an_interface_and_the_definitions_of_the_members_of_the_interface))
Completion\KeywordRecommenders\Declarations\IteratorKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Iterator", VBFeaturesResources.Indicates_an_iterator_method_that_can_use_the_Yield_statement))
Completion\KeywordRecommenders\Declarations\LibKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Lib", VBFeaturesResources.Introduces_a_clause_that_identifies_the_external_file_DLL_or_code_resource_containing_an_external_procedure))
Completion\KeywordRecommenders\Declarations\ModuleKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Module", VBFeaturesResources.Specifies_that_an_attribute_at_the_beginning_of_a_source_file_applies_to_the_entire_module_Otherwise_the_attribute_will_apply_only_to_an_individual_programming_element_such_as_a_class_or_property))
Completion\KeywordRecommenders\Declarations\NamespaceKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Namespace", VBFeaturesResources.Declares_the_name_of_a_namespace_and_causes_the_source_code_following_the_declaration_to_be_compiled_within_that_namespace))
Completion\KeywordRecommenders\Declarations\OfKeywordRecommender.vb (9)
30Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 38Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 46Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 53Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 61Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 65Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 74Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 88Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure)) 98Return ImmutableArray.Create(New RecommendedKeyword("Of", VBFeaturesResources.Identifies_a_type_parameter_on_a_generic_class_structure_interface_delegate_or_procedure))
Completion\KeywordRecommenders\Declarations\OperatorKeywordRecommender.vb (2)
24Return ImmutableArray.Create(New RecommendedKeyword("Operator CType", VBFeaturesResources.Returns_the_result_of_explicitly_converting_an_expression_to_a_specified_data_type_object_structure_class_or_interface_CType_Object_As_Expression_Object_As_Type_As_Type)) 26Return ImmutableArray.Create(New RecommendedKeyword("Operator", VBFeaturesResources.Declares_the_operator_symbol_operands_and_code_that_define_an_operator_procedure_on_a_class_or_structure))
Completion\KeywordRecommenders\Declarations\OverloadableOperatorRecommender.vb (1)
33Return ImmutableArray.Create(New RecommendedKeyword("CType", VBFeaturesResources.Returns_the_result_of_explicitly_converting_an_expression_to_a_specified_data_type_object_structure_class_or_interface_CType_Object_As_Expression_Object_As_Type_As_Type))
Completion\KeywordRecommenders\Declarations\PropertyKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Property", VBFeaturesResources.Declares_the_name_of_a_property_and_the_property_procedures_used_to_store_and_retrieve_the_value_of_the_property))
Completion\KeywordRecommenders\Declarations\StaticKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Static", VBFeaturesResources.Specifies_that_one_or_more_declared_local_variables_are_to_remain_in_existence_and_retain_their_latest_values_after_the_procedure_in_which_they_are_declared_terminates))
Completion\KeywordRecommenders\Declarations\StructureKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Structure", VBFeaturesResources.Declares_the_name_of_a_structure_and_introduces_the_definition_of_the_variables_properties_events_and_procedures_that_make_up_the_structure))
Completion\KeywordRecommenders\Declarations\SubKeywordRecommender.vb (2)
24Return ImmutableArray.Create(New RecommendedKeyword("Sub", VBFeaturesResources.Declares_the_name_parameters_and_code_that_define_a_Sub_procedure_that_is_a_procedure_that_does_not_return_a_value_to_the_calling_code)) 37Return ImmutableArray.Create(New RecommendedKeyword("Sub", VBFeaturesResources.Exits_a_Sub_procedure_and_transfers_execution_immediately_to_the_statement_following_the_call_to_the_Sub_procedure))
Completion\KeywordRecommenders\Declarations\ToKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("To", VBFeaturesResources.Separates_the_beginning_and_ending_values_of_a_loop_counter_or_array_bounds_or_that_of_a_value_match_range))
Completion\KeywordRecommenders\EventHandling\AddHandlerKeywordRecommender.vb (1)
19ImmutableArray.Create(CreateRecommendedKeywordForIntrinsicOperator(
Completion\KeywordRecommenders\EventHandling\HandlesKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Handles", VBFeaturesResources.Declares_that_a_procedure_handles_a_specified_event))
Completion\KeywordRecommenders\EventHandling\RaiseEventKeywordRecommender.vb (2)
19Return ImmutableArray.Create(New RecommendedKeyword("RaiseEvent", VBFeaturesResources.Triggers_an_event_declared_at_module_level_within_a_class_form_or_document_RaiseEvent_eventName_bracket_argumentList_bracket)) 21Return ImmutableArray.Create(New RecommendedKeyword("RaiseEvent", VBFeaturesResources.Specifies_the_statements_to_run_when_the_event_is_raised_by_the_RaiseEvent_statement_RaiseEvent_delegateSignature_End_RaiseEvent))
Completion\KeywordRecommenders\EventHandling\RemoveHandlerKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\AddressOfKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("AddressOf", VBFeaturesResources.Creates_a_delegate_procedure_instance_that_references_the_specified_procedure_AddressOf_procedureName))
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (1)
18Friend Shared ReadOnly KeywordList As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\FromKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("From", VBFeaturesResources.Identifies_a_list_of_values_as_a_collection_initializer))
Completion\KeywordRecommenders\Expressions\GetTypeKeywordRecommender.vb (1)
20Return ImmutableArray.Create(CreateRecommendedKeywordForIntrinsicOperator(
Completion\KeywordRecommenders\Expressions\GetXmlNamespaceKeywordRecommender.vb (1)
20Return ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\GlobalKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Global"))
Completion\KeywordRecommenders\Expressions\IfKeywordRecommender.vb (1)
19ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\KeyKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Key", VBFeaturesResources.Identifies_a_key_field_in_an_anonymous_type_definition))
Completion\KeywordRecommenders\Expressions\LambdaKeywordRecommender.vb (3)
19Return ImmutableArray.Create( 29Return ImmutableArray.Create(New RecommendedKeyword("Function", VBFeaturesResources.Defines_a_lambda_expression_that_calculates_and_returns_a_single_value_Can_be_used_wherever_a_delegate_type_is_expected_Function_parameterList_expression)) 31Return ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\MeKeywordRecommender.vb (3)
39Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running, matchPriority:=priority)) 46Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running)) 52Return ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MeKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_current_instance_of_a_class_or_structure_that_is_the_instance_in_which_the_code_is_running))
Completion\KeywordRecommenders\Expressions\MyBaseKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MyBaseKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_base_class_of_the_current_class_instance_You_cannot_use_MyBase_to_call_MustOverride_base_methods))
Completion\KeywordRecommenders\Expressions\MyClassKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword(SyntaxFacts.GetText(SyntaxKind.MyClassKeyword), VBFeaturesResources.Provides_a_way_to_refer_to_the_class_instance_members_as_originally_implemented_ignoring_any_derived_class_overrides))
Completion\KeywordRecommenders\Expressions\NameOfKeywordRecommender.vb (1)
17Return ImmutableArray.Create(CreateRecommendedKeywordForIntrinsicOperator(
Completion\KeywordRecommenders\Expressions\NewKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("New", VBFeaturesResources.Creates_a_new_object_instance))
Completion\KeywordRecommenders\Expressions\NothingKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Nothing", VBFeaturesResources.Represents_the_default_value_of_any_data_type))
Completion\KeywordRecommenders\Expressions\NotKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Not", VBFeaturesResources.Performs_logical_negation_on_a_Boolean_expression_or_bitwise_negation_on_a_numeric_expression_result_Not_expression))
Completion\KeywordRecommenders\Expressions\TrueFalseKeywordRecommender.vb (1)
23Return ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\TypeOfKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("TypeOf", VBFeaturesResources.Determines_the_run_time_type_of_an_object_reference_variable_and_compares_it_to_a_data_type_Returns_True_or_False_depending_on_whether_the_two_types_are_compatible_result_TypeOf_objectExpression_Is_typeName))
Completion\KeywordRecommenders\Expressions\WithKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("With", VBFeaturesResources.Specifies_the_declaration_of_property_initializations_in_an_object_initializer_New_typeName_With_bracket_property_expression_bracket_bracket_bracket))
Completion\KeywordRecommenders\OnErrorStatements\ErrorKeywordRecommender.vb (2)
21Return ImmutableArray.Create( 28Return ImmutableArray.Create(New RecommendedKeyword("Error", VBFeaturesResources.Simulates_the_occurrence_of_an_error))
Completion\KeywordRecommenders\OnErrorStatements\GoToDestinationsRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("0"), New RecommendedKeyword("-1"))
Completion\KeywordRecommenders\OnErrorStatements\GoToKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("GoTo", VBFeaturesResources.Branches_unconditionally_to_a_specified_line_in_a_procedure))
Completion\KeywordRecommenders\OnErrorStatements\NextKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Next", VBFeaturesResources.When_a_run_time_error_occurs_execution_transfers_to_the_statement_following_the_statement_or_procedure_call_that_resulted_in_the_error))
Completion\KeywordRecommenders\OnErrorStatements\OnErrorKeywordRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\OnErrorStatements\ResumeKeywordRecommender.vb (2)
26Return ImmutableArray.Create( 31Return ImmutableArray.Create(
Completion\KeywordRecommenders\OptionStatements\CompareBinaryTextRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\OptionStatements\ExplicitOptionsRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\OptionStatements\InferOptionsRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\OptionStatements\OptionKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Option", VBFeaturesResources.Introduces_a_statement_that_specifies_a_compiler_option_that_applies_to_the_entire_source_file))
Completion\KeywordRecommenders\OptionStatements\OptionNamesRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\OptionStatements\StrictOptionsRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\PreprocessorDirectives\ConstDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#Const", VBFeaturesResources.Defines_a_conditional_compiler_constant_Conditional_compiler_constants_are_always_private_to_the_file_in_which_they_appear_The_expressions_used_to_initialize_them_can_contain_only_conditional_compiler_constants_and_literals))
Completion\KeywordRecommenders\PreprocessorDirectives\ElseDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#Else", VBFeaturesResources.Introduces_a_group_of_statements_in_an_SharpIf_statement_that_is_compiled_if_no_previous_condition_evaluates_to_True))
Completion\KeywordRecommenders\PreprocessorDirectives\ElseIfDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#ElseIf", VBFeaturesResources.Introduces_a_condition_in_an_SharpIf_statement_that_is_tested_if_the_previous_conditional_test_evaluates_to_False))
Completion\KeywordRecommenders\PreprocessorDirectives\EndIfDirectiveKeywordRecommender.vb (2)
20Return ImmutableArray.Create(New RecommendedKeyword("If", VBFeaturesResources.Terminates_the_definition_of_an_SharpIf_block)) 27Return ImmutableArray.Create(New RecommendedKeyword("#End If", VBFeaturesResources.Terminates_the_definition_of_an_SharpIf_block))
Completion\KeywordRecommenders\PreprocessorDirectives\EndRegionDirectiveKeywordRecommender.vb (2)
21Return ImmutableArray.Create(New RecommendedKeyword("Region", VBFeaturesResources.Terminates_a_SharpRegion_block)) 28Return ImmutableArray.Create(New RecommendedKeyword("#End Region", VBFeaturesResources.Terminates_a_SharpRegion_block))
Completion\KeywordRecommenders\PreprocessorDirectives\IfDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#If", VBFeaturesResources.Conditionally_compiles_selected_blocks_of_code_depending_on_the_value_of_an_expression))
Completion\KeywordRecommenders\PreprocessorDirectives\ReferenceDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#R", VBFeaturesResources.Add_a_metadata_reference_to_specified_assembly_and_all_its_dependencies_e_g_Sharpr_myLib_dll))
Completion\KeywordRecommenders\PreprocessorDirectives\RegionDirectiveKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("#Region", VBFeaturesResources.Collapses_and_hides_sections_of_code_in_Visual_Basic_files))
Completion\KeywordRecommenders\PreprocessorDirectives\WarningDirectiveKeywordRecommender.vb (3)
19Return ImmutableArray.Create( 24Return ImmutableArray.Create(New RecommendedKeyword("Warning", VBFeaturesResources.Enables_reporting_of_specified_warnings_in_the_portion_of_the_source_file_below_the_current_line)) 26Return ImmutableArray.Create(New RecommendedKeyword("Warning", VBFeaturesResources.Disables_reporting_of_specified_warnings_in_the_portion_of_the_source_file_below_the_current_line))
Completion\KeywordRecommenders\Queries\AggregateKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Aggregate", VBFeaturesResources.Applies_an_aggregation_function_such_as_Sum_Average_or_Count_to_a_sequence))
Completion\KeywordRecommenders\Queries\AscendingDescendingKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Queries\DistinctKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Distinct", VBFeaturesResources.Restricts_the_values_of_a_query_result_to_eliminate_duplicate_values))
Completion\KeywordRecommenders\Queries\EqualsKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Equals", VBFeaturesResources.Specifies_the_relationship_between_element_keys_to_use_as_the_basis_of_a_join_operation))
Completion\KeywordRecommenders\Queries\FromKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("From", VBFeaturesResources.Specifies_a_collection_and_a_range_variable_to_use_in_a_query))
Completion\KeywordRecommenders\Queries\GroupByKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("By", VBFeaturesResources.Specifies_the_element_keys_used_for_grouping_in_Group_By_or_sort_order_in_Order_By))
Completion\KeywordRecommenders\Queries\GroupJoinKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Group Join", VBFeaturesResources.Combines_the_elements_of_two_sequences_and_groups_the_results_The_join_operation_is_based_on_matching_keys))
Completion\KeywordRecommenders\Queries\GroupKeywordRecommender.vb (4)
20Return ImmutableArray.Create(New RecommendedKeyword("Group", VBFeaturesResources.Groups_elements_that_have_a_common_key)) 29Return ImmutableArray.Create(New RecommendedKeyword("Group", VBFeaturesResources.Use_Group_to_specify_that_a_group_named_Group_should_be_created)) 39Return ImmutableArray.Create(New RecommendedKeyword("Group", 49Return ImmutableArray.Create(New RecommendedKeyword("Group", VBFeaturesResources.Groups_elements_that_have_a_common_key))
Completion\KeywordRecommenders\Queries\IntoKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Into", VBFeaturesResources.Specifies_an_identifier_that_can_serve_as_a_reference_to_the_results_of_a_join_or_grouping_subexpression))
Completion\KeywordRecommenders\Queries\JoinKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Join", VBFeaturesResources.Combines_the_elements_of_two_sequences_The_join_operation_is_based_on_matching_keys))
Completion\KeywordRecommenders\Queries\LetKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Let", VBFeaturesResources.Computes_a_value_for_each_item_in_the_query_and_assigns_the_value_to_a_new_range_variable))
Completion\KeywordRecommenders\Queries\OnKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("On", VBFeaturesResources.Specifies_the_element_keys_used_to_correlate_sequences_for_a_join_operation))
Completion\KeywordRecommenders\Queries\OrderByKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Order By", VBFeaturesResources.Specifies_the_sort_order_for_columns_in_a_query_Can_be_followed_by_either_the_Ascending_or_the_Descending_keyword_If_neither_is_specified_Ascending_is_used))
Completion\KeywordRecommenders\Queries\SelectKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Select", VBFeaturesResources.Specifies_which_columns_to_include_in_the_result_of_a_query))
Completion\KeywordRecommenders\Queries\SkipKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Skip", VBFeaturesResources.Skips_elements_up_to_a_specified_position_in_the_collection))
Completion\KeywordRecommenders\Queries\TakeKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Take", VBFeaturesResources.Includes_elements_up_to_a_specified_position_in_the_collection))
Completion\KeywordRecommenders\Queries\WhereKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Where", VBFeaturesResources.Specifies_the_filtering_condition_for_a_range_variable_in_a_query))
Completion\KeywordRecommenders\Queries\WhileKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("While", VBFeaturesResources.Specifies_a_condition_for_Skip_and_Take_operations_Elements_will_be_bypassed_or_included_as_long_as_the_condition_is_true))
Completion\KeywordRecommenders\Statements\CallKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Call", VBFeaturesResources.Transfers_execution_to_a_Function_Sub_or_dynamic_link_library_DLL_procedure_bracket_Call_bracket_procedureName_bracket_argumentList_bracket))
Completion\KeywordRecommenders\Statements\CaseKeywordRecommender.vb (1)
26Return ImmutableArray.Create(New RecommendedKeyword("Case", VBFeaturesResources.Introduces_a_value_or_set_of_values_against_which_the_value_of_an_expression_in_a_Select_Case_statement_is_to_be_tested_Case_expression_expression1_To_expression2_bracket_Is_bracket_comparisonOperator_expression))
Completion\KeywordRecommenders\Statements\CatchKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Catch", VBFeaturesResources.Introduces_a_statement_block_to_be_run_if_the_specified_exception_occurs_inside_a_Try_block))
Completion\KeywordRecommenders\Statements\ContinueKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Continue", VBFeaturesResources.Transfers_execution_immediately_to_the_next_iteration_of_the_loop_Can_be_used_in_a_Do_loop_a_For_loop_or_a_While_loop))
Completion\KeywordRecommenders\Statements\DoKeywordRecommender.vb (3)
19Return ImmutableArray.Create( 38Return ImmutableArray.Create(New RecommendedKeyword("Do", VBFeaturesResources.Exits_a_Do_loop_and_transfers_execution_immediately_to_the_statement_following_the_Loop_statement)) 40Return ImmutableArray.Create(New RecommendedKeyword("Do", VBFeaturesResources.Transfers_execution_immediately_to_the_next_iteration_of_the_Do_loop))
Completion\KeywordRecommenders\Statements\EachKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Each", VBFeaturesResources.Introduces_a_loop_that_is_repeated_for_each_element_in_a_collection))
Completion\KeywordRecommenders\Statements\ElseIfKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("ElseIf", VBFeaturesResources.Introduces_a_condition_in_an_If_statement_that_is_to_be_tested_if_the_previous_conditional_test_fails))
Completion\KeywordRecommenders\Statements\ElseKeywordRecommender.vb (3)
24Return ImmutableArray.Create(New RecommendedKeyword("Else", VBFeaturesResources.Introduces_a_group_of_statements_in_an_If_statement_that_is_executed_if_no_previous_condition_evaluates_to_True)) 31Return ImmutableArray.Create(New RecommendedKeyword("Else", VBFeaturesResources.Introduces_a_group_of_statements_in_an_If_statement_that_is_executed_if_no_previous_condition_evaluates_to_True)) 43Return ImmutableArray.Create(New RecommendedKeyword("Else", VBFeaturesResources.Introduces_the_statements_to_run_if_none_of_the_previous_cases_in_the_Select_Case_statement_returns_True))
Completion\KeywordRecommenders\Statements\EndKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("End", VBFeaturesResources.Stops_execution_immediately))
Completion\KeywordRecommenders\Statements\ExitKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Exit", VBFeaturesResources.Exits_a_procedure_or_block_and_transfers_execution_immediately_to_the_statement_following_the_procedure_call_or_block_definition_Exit_Do_For_Function_Property_Select_Sub_Try_While))
Completion\KeywordRecommenders\Statements\FinallyKeywordRecommender.vb (1)
20ImmutableArray.Create(New RecommendedKeyword("Finally", VBFeaturesResources.Introduces_a_statement_block_to_be_run_before_exiting_a_Try_structure))
Completion\KeywordRecommenders\Statements\ForKeywordRecommender.vb (3)
19Return ImmutableArray.Create( 35Return ImmutableArray.Create(New RecommendedKeyword("For", VBFeaturesResources.Exits_a_For_loop_and_transfers_execution_immediately_to_the_statement_following_the_Next_statement)) 37Return ImmutableArray.Create(New RecommendedKeyword("For", VBFeaturesResources.Transfers_execution_immediately_to_the_next_iteration_of_the_For_loop))
Completion\KeywordRecommenders\Statements\GoToKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("GoTo", VBFeaturesResources.Branches_unconditionally_to_a_specified_line_in_a_procedure))
Completion\KeywordRecommenders\Statements\IfKeywordRecommender.vb (2)
20Return ImmutableArray.Create(New RecommendedKeyword("If", VBFeaturesResources.Conditionally_executes_a_group_of_statements_depending_on_the_value_of_an_expression)) 32Return ImmutableArray.Create(New RecommendedKeyword("If", VBFeaturesResources.Introduces_a_condition_in_an_If_statement_that_is_to_be_tested_if_the_previous_conditional_test_fails))
Completion\KeywordRecommenders\Statements\IsKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Is", VBFeaturesResources.Followed_by_a_comparison_operator_and_then_an_expression_Case_Is_introduces_the_statements_to_run_if_the_Select_Case_expression_combined_with_the_Case_Is_expression_evaluates_to_True))
Completion\KeywordRecommenders\Statements\LoopKeywordRecommender.vb (2)
29Return ImmutableArray.Create(New RecommendedKeyword("Loop", VBFeaturesResources.Terminates_a_loop_that_is_introduced_with_a_Do_statement)) 31Return ImmutableArray.Create(
Completion\KeywordRecommenders\Statements\MidKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Statements\NextKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Next", VBFeaturesResources.Terminates_a_loop_that_iterates_through_the_values_of_a_loop_variable))
Completion\KeywordRecommenders\Statements\ReturnKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Return", VBFeaturesResources.Returns_execution_to_the_code_that_called_the_Function_Sub_Get_Set_or_Operator_procedure_Return_or_Return_expression))
Completion\KeywordRecommenders\Statements\SelectKeywordRecommender.vb (2)
19Return ImmutableArray.Create(New RecommendedKeyword("Select", VBFeaturesResources.Runs_one_of_several_groups_of_statements_depending_on_the_value_of_an_expression)) 27Return ImmutableArray.Create(New RecommendedKeyword("Select", VBFeaturesResources.Exits_a_Select_block_and_transfers_execution_immediately_to_the_statement_following_the_End_Select_statement))
Completion\KeywordRecommenders\Statements\StepKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Step", VBFeaturesResources.Specifies_how_much_to_increment_between_each_loop_iteration))
Completion\KeywordRecommenders\Statements\StopKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Stop", VBFeaturesResources.Suspends_program_execution))
Completion\KeywordRecommenders\Statements\SyncLockKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("SyncLock", VBFeaturesResources.Ensures_that_multiple_threads_do_not_execute_the_statement_block_at_the_same_time_SyncLock_object_End_Synclock))
Completion\KeywordRecommenders\Statements\ThenKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("Then", VBFeaturesResources.Introduces_a_statement_block_to_be_compiled_or_executed_if_a_tested_condition_is_true))
Completion\KeywordRecommenders\Statements\ThrowKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Throw", VBFeaturesResources.Throws_an_exception_within_a_procedure_so_that_you_can_handle_it_with_structured_or_unstructured_exception_handling_code))
Completion\KeywordRecommenders\Statements\ToKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("To", VBFeaturesResources.Separates_the_beginning_and_ending_values_of_a_loop_counter_or_array_bounds_or_that_of_a_value_match_range))
Completion\KeywordRecommenders\Statements\TryKeywordRecommender.vb (2)
19Return ImmutableArray.Create(New RecommendedKeyword("Try", VBFeaturesResources.Provides_a_way_to_handle_some_or_all_possible_errors_that_might_occur_in_a_given_block_of_code_while_still_running_the_code_Try_bracket_Catch_bracket_Catch_Finally_End_Try)) 32Return ImmutableArray.Create(New RecommendedKeyword("Try", VBFeaturesResources.Exits_a_Try_block_and_transfers_execution_immediately_to_the_statement_following_the_End_Try_statement))
Completion\KeywordRecommenders\Statements\UntilAndWhileKeywordRecommender.vb (1)
29Return ImmutableArray.Create(
Completion\KeywordRecommenders\Statements\UsingKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Using", VBFeaturesResources.A_Using_block_does_three_things_colon_it_creates_and_initializes_variables_in_the_resource_list_it_runs_the_code_in_the_block_and_it_disposes_of_the_variables_before_exiting_Resources_used_in_the_Using_block_must_implement_System_IDisposable_Using_resource1_bracket_resource2_bracket_End_Using))
Completion\KeywordRecommenders\Statements\WhenKeywordRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("When", VBFeaturesResources.Adds_a_conditional_test_to_a_Catch_statement_Exceptions_are_caught_by_that_Catch_statement_only_when_the_conditional_test_that_follows_the_When_keyword_evaluates_to_True))
Completion\KeywordRecommenders\Statements\WhileLoopKeywordRecommender.vb (2)
20Return ImmutableArray.Create(New RecommendedKeyword("While", VBFeaturesResources.Runs_a_series_of_statements_as_long_as_a_given_condition_is_true)) 33Return ImmutableArray.Create(New RecommendedKeyword("While",
Completion\KeywordRecommenders\Statements\WithKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("With", VBFeaturesResources.Runs_a_series_of_statements_that_refer_to_a_single_object_or_structure_With_object_End_With))
Completion\KeywordRecommenders\Statements\YieldKeywordRecommender.vb (1)
18ImmutableArray.Create(New RecommendedKeyword("Yield", VBFeaturesResources.Produces_an_element_of_an_IEnumerable_or_IEnumerator))
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (1)
65Interlocked.CompareExchange(_diagnostics, ImmutableArray.CreateBuilder(Of Diagnostic)(), Nothing)
Diagnostics\Analyzers\VisualBasicPreferFrameworkTypeDiagnosticAnalyzer.vb (1)
21ImmutableArray.Create(SyntaxKind.PredefinedType)
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
23Private Shared ReadOnly s_kindsOfInterest As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
Diagnostics\Analyzers\VisualBasicUnboundIdentifiersDiagnosticAnalyzer.vb (1)
17Private Shared ReadOnly s_kindsOfInterest As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(SyntaxKind.IncompleteMember)
EditAndContinue\SyntaxUtilities.vb (3)
120Return ImmutableArray.CreateRange( 226Return ImmutableArray.CreateRange(body.DescendantNodes(AddressOf LambdaUtilities.IsNotLambda). 232Return ImmutableArray.CreateRange(body.DescendantNodes(Function(n) TypeOf n IsNot ExpressionSyntax).
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.ExpressionCodeGenerator.vb (1)
93Return ImmutableArray.Create(statement)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
36Return ImmutableArray.Create(Of StatementSyntax)(Me.SelectionResult.GetFirstStatement())
FullyQualify\VisualBasicFullyQualifyCodeFixProvider.vb (1)
49ImmutableArray.Create(BC30002, IDEDiagnosticIds.UnboundIdentifierId, BC30451, BC30561, BC40056, BC32045)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (1)
76Return ImmutableArray.Create(Of AbstractReducer)(
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
48Dim typeItems = ImmutableArray.CreateBuilder(Of RoslynNavigationBarItem)
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (4)
197Return QuickInfoItem.Create(token.Span, sections:=ImmutableArray.Create(QuickInfoSection.Create(QuickInfoSectionKinds.Description, ImmutableArray.Create(New TaggedText(TextTags.Text, VBFeaturesResources.Multiple_Types))))) 242sections:=ImmutableArray.Create( 244QuickInfoSection.Create(QuickInfoSectionKinds.DocumentationComments, ImmutableArray.Create(New TaggedText(TextTags.Text, documentation.DocumentationText)))))
RemoveSharedFromModuleMembers\VisualBasicRemoveSharedFromModuleMembersCodeFixProvider.vb (1)
36Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
RemoveUnusedVariable\VisualBasicRemoveUnusedVariableCodeFixProvider.vb (1)
29ImmutableArray.Create(BC42024)
SpellCheck\VisualBasicSpellCheckCodeFixProvider.vb (1)
48Return ImmutableArray.Create(BC30002, IDEDiagnosticIds.UnboundIdentifierId, BC30451, BC30456, BC32045)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
65Dim additionalLocations = ImmutableArray.Create(member.GetLocation())
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
21Private Shared ReadOnly s_kinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\NamingStyle\VisualBasicNamingStyleDiagnosticAnalyzer.vb (1)
15ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastDiagnosticAnalyzer.vb (1)
19ImmutableArray.Create(SyntaxKind.CTypeExpression,
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\Utilities.vb (1)
10ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\UseInferredMemberName\VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
62additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))) 86additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan))))
src\Analyzers\VisualBasic\Analyzers\UseIsNotExpression\VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
76ImmutableArray.Create(notExpression.GetLocation()),
src\Analyzers\VisualBasic\CodeFixes\AddAnonymousTypeMemberName\VisualBasicAddAnonymousTypeMemberNameCodeFixProvider.vb (1)
28ImmutableArray.Create(BC36556)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
34Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30512, BC42016, BC30518, BC30519)
src\Analyzers\VisualBasic\CodeFixes\AddObsoleteAttribute\VisualBasicAddObsoleteAttributeCodeFixProvider.vb (1)
18ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
46Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AliasAmbiguousType\VisualBasicAliasAmbiguousTypeCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30561)
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (1)
22Friend ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(Of String)(BC37001)
src\Analyzers\VisualBasic\CodeFixes\DocumentationComments\VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (1)
48Friend ReadOnly Id As ImmutableArray(Of String) = ImmutableArray.Create(BC42305, BC42306, BC42307, BC42313, BC42315, BC42317)
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorDiagnosticIds.vb (3)
21Friend Shared ReadOnly AllDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057, BC30272, BC30274, BC30389, BC30455, BC32006, BC30512, BC30387, BC30516) 22Friend Shared ReadOnly TooManyArgumentsDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057) 23Friend Shared ReadOnly CannotConvertDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30512, BC32006, BC30311, BC36625)
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
26ImmutableArray.Create(BC30387, BC40056)
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC30456)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC30311)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
50Return ImmutableArray.Create(BC30518, BC30519, BC30520, BC30521, BC30057, BC30112, BC30451, BC30455, BC30456, BC30401, BC30516, BC32016, BC32045, BC32087, BC36625, BC30107, BC30108, BC30109, BC30110, BC30111)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
159parameters:=ImmutableArray.Create(CodeGenerationSymbolFactory.CreateParameterSymbol(parameterSymbol, "v")),
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (1)
90Return ImmutableArray.Create(typeParameter)
src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
34Return ImmutableArray.Create(BC30456, BC30401, BC30451, BC36610)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30149)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
66interfaceTypes = ImmutableArray.Create(GetInterfaceType(model, interfaceNode, cancellationToken))
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
23Friend Shared ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(BC36942)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
25Friend Shared ReadOnly Ids As ImmutableArray(Of String) = ImmutableArray.Create(BC30451)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
24Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (1)
21Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC42356)
src\Analyzers\VisualBasic\CodeFixes\MakeTypeAbstract\VisualBasicMakeTypeAbstractCodeFixProvider.vb (1)
23ImmutableArray.Create("BC31411")
src\Analyzers\VisualBasic\CodeFixes\MakeTypePartial\VisualBasicMakeTypePartialCodeFixProvider.vb (1)
23Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC40046)
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\VisualBasicRemoveAsyncModifierCodeFixProvider.vb (1)
21Private Shared ReadOnly s_diagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC42356)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
27ImmutableArray.Create(IDEDiagnosticIds.RemoveUnnecessaryByValDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
31ImmutableArray.Create(IDEDiagnosticIds.RemoveUnnecessaryCastDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
25Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(IDEDiagnosticIds.SimplifyObjectCreationDiagnosticId)
src\Analyzers\VisualBasic\CodeFixes\UnsealClass\VisualBasicUnsealClassCodeFixProvider.vb (1)
24ImmutableArray.Create(BC30299)
src\Analyzers\VisualBasic\CodeFixes\UseIsNotExpression\VisualBasicUseIsNotExpressionCodeFixProvider.vb (1)
26Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(IDEDiagnosticIds.UseIsNotExpressionDiagnosticId)
Structure\VisualBasicBlockStructureProvider.vb (1)
63builder.Add(SyntaxKind.DisabledTextTrivia, ImmutableArray.Create(Of AbstractSyntaxStructureProvider)(New DisabledTextTriviaStructureProvider()))
Structure\VisualBasicBlockStructureService.vb (1)
40Return ImmutableArray.Create(Of BlockStructureProvider)(New VisualBasicBlockStructureProvider())
Wrapping\VisualBasicWrappingCodeRefactoringProvider.vb (1)
23ImmutableArray.Create(Of ISyntaxWrapper)(
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (21)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
29Return ImmutableArray.Create(Rule)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.vb (1)
54Return ImmutableArray.Create(Of DiagnosticAnalyzer)(New VisualBasicCompilerDiagnosticAnalyzer())
Diagnostics\Suppression\SuppressionTests.vb (6)
701Return ImmutableArray.Create(_descriptor) 776Return ImmutableArray.Create(_descriptor) 820Return ImmutableArray.Create(_descriptor) 886Return ImmutableArray.Create(_descriptor) 1006Return ImmutableArray.Create(_descriptor) 1722Return ImmutableArray.Create(_descriptor)
EditAndContinue\LineEditTests.vb (4)
1384New SequencePointUpdates("a", ImmutableArray.Create( 1450New SequencePointUpdates("a", ImmutableArray.Create(New SourceLineUpdate(0, 1))), 1451New SequencePointUpdates("b", ImmutableArray.Create(New SourceLineUpdate(0, 1))) 1490New SequencePointUpdates("a", ImmutableArray.Create(New SourceLineUpdate(6, 4)))
EditAndContinue\SyntaxComparerTests.vb (8)
35ImmutableArray.Create(MakeLiteral(0), MakeLiteral(1), MakeLiteral(2)), 36ImmutableArray.Create(MakeLiteral(1), MakeLiteral(3))) 65ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword)), 66ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword))) 98ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword)), 99ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.StaticKeyword), SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.AsyncKeyword))) 120ImmutableArray.Create(SyntaxFactory.Token(SyntaxKind.StaticKeyword))) 126ImmutableArray.Create(MakeLiteral(0)))
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
486KeyValuePairUtil.Create(newDocument.FilePath, ImmutableArray.Create(
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (168)
Binding\ForEachTests.vb (2)
3980Dim compilation = CompilationUtils.CreateEmptyCompilationWithReferences(source, ImmutableArray.Create(Of MetadataReference)().AsEnumerable) 4026Dim compilation = CompilationUtils.CreateEmptyCompilationWithReferences(source, ImmutableArray.Create(Of MetadataReference)().AsEnumerable)
Binding\LookupTests.vb (1)
58r3.SetFrom(SingleLookupResult.Ambiguous(ImmutableArray.Create(Of Symbol)(sym1, sym2, sym3), AddressOf GenerateAmbiguity))
Compilation\CompilationAPITests.vb (39)
1498Dim tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")) 1551ImmutableArray.Create(DirectCast(Nothing, ITypeSymbol)), 1552ImmutableArray.Create("m1", "m2")) 1562ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1564ImmutableArray.Create("m1", "m2"), 1565ImmutableArray.Create(True)) 1575ImmutableArray.Create(DirectCast(Compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1577ImmutableArray.Create("m1", "m2"), 1578memberLocations:=ImmutableArray.Create(Location.None)) 1586ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1588ImmutableArray.Create("m1", "m2"), 1589ImmutableArray.Create(False, False)) 1607ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1609ImmutableArray.Create("m1", "m2"), 1610ImmutableArray.Create(False, False), 1611ImmutableArray.Create(loc1, loc2)) 1625ImmutableArray.Create(DirectCast(Nothing, ITypeSymbol)), 1626ImmutableArray.Create("m1")) 1634ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32)), 1635ImmutableArray.Create("m1")) 1648ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32)), 1649ImmutableArray.Create("m1"), 1650ImmutableArray.Create(False)) 1663ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 1664ImmutableArray.Create("m1", "m2")) 1677Dim memberTypes = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1678Dim memberNames = ImmutableArray.Create("P", "Q") 1715Dim memberTypes = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1716Dim memberNames = ImmutableArray.Create("P", "Q") 1722Assert.Throws(Of ArgumentException)(Function() comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated))) 1724type = comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations:=ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated, CodeAnalysis.NullableAnnotation.Annotated)) 1942Dim typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1952Assert.Throws(Of ArgumentException)(Function() genericType.Construct(ImmutableArray.Create(Of ITypeSymbol)(Nothing, Nothing), Nothing)) 1954type = genericType.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)) 1960typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1974Dim typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1984Assert.Throws(Of ArgumentException)(Function() genericMethod.Construct(ImmutableArray.Create(Of ITypeSymbol)(Nothing, Nothing), Nothing)) 1986type = genericMethod.Construct(typeArguments, ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated)) 1992typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String))
Compilation\VisualBasicCompilationOptionsTests.vb (3)
35TestHiddenProperty(Function(old, value) old.WithCryptoPublicKey(value), Function(opt) opt.CryptoPublicKey, ImmutableArray.CreateRange(Of Byte)({1, 2, 3, 4})) 94ImmutableArray.Create(GlobalImport.Parse("Goo.Bar"), GlobalImport.Parse("Baz"))) 110TestProperty(Function(old, value) old.WithCryptoPublicKey(value), Function(opt) opt.CryptoPublicKey, ImmutableArray.CreateRange(Of Byte)({1, 2, 3, 4}))
Diagnostics\DiagnosticAnalyzerTests.vb (13)
31Return ImmutableArray.Create(s_CA9999_UseOfVariableThatStartsWithX) 220Return ImmutableArray.Create(desc1, desc2) 236Return ImmutableArray.Create(desc1, desc2) 269Return ImmutableArray.Create(desc1) 307Return ImmutableArray.Create(desc1) 352Return ImmutableArray.Create(desc1) 403Return ImmutableArray.Create(s_descriptor) 501Return ImmutableArray.Create(desc1) 566Return ImmutableArray.Create(desc1) 853Dim builder = ImmutableArray.CreateBuilder(Of SyntaxTree)() 954Return ImmutableArray.Create(ExpressionDescriptor) 1656Dim options = New AnalyzerOptions(ImmutableArray.Create(additionalFile)) 1659Dim analyzers As ImmutableArray(Of DiagnosticAnalyzer) = ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer)
Diagnostics\GetDiagnosticsTests.vb (4)
524Dim compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer), AnalyzerOptions.Empty) 597Return ImmutableArray.Create(Descriptor, DescriptorForBlockEnd) 696Dim compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer), AnalyzerOptions.Empty) 715Return ImmutableArray.Create(Descriptor)
Semantics\AccessCheckTests.vb (1)
792Assert.Equal(ImmutableArray.Create(Of SyntaxReference)(), sourceAssem.DeclaringSyntaxReferences)
Semantics\GetExtendedSemanticInfoTests.vb (2)
6629Dim ienumerable = compilation.GetSpecialType(System_Collections_Generic_IEnumerable_T).Construct(ImmutableArray.Create(Of TypeSymbol)(compilation.GetSpecialType(System_Int32))) 6630Dim ienumerator = compilation.GetSpecialType(System_Collections_Generic_IEnumerator_T).Construct(ImmutableArray.Create(Of TypeSymbol)(compilation.GetSpecialType(System_Int32)))
Semantics\OptionalArgumentTests.vb (1)
2113pathMap:=ImmutableArray.Create(New KeyValuePair(Of String, String)("C:", "/X")))))
SourceGeneration\GeneratorDriverTests.vb (24)
28Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 50Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), 51additionalTexts:=ImmutableArray.Create(Of AdditionalText)(additionalText), 66Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 94Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 117Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 133Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 149Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 163Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 316Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 348Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 377Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 408Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 438Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 469Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 498Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 528Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 558Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 587Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=parseOptions) 600Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(New IncrementalGeneratorWrapper(testGenerator)), parseOptions:=parseOptions) 618Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(testGenerator), parseOptions:=parseOptions) 652Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(generator), parseOptions:=TestOptions.Regular) 679Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(gen), parseOptions:=TestOptions.Regular) 715Dim driver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(gen), parseOptions:=parseOptions)
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.vb (31)
84Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 125Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 168Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 196Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 225Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 251Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 282Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 311Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 340Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 369Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 400Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 443Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 484Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 524Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 563Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 602Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 642Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 678Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 715Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 752Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 789Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 826Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 863Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 899Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 946Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 993Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1036Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1085Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1138Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1196Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1250Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.vb (47)
55Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 87Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 113Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 138Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 163Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 192Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 224Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 256Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 288Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 319Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 345Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 371Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 397Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 430Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 458Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 486Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 513Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 543Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 574Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 604Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 634Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 662Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 690Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 718Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 745Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 772Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 799Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 826Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 855Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 884Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 911Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 937Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 966Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 994Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1020Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1047Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1079Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1119Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1160Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1200Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1242Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1288Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1325Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1365Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1406Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1448Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions) 1500Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of ISourceGenerator)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (34)
DocumentationComments\DocCommentTests.vb (4)
12016Return ImmutableArray.Create(Of Symbol)() 12026Return ImmutableArray.Create(DirectCast(symbol, Symbol)) 12039Return ImmutableArray.Create(Of Symbol)() 12047Return ImmutableArray.Create(Of Symbol)(DirectCast(actual.Symbol, Symbol))
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (1)
440ImmutableArray.CreateRange(Of Symbol)(
SymbolsTests\AssemblyAndNamespaceTests.vb (2)
518Dim aliasedCorlib = NetFramework.mscorlib.WithAliases(ImmutableArray.Create("Goo")) 560Dim libRef = libComp.EmitToImageReference(aliases:=ImmutableArray.Create("myTask"))
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (8)
300ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1), TC.TypeParameters(0), TC.TypeParameters(1))) 316ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1), TC.TypeParameters(0))) 324ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(0))) 333ImmutableArray.Create(Of TypeSymbol)(MissingC4.TypeParameters(0))) 339ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1))) 349ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(0))) 360ImmutableArray.Create(Of TypeSymbol)(MissingC7.TypeParameters(0))) 366ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1)))
SymbolsTests\Retargeting\RetargetingTests.vb (2)
295Dim i_a_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create(Of TypeSymbol)(a_v2)) 316Dim i_ct_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create(Of TypeSymbol)(c.TypeParameters(0)))
SymbolsTests\Source\TypeTests.vb (10)
4034Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object))) 4041Dim modifiedU = ImmutableArray.Create(New TypeWithModifiers(iDefinition.TypeParameters.Single(), modifiers)) 4051Dim modifiedT = ImmutableArray.Create(New TypeWithModifiers(cDefinition.TypeParameters.Single(), modifiers)) 4065ImmutableArray.Create(cDefinition.TypeParameters.Single(), iDefinition.TypeParameters.Single()), 4066ImmutableArray.Create(modifiedT.Single(), modifiedU.Single()))) 4098Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object))) 4111ImmutableArray.Create(cDefinition.TypeParameters.Single(), c2Definition.TypeParameters.Single(), iDefinition.TypeParameters.Single()), 4112ImmutableArray.Create(modifiedT, modifiedU, modifiedV))) 4159Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object))) 4170Dim modifiedU = ImmutableArray.Create(New TypeWithModifiers(definition.TypeParameters.Single(), modifiers))
SymbolsTests\SymbolErrorTests.vb (7)
22502Assert.Equal(ImmutableArray.Create(Of Symbol)(), errTypeSym.GetMembers) 22503Assert.Equal(ImmutableArray.Create(Of Symbol)(), errTypeSym.GetMembers("B")) 22504Assert.Equal(ImmutableArray.Create(Of NamedTypeSymbol)(), errTypeSym.GetTypeMembers) 22505Assert.Equal(ImmutableArray.Create(Of NamedTypeSymbol)(), errTypeSym.GetTypeMembers("B")) 22506Assert.Equal(ImmutableArray.Create(Of NamedTypeSymbol)(), errTypeSym.GetTypeMembers("B", 1)) 22508Assert.Equal(ImmutableArray.Create(Of Location)(), errTypeSym.Locations) 22509Assert.Equal(ImmutableArray.Create(Of SyntaxReference)(), errTypeSym.DeclaringSyntaxReferences)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Parser\DeclarationTests.vb (1)
47Dim rootNamespace = ImmutableArray.Create(Of String)()
Parser\ParseDirectives.vb (2)
1576Dim psymbols = ImmutableArray.Create({Roslyn.Utilities.KeyValuePairUtil.Create("Blah", CObj(False)), Roslyn.Utilities.KeyValuePairUtil.Create("blah", CObj(True))}) 3169Return ImmutableArray.Create(_descriptor)
Parser\VisualBasicParseOptionsTests.vb (2)
43Dim syms = ImmutableArray.Create(New KeyValuePair(Of String, Object)("A", 1), 57Dim empty = ImmutableArray.Create(Of KeyValuePair(Of String, Object))()
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (22)
CompilationTestUtils.vb (4)
405ilImage = ImmutableArray.Create(File.ReadAllBytes(reference.Path)) 526Public CandidateSymbols As ImmutableArray(Of ISymbol) = ImmutableArray.Create(Of ISymbol)() 527Public AllSymbols As ImmutableArray(Of ISymbol) = ImmutableArray.Create(Of ISymbol)() 531Public MemberGroup As ImmutableArray(Of ISymbol) = ImmutableArray.Create(Of ISymbol)()
MockSymbols.vb (18)
84Return ImmutableArray.Create(Of Location)() 90Return ImmutableArray.Create(Of SyntaxReference)() 198Return ImmutableArray.Create(Of VisualBasicAttributeData)() 249Return ImmutableArray.Create(Of Location)() 255Return ImmutableArray.Create(Of SyntaxReference)() 273Return ImmutableArray.Create(Of TypeParameterSymbol)() 442Return ImmutableArray.Create(Of MethodSymbol)() 447Return ImmutableArray.Create(Of VisualBasicAttributeData)() 576Return ImmutableArray.Create(Of Location)() 582Return ImmutableArray.Create(Of SyntaxReference)() 600Return ImmutableArray.Create(Of ParameterSymbol)() 630Return ImmutableArray.Create(Of TypeSymbol)() 636Return ImmutableArray.Create(Of TypeParameterSymbol)() 705Return ImmutableArray.Create(Of VisualBasicAttributeData)() 716Return ImmutableArray.Create(Of Location)() 792Return ImmutableArray.Create(Of VisualBasicAttributeData)() 797Return ImmutableArray.Create(Of Location)() 803Return ImmutableArray.Create(_module)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (19)
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
19Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(GetType(IdentifierNameSyntax))
Classification\SyntaxClassification\ImportAliasClauseSyntaxClassifier.vb (1)
18Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(GetType(ImportAliasClauseSyntax))
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
18Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
18Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(
Classification\SyntaxClassification\VisualBasicSyntaxClassificationService.vb (1)
20Private ReadOnly s_defaultSyntaxClassifiers As ImmutableArray(Of ISyntaxClassifier) = ImmutableArray.Create(Of ISyntaxClassifier)(
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
17Private Shared ReadOnly s_defaultProviders As ImmutableArray(Of ICodeCleanupProvider) = ImmutableArray.Create(Of ICodeCleanupProvider)(
FindSymbols\VisualBasicReferenceFinder.vb (1)
45ImmutableArray.Create(relatedSymbol))
Formatting\VisualBasicSyntaxFormatting.vb (1)
20Private ReadOnly _rules As ImmutableArray(Of AbstractFormattingRule) = ImmutableArray.Create(Of AbstractFormattingRule)(
Rename\VisualBasicRenameRewriterLanguageService.vb (4)
828Return ImmutableArray.Create(DirectCast(token.Parent, ForEachStatementSyntax).Expression.GetLocation()) 954Return ImmutableArray.Create(originalDeclarationLocation) 961Return ImmutableArray.Create(originalDeclarationLocation) 969Return ImmutableArray.Create(originalDeclarationLocation)
Serialization\VisualBasicOptionsSerializationService.vb (1)
114Dim builder = ImmutableArray.CreateBuilder(Of KeyValuePair(Of String, Object))(count)
Simplification\VisualBasicSimplificationService.vb (1)
23ImmutableArray.Create(Of AbstractReducer)(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SelectedMembers\VisualBasicSelectedMembers.vb (1)
34Return ImmutableArray.Create((declaration:=DirectCast(member, SyntaxNode), identifier:=member.GetNameToken()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
267ImmutableArray.Create(Of ISymbol)(preprocessingSymbol),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (1)
605localVariables = ImmutableArray.Create(DirectCast(model.GetDeclaredSymbol(forEach), ILocalSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (1)
46Dim rules = ImmutableArray.Create(New SpecialFormattingRule(options.IndentStyle), baseIndentationRule).
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\InitializeParameter\InitializeParameterHelpers.vb (1)
34Return SyntaxFactory.List(ImmutableArray.Create(convertedStatement))
Microsoft.CodeAnalysis.Workspaces (84)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
31=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project,
Diagnostics\HostDiagnosticAnalyzers.cs (1)
166var descriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
Editing\SymbolEditor.cs (1)
135.ToImmutableDictionary(g => g.Key, g => ImmutableArray.CreateRange(g));
FindSymbols\FindReferences\Finders\FieldSymbolReferenceFinder.cs (1)
25? new(ImmutableArray.Create(symbol.AssociatedSymbol))
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
36Add(result, ImmutableArray.Create(symbol.AssociatedSymbol));
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
31? new(ImmutableArray.Create<ISymbol>(symbol.ContainingType))
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
29: new(ImmutableArray.Create(symbol.AssociatedSymbol));
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
101var unsortedNodes = ImmutableArray.Create(BuilderNode.RootNode);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
40return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]); 66return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]);
Shared\Utilities\DocumentationComment.cs (5)
260(_parameterNamesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(name); 271(_typeParameterNamesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(name); 284(_exceptionTypesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(type); 285(_exceptionTextBuilders ??= []).Add(type, ImmutableArray.CreateBuilder<string>()); 355/// Returns the texts for a given exception, or an empty <see cref="ImmutableArray"/> if no documentation was given for the exception.
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (12)
79return ImmutableArray.Create(map(items[0])); 82return ImmutableArray.Create(map(items[0]), map(items[1])); 85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2])); 88return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]), map(items[3])); 119return ImmutableArray.Create(map(items[0], arg)); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg)); 128return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg), map(items[3], arg)); 159return ImmutableArray.Create(map(items[0], 0, arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 168return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (19)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items); 87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray()); 143return ImmutableArray.CreateRange(items, map); 158return ImmutableArray.CreateRange(items, map, arg); 179return ImmutableArray.Create(map(items[0], 0, arg)); 182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 188return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg)); 494return ImmutableArray.Create(map(self[0], other[0])); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1])); 500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2])); 503return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]), map(self[3], other[3])); 1202? ImmutableArray.Create(symbol) 1203: ImmutableArray<TNamespaceOrTypeSymbol>.CastUp(ImmutableArray.Create((TNamedTypeSymbol)symbol));
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
281return ImmutableArray.Create<V>((V)_value);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (4)
3101 => ImmutableArray.Create(_item0), 3112 => ImmutableArray.Create(_item0, _item1), 3123 => ImmutableArray.Create(_item0, _item1, _item2), 3134 => ImmutableArray.Create(_item0, _item1, _item2, _item3),
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
70return ImmutableArray.Create<T>(); 78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (2)
185=> HasOneItem ? ImmutableArray.Create(_one) : _many; 272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
22numerals = ImmutableArray.Create("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
16private static readonly ImmutableArray<IOption2>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
27return ImmutableArray.Create(info.Symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
180return ImmutableArray.CreateRange(leadingTrivia.Take(index));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (2)
128var nodes = ImmutableArray.CreateBuilder<Node>(_builderNodes.Length); 132var edges = ImmutableArray.CreateBuilder<Edge>(Math.Max(0, _builderNodes.Length - 1));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
56var diagnostics = ImmutableArray.Create(diagnostic ?? context.Diagnostics[0]);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return ImmutableArray.CreateRange(_constructedFrom.TypeMembers.Cast<INamedTypeSymbol>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConversionSymbol.cs (1)
37parameters: ImmutableArray.Create(fromType),
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(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
137newTypeParameter.ConstraintTypes = ImmutableArray.CreateRange(newTypeParameter.ConstraintTypes, t => t.SubstituteTypes(mapping, typeGenerator));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
85var parameters = ImmutableArray.Create(CodeGenerationSymbolFactory.CreateParameterSymbol(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
55var formattingRules = ImmutableArray.Create(
Workspace\CommandLineProject.cs (1)
196return ImmutableArray.Create<string>();
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
54private readonly ImmutableArray<DocumentInfo>.Builder _documentsAddedInBatch = ImmutableArray.CreateBuilder<DocumentInfo>();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
582var documentFileNamesAddedBuilder = ImmutableArray.CreateBuilder<string>();
Workspace\Solution\ProjectDependencyGraph_AddProject.cs (1)
31builder.Add(ImmutableArray.Create(projectId));
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
MSBuild\MSBuildProjectLoader.cs (1)
195var projectPaths = ImmutableArray.CreateBuilder<string>();
MSBuild\MSBuildProjectLoader.Worker.cs (3)
131var results = ImmutableArray.CreateBuilder<ProjectInfo>(); 203var results = ImmutableArray.CreateBuilder<ProjectFileInfo>(projectFileInfos.Length); 228var builder = ImmutableArray.CreateBuilder<ProjectInfo>();
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
147var builder = ImmutableArray.CreateBuilder<UnresolvedMetadataReference>(); 162var builder = ImmutableArray.CreateBuilder<MetadataReference>();
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
38s_rootLocations = ImmutableArray.Create(GetLocation(ASM_CACHE.ROOT), GetLocation(ASM_CACHE.ROOT_EX));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (49)
BuildHost.cs (1)
148var builder = ImmutableArray.CreateBuilder<(string ProjectPath, string ProjectGuid)>();
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
22_builder = ImmutableArray.CreateBuilder<string>();
MSBuild\ProjectFile\Extensions.cs (1)
63? ImmutableArray.CreateRange(aliasesText.Split([','], StringSplitOptions.RemoveEmptyEntries).Select(a => a.Trim()))
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (12)
79return ImmutableArray.Create(map(items[0])); 82return ImmutableArray.Create(map(items[0]), map(items[1])); 85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2])); 88return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]), map(items[3])); 119return ImmutableArray.Create(map(items[0], arg)); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg)); 128return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg), map(items[3], arg)); 159return ImmutableArray.Create(map(items[0], 0, arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 168return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (19)
41return ImmutableArray.CreateRange<T>(items); 58return ImmutableArray.CreateRange<T>(items); 75return ImmutableArray.CreateRange<T>(items); 87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray()); 143return ImmutableArray.CreateRange(items, map); 158return ImmutableArray.CreateRange(items, map, arg); 179return ImmutableArray.Create(map(items[0], 0, arg)); 182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg)); 188return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg), map(items[3], 3, arg)); 494return ImmutableArray.Create(map(self[0], other[0])); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1])); 500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2])); 503return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]), map(self[3], other[3])); 1202? ImmutableArray.Create(symbol) 1203: ImmutableArray<TNamespaceOrTypeSymbol>.CastUp(ImmutableArray.Create((TNamedTypeSymbol)symbol));
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (4)
3101 => ImmutableArray.Create(_item0), 3112 => ImmutableArray.Create(_item0, _item1), 3123 => ImmutableArray.Create(_item0, _item1, _item2), 3134 => ImmutableArray.Create(_item0, _item1, _item2, _item3),
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
70return ImmutableArray.Create<T>(); 78return ImmutableArray.CreateRange<T>(items); 98return ImmutableArray.CreateRange(items);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (2)
185=> HasOneItem ? ImmutableArray.Create(_one) : _many; 272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
22numerals = ImmutableArray.Create("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
60_builder = ImmutableArray.CreateBuilder<T>(size); 523dictionary1.Add(keySelector(value), ImmutableArray.Create(value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (11)
Formatting\FormattingTestBase.cs (1)
107var outputBuilder = ImmutableArray.CreateBuilder<TextSpan>(inputSpans.Length);
Options\OptionsTestHelpers.cs (9)
26public static readonly ImmutableArray<(IOption, object)> PublicCustomOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 29public static readonly ImmutableArray<(IOption, object)> PublicAutoFormattingOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 32public static readonly ImmutableArray<(IOption, object)> PublicFormattingOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 85public static readonly ImmutableArray<(IOption, object)> PublicCodeStyleOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 135ImmutableArray<bool> array => array.IsEmpty ? ImmutableArray.Create(true) : [], 136ImmutableArray<string> array => array is ["X"] ? ImmutableArray.Create("X", "Y") : ImmutableArray.Create("X"), 137ImmutableArray<int> array => array.IsEmpty ? ImmutableArray.Create(1) : [], 138ImmutableArray<long> array => array.IsEmpty ? ImmutableArray.Create(1L) : [],
Workspaces\TestHostDocument.cs (1)
198return _folders ?? ImmutableArray.Create<string>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (52)
BatchFixAllProviderTests.cs (6)
42var codeFixes = ImmutableArray.Create( 43ImmutableArray.Create(1), 44ImmutableArray.Create(2), 45ImmutableArray.Create(3)); 59public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 91public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(LiteralZeroAnalyzer.Descriptor.Id);
ChecksumTests.cs (2)
183Assert.NotEqual(Checksum.Null, Checksum.Create(ImmutableArray.Create(Checksum.Null))); 184Assert.NotEqual(Checksum.Null, Checksum.Create(ImmutableArray.Create((byte)0)));
SolutionTests\SolutionTestHelpers.cs (2)
49var boxedItems = (IEnumerable<TValue>)ImmutableArray.Create(item); 76var boxedDupItems = (IEnumerable<TValue>)ImmutableArray.Create(item, item);
SolutionTests\SolutionTests.cs (30)
128Assert.Throws<InvalidOperationException>(() => solution.RemoveDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 129Assert.Throws<ArgumentNullException>(() => solution.RemoveDocuments(ImmutableArray.Create((DocumentId)null!))); 147Assert.Throws<InvalidOperationException>(() => solution.RemoveAdditionalDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 148Assert.Throws<ArgumentNullException>(() => solution.RemoveAdditionalDocuments(ImmutableArray.Create((DocumentId)null!))); 166Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerConfigDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 167Assert.Throws<ArgumentNullException>(() => solution.RemoveAnalyzerConfigDocuments(ImmutableArray.Create((DocumentId)null!))); 1926var projectRefs = (IEnumerable<ProjectReference>)ImmutableArray.Create( 1928new ProjectReference(projectId2, ImmutableArray.Create("alias")), 1950var projectRefs = (IEnumerable<ProjectReference>)ImmutableArray.Create(externalProjectRef); 2617.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2)); 2642.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2)); 2670Assert.ThrowsAny<InvalidOperationException>(() => solution.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2))); 2693.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2)); 2695solution = solution.RemoveDocuments(ImmutableArray.Create(documentInfo1.Id, documentInfo2.Id)); 2715.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2)); 2719solution = solution.RemoveDocuments(ImmutableArray.Create(documentInfo1.Id, documentInfo2.Id)); 2740Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveDocuments(ImmutableArray.Create(documentInfo1.Id))); 2759Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAdditionalDocuments(ImmutableArray.Create(documentInfo1.Id))); 2774.AddAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1)); 2778Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1.Id))); 2987var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create(analyzer)); 3012analyzerReference = new AnalyzerImageReference(ImmutableArray.Create(analyzer)); 3014var secondAnalyzerReference = new AnalyzerImageReference(ImmutableArray.Create(secondAnalyzer)); 4421AssertEx.SetEqual(relatedIds1, ImmutableArray.Create(document1.Id, document2.Id)); 4422AssertEx.SetEqual(relatedIds2, ImmutableArray.Create(document1.Id, document2.Id)); 4683solution = solution.AddAnalyzerConfigDocuments(ImmutableArray.Create( 4716solution = solution.AddAnalyzerConfigDocuments(ImmutableArray.Create( 4757solution = solution.AddAnalyzerConfigDocuments(ImmutableArray.Create( 4805solution = solution.AddAnalyzerConfigDocuments(ImmutableArray.Create( 4851solution = solution.AddAnalyzerConfigDocuments(ImmutableArray.Create(
WorkspaceTests\WorkspaceReferenceTests.cs (12)
27metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 56metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 66projectReferences: ImmutableArray.Create<ProjectReference>(new ProjectReference(referenceInfo.Id)), 67metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 96metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 106projectReferences: ImmutableArray.Create<ProjectReference>(new ProjectReference(referenceInfo.Id)), 107metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 136metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 146projectReferences: ImmutableArray.Create<ProjectReference>(new ProjectReference(referenceInfo.Id)), 147metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 180metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 189var forkedProject = project.WithMetadataReferences(ImmutableArray.Create<MetadataReference>(
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
MethodHandlerDetails.cs (2)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length); 59var builder = ImmutableArray.CreateBuilder<(Type? RequestType, Type? ResponseType, Type RequestContextType)>();
Microsoft.DotNet.CodeAnalysis (4)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
48return ImmutableArray.Create(
Analyzers\MembersMustExistAnalyzer.cs (1)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(s_memberMustExistDiagnostic); } }
Analyzers\PinvokeAnalyzer.cs (1)
26public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(InvalidPinvokeCall); } }
Analyzers\ResourceUsageAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(InvalidSRFormatCall); } }
Microsoft.DotNet.SignTool (1)
src\ContentUtil.cs (1)
43return ImmutableArray.Create(sha2.ComputeHash(stream));
Microsoft.Extensions.Logging.Generators (5)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Extensions.Options.SourceGeneration (5)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
407var analyzers = ImmutableArray.Create(analyzer); 469var analyzers = ImmutableArray.Create(analyzer);
Microsoft.Gen.ContextualOptions.Unit.Tests (6)
EmitterTests.cs (4)
34ImmutableArray.Create("Foo")); 58ImmutableArray.Create("Foo", "Bar")); 86ImmutableArray.Create("Foo")); 114ImmutableArray.Create("Foo"));
test\Generators\Shared\RoslynTestUtils.cs (2)
407var analyzers = ImmutableArray.Create(analyzer); 469var analyzers = ImmutableArray.Create(analyzer);
Microsoft.Gen.Logging (5)
src\Generators\Shared\RoslynExtensions.cs (5)
114return ImmutableArray.Create(span[0]); 116return ImmutableArray.Create(span[0], span[1]); 118return ImmutableArray.Create(span[0], span[1], span[2]); 120return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 122var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Gen.Logging.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
407var analyzers = ImmutableArray.Create(analyzer); 469var analyzers = ImmutableArray.Create(analyzer);
Microsoft.Gen.Metrics (5)
src\Generators\Shared\RoslynExtensions.cs (5)
114return ImmutableArray.Create(span[0]); 116return ImmutableArray.Create(span[0], span[1]); 118return ImmutableArray.Create(span[0], span[1], span[2]); 120return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 122var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
407var analyzers = ImmutableArray.Create(analyzer); 469var analyzers = ImmutableArray.Create(analyzer);
Microsoft.Gen.MetricsReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
407var analyzers = ImmutableArray.Create(analyzer); 469var analyzers = ImmutableArray.Create(analyzer);
Microsoft.Interop.ComInterfaceGenerator (39)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(AddGeneratedComClassAttribute);
Analyzers\AddGeneratedComClassFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(AnalyzerDiagnostics.Ids.AddGeneratedComClassAttribute);
Analyzers\AddMarshalAsToElementFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage);
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ComHostingDoesNotSupportGeneratedComInterface);
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (4)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToGeneratedComInterface); 150var useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>( 158ImmutableArray.Create<IMarshallingInfoAttributeParser>( 163ImmutableArray.Create<ITypeBasedMarshallingInfoProvider>(
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
26public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(AnalyzerDiagnostics.Ids.ConvertToGeneratedComInterface);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (2)
21= ImmutableArray.Create(GeneratorDiagnostics.InterfaceTypeNotSupported); 23public static readonly ImmutableArray<ComInterfaceType> SupportedComInterfaceTypes = ImmutableArray.Create(ComInterfaceType.InterfaceIsIUnknown);
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (9)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(RuntimeComApisDoNotSupportSourceGeneratedCom, CastsBetweenRuntimeComAndSourceGeneratedComNotSupported); 57var firstArgumentTypeLookupOnly = ImmutableArray.Create(firstArgumentTypeLookup); 68methodsOfInterest.Add(createAggregatedObject, ImmutableArray.Create(CreateTypeArgumentTypeLookup(0), CreateArgumentTypeLookup(1))); 72methodsOfInterest.Add(createAggregatedObject, ImmutableArray.Create(CreateArgumentTypeLookup(1))); 80methodsOfInterest.Add(createWrapperOfType, ImmutableArray.Create(CreateTypeArgumentTypeLookup(0), CreateTypeArgumentTypeLookup(1), firstArgumentTypeLookup)); 84methodsOfInterest.Add(createWrapperOfType, ImmutableArray.Create(firstArgumentTypeLookup, CreateTypeOfArgumentTypeLookup(1))); 88methodsOfInterest.Add(marshalType.GetMembers("GetTypedObjectForIUnknown")[0], ImmutableArray.Create(CreateTypeOfArgumentTypeLookup(1))); 96methodsOfInterest.Add(getComInterfaceForObject, ImmutableArray.Create(CreateTypeArgumentTypeLookup(0), CreateTypeArgumentTypeLookup(1), firstArgumentTypeLookup)); 100methodsOfInterest.Add(getComInterfaceForObject, ImmutableArray.Create(CreateArgumentTypeLookup(0), CreateTypeOfArgumentTypeLookup(1)));
ComClassInfo.cs (1)
42ImmutableArray<string>.Builder names = ImmutableArray.CreateBuilder<string>();
ComInterfaceContext.cs (1)
33var accumulator = ImmutableArray.CreateBuilder<DiagnosticOr<ComInterfaceContext>>(data.Length);
ComInterfaceGenerator.cs (3)
374ImmutableArray.Create(FunctionPointerUnmanagedCallingConvention(Identifier("MemberFunction")))); 433var contextList = ImmutableArray.CreateBuilder<ComInterfaceAndMethodsContext>(); 437var methodList = ImmutableArray.CreateBuilder<ComMethodContext>();
ComInterfaceInfo.cs (2)
112ImmutableArray<DiagnosticInfo>.Builder nonFatalDiagnostics = ImmutableArray.CreateBuilder<DiagnosticInfo>(); 150ImmutableArray<InterfaceInfo>.Builder builder = ImmutableArray.CreateBuilder<InterfaceInfo>();
ComMethodInfo.cs (2)
42var methods = ImmutableArray.CreateBuilder<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>(); 145var attributeInfos = ImmutableArray.CreateBuilder<AttributeInfo>(attributes.Length);
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (2)
56return ImmutableArray.Create(context.Project); 58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>();
VirtualMethodPointerStubGenerator.cs (3)
181var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2); 203var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2); 288ImmutableArray<FunctionPointerUnmanagedCallingConventionSyntax>.Builder callingConventions = ImmutableArray.CreateBuilder<FunctionPointerUnmanagedCallingConventionSyntax>();
Microsoft.Interop.JavaScript.JSImportGenerator (5)
JSExportGenerator.cs (1)
72return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.JSExportRequiresAllowUnsafeBlocks, null));
JSImportGenerator.cs (1)
70return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.JSImportRequiresAllowUnsafeBlocks, null));
JSSignatureContext.cs (3)
38ImmutableArray<IUseSiteAttributeParser> useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>(new JSMarshalAsAttributeParser(env.Compilation)); 43ImmutableArray.Create<IMarshallingInfoAttributeParser>(new JSMarshalAsAttributeParser(env.Compilation)), 44ImmutableArray.Create<ITypeBasedMarshallingInfoProvider>(new FallbackJSMarshallingInfoProvider()));
Microsoft.Interop.LibraryImportGenerator (16)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
25public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(GeneratorDiagnostics.Ids.TypeNotSupported);
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToLibraryImport);
Analyzers\ConvertToLibraryImportFixer.cs (1)
33public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(Ids.ConvertToLibraryImport);
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
570ImmutableArray.Create(
Analyzers\CustomMarshallerAttributeFixer.cs (2)
96return ImmutableArray.CreateRange((await Task.WhenAll(context.Solution.Projects.Select(context.GetAllDiagnosticsAsync)).ConfigureAwait(false)).SelectMany(arr => arr)); 106ImmutableArray.Create(
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
55ImmutableArray.Create(
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
20ImmutableArray.Create(MarkMethodsAsStaticSuppression);
LibraryImportGenerator.cs (1)
83return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null));
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (2)
56return ImmutableArray.Create(context.Project); 58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>();
Microsoft.Interop.LibraryImportGenerator.Downlevel (8)
DownlevelLibraryImportGeneratorHelpers.cs (3)
33var useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>( 40ImmutableArray.Create<IMarshallingInfoAttributeParser>(new MarshalAsAttributeParser(diagnostics, defaultInfo)), 41ImmutableArray.Create<ITypeBasedMarshallingInfoProvider>(
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Interop.SourceGeneration (32)
BoundGenerators.cs (4)
26ImmutableArray<IBoundMarshallingGenerator>.Builder signatureMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 27ImmutableArray<IBoundMarshallingGenerator>.Builder nativeParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 28ImmutableArray<IBoundMarshallingGenerator>.Builder managedParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 29ImmutableArray<GeneratorDiagnostic>.Builder generatorDiagnostics = ImmutableArray.CreateBuilder<GeneratorDiagnostic>();
ContainingSyntaxContext.cs (1)
52ImmutableArray<ContainingSyntax>.Builder containingTypeInfoBuilder = ImmutableArray.CreateBuilder<ContainingSyntax>();
DefaultMarshallingInfoParser.cs (3)
53var useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>( 61ImmutableArray.Create<IMarshallingInfoAttributeParser>( 66ImmutableArray.Create<ITypeBasedMarshallingInfoProvider>(
DiagnosticOr.cs (3)
70Val v => new ValueAndDiagnostic(v.Value, ImmutableArray.Create(diagnostic)), 91return new Diag(ImmutableArray.Create(diagnostic)); 110return new ValueAndDiagnostic(value, ImmutableArray.Create(diagnostics));
GeneratedStatements.cs (3)
74ImmutableArray<StatementSyntax>.Builder statementsToUpdate = ImmutableArray.CreateBuilder<StatementSyntax>(); 158ImmutableArray<StatementSyntax>.Builder catchClauseBuilder = ImmutableArray.CreateBuilder<StatementSyntax>(); 168return ImmutableArray.Create(
IncrementalValuesProviderExtensions.cs (1)
23ImmutableArray<(T, U)>.Builder builder = ImmutableArray.CreateBuilder<(T, U)>(data.Left.Length);
Marshalling\ByValueMarshalKindSupportDescriptor.cs (1)
25ImmutableArray.Create(info.ByValueMarshalAttributeLocations.OutLocation))
Marshalling\ResolvedGenerator.cs (1)
27return new(s_forwarder.Bind(info, context), ImmutableArray.Create<GeneratorDiagnostic>(notSupportedDiagnostic));
SignatureContext.cs (2)
64ImmutableArray<AttributeListSyntax>.Builder additionalAttrs = ImmutableArray.CreateBuilder<AttributeListSyntax>(); 108ImmutableArray<TypePositionInfo>.Builder typeInfos = ImmutableArray.CreateBuilder<TypePositionInfo>();
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
TypeSymbolExtensions.cs (4)
295ImmutableArray.CreateRange(arguments), 296ImmutableArray.CreateRange(annotations)); 316ImmutableArray<ITypeSymbol>.Builder typeArguments = ImmutableArray.CreateBuilder<ITypeSymbol>(); 317ImmutableArray<NullableAnnotation>.Builder nullableAnnotations = ImmutableArray.CreateBuilder<NullableAnnotation>();
VariableDeclarations.cs (4)
18ImmutableArray<StatementSyntax>.Builder initializations = ImmutableArray.CreateBuilder<StatementSyntax>(); 19ImmutableArray<LocalDeclarationStatementSyntax>.Builder variables = ImmutableArray.CreateBuilder<LocalDeclarationStatementSyntax>(); 81ImmutableArray<StatementSyntax>.Builder initializations = ImmutableArray.CreateBuilder<StatementSyntax>(); 82ImmutableArray<LocalDeclarationStatementSyntax>.Builder variables = ImmutableArray.CreateBuilder<LocalDeclarationStatementSyntax>();
Microsoft.ML.CodeAnalyzer.Tests (3)
Code\BaseTestClassTest.cs (1)
18.AddPackages(ImmutableArray.Create(new PackageIdentity("xunit", "2.4.2")));
Code\RelaxTestNamingTest.cs (1)
109public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Helpers\AdditionalMetadataReferences.cs (1)
19.AddPackages(ImmutableArray.Create(new PackageIdentity("System.Memory", "4.5.1")));
Microsoft.ML.Data (15)
Transforms\NormalizeColumn.cs (4)
519=> new NormalizingTransformer.AffineNormalizerModelParameters<ImmutableArray<TFloat>>(ImmutableArray.Create(Scale), ImmutableArray.Create(Offset)); 638=> new NormalizingTransformer.CdfNormalizerModelParameters<ImmutableArray<TFloat>>(ImmutableArray.Create(Mean), ImmutableArray.Create(Stddev), UseLog);
Transforms\NormalizeColumnDbl.cs (4)
1227=> new NormalizingTransformer.BinNormalizerModelParameters<TFloat>(ImmutableArray.Create(_binUpperBounds), _den, _offset); 1377=> new NormalizingTransformer.BinNormalizerModelParameters<ImmutableArray<TFloat>>(_binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), 1378ImmutableArray.Create(_den), 1379ImmutableArray.Create(_offset));
Transforms\NormalizeColumnSng.cs (4)
1388=> new NormalizingTransformer.BinNormalizerModelParameters<TFloat>(ImmutableArray.Create(_binUpperBounds), _den, _offset); 1540_binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), 1541ImmutableArray.Create(_den), 1542ImmutableArray.Create(_offset));
Transforms\Normalizer.cs (3)
527Columns = ImmutableArray.Create(columns); 631Columns = ImmutableArray.Create(cols); 652Columns = ImmutableArray.Create(cols);
Microsoft.ML.DataView (1)
VectorType.cs (1)
49Dimensions = ImmutableArray.Create(Size);
Microsoft.ML.FastTree (7)
RegressionTree.cs (7)
162_lteChild = ImmutableArray.Create(_tree.LteChild, 0, _tree.NumNodes); 163_gtChild = ImmutableArray.Create(_tree.GtChild, 0, _tree.NumNodes); 165_numericalSplitFeatureIndexes = ImmutableArray.Create(_tree.SplitFeatures, 0, _tree.NumNodes); 166_numericalSplitThresholds = ImmutableArray.Create(_tree.RawThresholds, 0, _tree.NumNodes); 167_categoricalSplitFlags = ImmutableArray.Create(_tree.CategoricalSplit, 0, _tree.NumNodes); 168_leafValues = ImmutableArray.Create(_tree.LeafValues, 0, _tree.NumLeaves); 169_splitGains = ImmutableArray.Create(_tree.SplitGains, 0, _tree.NumNodes);
Microsoft.ML.InternalCodeAnalyzer (12)
BaseTestClassAnalyzer.cs (1)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
BestFriendAnalyzer.cs (1)
37ImmutableArray.Create(Rule);
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
32ImmutableArray.Create(Rule);
ContractsCheckAnalyzer.cs (1)
76ImmutableArray.Create(
ContractsCheckNameofFixProvider.cs (1)
29public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(Id);
InstanceInitializerAnalyzer.cs (1)
29ImmutableArray.Create(Rule);
NameAnalyzer.cs (1)
72ImmutableArray.Create(PrivateFieldName.Rule, GeneralName.Rule);
NameFixProvider.cs (1)
34private static ImmutableArray<string> _fixable = ImmutableArray.Create(
ParameterVariableNameAnalyzer.cs (1)
30ImmutableArray.Create(Rule);
RelaxTestNamingSuppressor.cs (1)
22public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; } = ImmutableArray.Create(Rule);
SingleVariableDeclarationAnalyzer.cs (1)
30ImmutableArray.Create(Rule);
TypeParamNameAnalyzer.cs (1)
29ImmutableArray.Create(Rule);
Microsoft.ML.Transforms (11)
PermutationFeatureImportanceExtensions.cs (8)
45/// <see cref="ImmutableArray"/> of <see cref="RegressionMetrics"/> objects is returned. See the sample below for an 108/// <see cref="ImmutableArray"/> of <see cref="RegressionMetrics"/> objects is returned. See the sample below for an 195/// <see cref="ImmutableArray"/> of <see cref="BinaryClassificationMetrics"/> objects is returned. See the sample below for an 258/// <see cref="ImmutableArray"/> of <see cref="BinaryClassificationMetrics"/> objects is returned. See the sample below for an 349/// <see cref="ImmutableArray"/> of <see cref="MulticlassClassificationMetrics"/> objects is returned. See the sample below for an 412/// <see cref="ImmutableArray"/> of <see cref="MulticlassClassificationMetrics"/> objects is returned. See the sample below for an 508/// <see cref="ImmutableArray"/> of <see cref="RankingMetrics"/> objects is returned. See the sample below for an 573/// <see cref="ImmutableArray"/> of <see cref="RankingMetrics"/> objects is returned. See the sample below for an
Text\LdaTransform.cs (2)
340var itemScoresPerTopicBuilder = ImmutableArray.CreateBuilder<List<ModelParameters.ItemScore>>(); 357var wordScoresPerTopicBuilder = ImmutableArray.CreateBuilder<List<ModelParameters.WordItemScore>>();
Text\NgramTransform.cs (1)
1062_maximumNgramsCounts = ImmutableArray.Create(limits);
Microsoft.VisualStudio.LanguageServices (29)
FindReferences\Contexts\WithReferencesFindUsagesContext.cs (1)
259var result = ImmutableArray.CreateRange(q);
Interactive\VsResetInteractive.cs (4)
114var referencesBuilder = ImmutableArray.CreateBuilder<string>(); 115var referenceSearchPathsBuilder = ImmutableArray.CreateBuilder<string>(); 116var sourceSearchPathsBuilder = ImmutableArray.CreateBuilder<string>(); 117var namespacesToImportBuilder = ImmutableArray.CreateBuilder<string>();
Library\ObjectBrowser\AbstractListItemFactory.cs (12)
174var builder = ImmutableArray.CreateBuilder<ObjectListItem>(symbols.Length); 213var symbolBuilder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(); 255var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 296var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 319var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(members.Length); 334var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(); 449var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 551var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length); 592var projectListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>(); 593var referenceListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>(); 666var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length); 705var finalBuilder = ImmutableArray.CreateBuilder<ObjectListItem>();
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (3)
54var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 69var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 88var builder = ImmutableArray.CreateBuilder<ObjectListItem>();
Library\VsNavInfo\NavInfo.cs (2)
68var builder = ImmutableArray.CreateBuilder<NavInfoNode>(); 90var builder = ImmutableArray.CreateBuilder<NavInfoNode>();
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
218folders = ImmutableArray.Create(relativePathParts, start: 0, length: relativePathParts.Length - 1);
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
72_metadataReferences = ImmutableArray.CreateRange(CreateMetadataReferences());
PullMemberUp\WarningDialog\PullMemberUpWarningViewModel.cs (1)
25var warningMessagesBuilder = ImmutableArray.CreateBuilder<string>();
Snippets\AbstractSnippetInfoService.cs (1)
180var snippetListBuilder = ImmutableArray.CreateBuilder<SnippetInfo>();
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
38s_rootLocations = ImmutableArray.Create(GetLocation(ASM_CACHE.ROOT), GetLocation(ASM_CACHE.ROOT_EX));
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
341var operations = ImmutableArray.Create<CodeActionOperation>(new ApplyChangesOperation(newSolution));
Venus\ContainedLanguageCodeSupport.cs (1)
184? ImmutableArray.Create(syntaxFactory.MemberAccessExpression(
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Options\CSharpVisualStudioOptionStorageReadFallbacks.cs (2)
20private static readonly ImmutableArray<(string key, int flag)> s_storages = ImmutableArray.Create( 38private static readonly ImmutableArray<(string key, int flag)> s_storages = ImmutableArray.Create(
ProjectSystemShim\CSharpProjectShim.ICSharpVenusProjectSite.cs (1)
49ProjectSystemProject.AddProjectReference(new ProjectReference(existingProjectReference.ProjectId, ImmutableArray.Create(currentAliases), existingProjectReference.EmbedInteropTypes));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (23)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (5)
22private static readonly ImmutableArray<DiagnosticAnalyzer> s_defaultAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new MockDiagnosticAnalyzer()); 53=> Fixer != null ? ImmutableArray.Create(Fixer) : ImmutableArray<CodeFixProvider>.Empty; 61public sealed override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(Id); 77: this(ImmutableArray.Create((diagnosticId, category))) 87: this(ImmutableArray.Create(MockFixer.Id))
Interactive\Commands\ResetInteractiveTests.cs (5)
94References = ImmutableArray.CreateRange(GetProjectReferences(workspace, project)), 95ReferenceSearchPaths = ImmutableArray.Create("rsp1", "rsp2"), 96SourceSearchPaths = ImmutableArray.Create("ssp1", "ssp2"), 97ProjectNamespaces = ImmutableArray.Create("System", "ResetInteractiveTestsDocument", "VisualBasicResetInteractiveTestsDocument"), 98NamespacesToImport = ImmutableArray.Create("System", "ResetInteractiveTestsDocument"),
ProjectSystemShim\CPS\AnalyzersTests.cs (4)
39project.SetOptions(ImmutableArray.Create($"/ruleset:{ruleSetFile.Path}")); 63project.SetOptions(ImmutableArray.Create($"/ruleset:{ruleSetFile.Path}")); 66project.SetOptions(ImmutableArray.Create($"/ruleset:{ruleSetFile.Path}")); 80project.SetOptions(ImmutableArray.Create($"/ruleset:{ruleSetFile.Path}"));
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (6)
53project.SetOptions(ImmutableArray.Create(@"/warnaserror")); 71project.SetOptions(ImmutableArray.Create($"/out:{newObjPath}")); 77project.SetOptions(ImmutableArray.Create($"/out:{newObjPath}")); 83project.SetOptions(ImmutableArray.Create($"/out:{newObjPath}")); 103project.SetOptions(ImmutableArray.Create($"/out:{relativeObjPath}")); 186cpsProject.SetOptions(ImmutableArray.Create("/checksumalgorithm:SHA1"));
ProjectSystemShim\CSharpHelpers.cs (1)
93cpsProject.SetOptions(ImmutableArray.Create(commandLineArguments));
ProjectSystemShim\TestEvaluationData.cs (1)
41"IntermediateAssembly" => ImmutableArray.Create(OutputAssembly),
UnifiedSettings\CSharpUnifiedSettingsTests.cs (1)
24internal override ImmutableArray<IOption2> OnboardedOptions => ImmutableArray.Create<IOption2>(
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
68var projectInfos = ImmutableArray.CreateBuilder<ProjectInfo>();
Microsoft.VisualStudio.LanguageServices.UnitTests (21)
DebuggerIntelliSense\TestState.vb (1)
26Private Shared ReadOnly s_roles As ImmutableArray(Of String) = ImmutableArray.Create(PredefinedTextViewRoles.Editable, "DEBUGVIEW", PredefinedTextViewRoles.Interactive)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (3)
49ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 95ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 270Return ImmutableArray.Create(DescriptorFactory.CreateSimpleDescriptor("CompilationAnalyzer"))
Diagnostics\VisualStudioDiagnosticAnalyzerProviderTests.vb (1)
55Dim hostAnalyzers = New HostDiagnosticAnalyzers(ImmutableArray.Create(Of AnalyzerReference)(New AnalyzerFileReference(analyzerFile.Path, analyzerLoader)))
InheritanceMargin\InheritanceMarginViewModelTests.vb (3)
277Dim targetForBar1 = ImmutableArray.Create(Of MenuItemViewModel)(New HeaderMenuItemViewModel(ServicesVSResources.Derived_types, KnownMonikers.Overridden)). 282Dim targetForBar2 = ImmutableArray.Create(Of MenuItemViewModel)( 289Dim targetForBar3 = ImmutableArray.Create(Of MenuItemViewModel)(New HeaderMenuItemViewModel(ServicesVSResources.Base_Types, KnownMonikers.Overriding)).
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
40ImmutableArray.Create(memberSymbol),
MoveToNamespace\MoveToNamespaceDialogViewModelTests.vb (1)
80availableNamespaces = ImmutableArray.Create({
ProjectSystemShim\FileChangeWatcherTests.vb (2)
36Dim context1 = fileChangeWatcher.CreateContext(ImmutableArray.Create(New WatchedDirectory(_tempPath, ImmutableArray(Of String).Empty))) 37Dim context2 = fileChangeWatcher.CreateContext(ImmutableArray.Create(New WatchedDirectory(_tempPath, ImmutableArray(Of String).Empty)))
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (6)
200referencingProject.AddMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias1"))) 208referencingProject.AddMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias2"))) 212referencingProject.RemoveMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias2"))) 217referencingProject.RemoveMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias1"))) 263referencingProject.AddMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("temporary"))) 272referencingProject.RemoveMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("temporary")))
SolutionExplorer\CpsDiagnosticItemSourceTests.vb (1)
36analyzers.Add(LanguageNames.VisualBasic, ImmutableArray.Create(Of DiagnosticAnalyzer)(New Microsoft.CodeAnalysis.VisualBasic.UseAutoProperty.VisualBasicUseAutoPropertyAnalyzer()))
UnifiedSettings\VisualBasicUnifiedSettingsTests.vb (1)
21Return ImmutableArray.Create(Of IOption2)(
Venus\DocumentService_IntegrationTests.vb (1)
328Return New ExcerptResult(mappedSource.GetSubText(line.Span), New TextSpan(mappedSpan.Start - line.Start, mappedSpan.Length), ImmutableArray.Create(New ClassifiedSpan(New TextSpan(0, line.Span.Length), ClassificationTypeNames.Text)), document, span)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
53ImmutableArray.Create(Of IParameterSymbol)())
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (1)
154Dim runtimes = ImmutableArray.CreateBuilder(Of String)
Snippets\SnippetCompletionProvider.vb (1)
78commitCharacterRules:=ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, s_commitChars)))
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageClient\XamlInProcLanguageClient.cs (1)
43protected override ImmutableArray<string> SupportedLanguages => ImmutableArray.Create(StringConstants.XamlLanguageName);
Implementation\LanguageClient\XamlInProcLanguageClientDisableUX.cs (1)
45protected override ImmutableArray<string> SupportedLanguages => ImmutableArray.Create(StringConstants.XamlLanguageName);
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
22var references = ImmutableArray.CreateBuilder<MetadataReference>();
Roslyn.Test.PdbUtilities (2)
EditAndContinue\EditAndContinueTest.cs (1)
182return ImmutableArray.CreateRange(edits.Select(e =>
Reader\MethodDebugInfoBytes.cs (1)
56var rootScope = new MockSymUnmanagedScope(ImmutableArray.Create<ISymUnmanagedScope>(childScope), default(ImmutableArray<ISymUnmanagedNamespace>));
Roslyn.VisualStudio.Next.UnitTests (70)
Options\VisualStudioSettingsOptionPersisterTests.cs (4)
97optionType == typeof(ImmutableArray<bool>) ? (ImmutableArray.Create(true, false), new[] { true, false }) : 98optionType == typeof(ImmutableArray<int>) ? (ImmutableArray.Create(0, 1), new[] { 0, 1 }) : 99optionType == typeof(ImmutableArray<long>) ? (ImmutableArray.Create(0L, 1L), new[] { 0L, 1L }) : 100optionType == typeof(ImmutableArray<string>) ? (ImmutableArray.Create("a", "b"), new[] { "a", "b" }) :
Remote\SerializationValidator.cs (1)
63Children = ImmutableArray.CreateRange(collection.Select(c => validator.GetValueAsync<T>(c).Result));
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 (42)
114var sessionId = Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())); 518ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString())))); 526ImmutableArray.Create(("SG.cs", sourceText)), 527ImmutableArray.Create(("SG.cs", sourceText))); 535ImmutableArray.Create(("SG.cs", CreateText(sourceText))), 536ImmutableArray.Create(("SG.cs", CreateText(sourceText)))); 543ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString()))), 544ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString())))); 551ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString()))), 552ImmutableArray.Create(("NewName.cs", CreateText(Guid.NewGuid().ToString())))); 560ImmutableArray.Create(("SG.cs", sourceText)), 561ImmutableArray.Create(("NewName.cs", sourceText))); 569ImmutableArray.Create(("SG.cs", CreateText(sourceText))), 570ImmutableArray.Create(("NewName.cs", CreateText(sourceText)))); 577ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString()))), 578ImmutableArray.Create(("NewName.cs", CreateText(Guid.NewGuid().ToString())))); 585ImmutableArray.Create(("SG.cs", CreateText("X", Encoding.ASCII))), 586ImmutableArray.Create(("SG.cs", CreateText("X", Encoding.UTF8)))); 593ImmutableArray.Create(("SG.cs", CreateText("X", Encoding.UTF8, checksumAlgorithm: SourceHashAlgorithm.Sha1))), 594ImmutableArray.Create(("SG.cs", CreateText("X", Encoding.UTF8, checksumAlgorithm: SourceHashAlgorithm.Sha256)))); 601ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString()))), 610ImmutableArray.Create(("SG.cs", CreateText(Guid.NewGuid().ToString())))); 618ImmutableArray.Create(("SG.cs", CreateText(contents))), 619ImmutableArray.Create(("SG.cs", CreateText(contents)), ("SG1.cs", CreateText(contents)))); 627ImmutableArray.Create(("SG.cs", CreateText(contents))), 628ImmutableArray.Create(("SG.cs", CreateText(contents)), ("SG1.cs", CreateText("Other")))); 636ImmutableArray.Create(("SG.cs", CreateText(contents))), 637ImmutableArray.Create(("SG1.cs", CreateText(contents)), ("SG.cs", CreateText("Other")))); 645ImmutableArray.Create(("SG.cs", CreateText(contents))), 646ImmutableArray.Create(("SG1.cs", CreateText("Other")), ("SG.cs", CreateText(contents)))); 654ImmutableArray.Create(("SG.cs", CreateText(contents))), 655ImmutableArray.Create(("SG1.cs", CreateText("Other")), ("SG.cs", CreateText(contents))), 664ImmutableArray.Create(("SG1.cs", contents), ("SG2.cs", contents))); 672ImmutableArray.Create(("SG1.cs", contents), ("SG2.cs", contents)), 673ImmutableArray.Create(("SG2.cs", contents), ("SG1.cs", contents))); 681ImmutableArray.Create(("SG1.cs", CreateText(contents)), ("SG2.cs", CreateText(contents))), 682ImmutableArray.Create(("SG2.cs", CreateText(contents)), ("SG1.cs", CreateText(contents)))); 691ImmutableArray.Create(("SG.cs", CreateStreamText(contents, useBOM: useBOM1, useMemoryStream: useMemoryStream1))), 692ImmutableArray.Create(("SG.cs", CreateStreamText(contents, useBOM: useBOM2, useMemoryStream: useMemoryStream2)))); 720return ImmutableArray.Create(("hint", SourceText.From($"// generated document {callCount}", Encoding.UTF8))); 804return ImmutableArray.Create(("hint", SourceText.From($"// generated document {callCount}", Encoding.UTF8))); 859return ImmutableArray.Create(("hint", SourceText.From($"// generated document {callCount}", Encoding.UTF8)));
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 (12)
372return s.AddAnalyzerConfigDocuments(ImmutableArray.Create(analyzerConfigDocumentInfo)); 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()));
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
266ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true)); 286ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true));
RunTests (3)
ProcessTestExecutor.cs (1)
195processResults: ImmutableArray.CreateRange(processResultList));
TestRunner.cs (2)
146return new RunAllResult(result.ExitCode == 0, ImmutableArray<TestResult>.Empty, ImmutableArray.Create(result)); 405var processResults = ImmutableArray.CreateBuilder<ProcessResult>();
SemanticSearch.BuildTask.UnitTests (3)
GenerateFilteredReferenceAssembliesTaskTests.cs (3)
115var patterns = ImmutableArray.Create( 160var patterns = ImmutableArray.Create( 200var patterns = ImmutableArray.Create(
System.Collections.Immutable (9)
System\Collections\Immutable\ImmutableArray_1.cs (7)
14[CollectionBuilder(typeof(ImmutableArray), nameof(ImmutableArray.Create))] 321return ImmutableArray.Create(item); 354return ImmutableArray.CreateRange(items); 427return ImmutableArray.Create(item); 463return ImmutableArray.Create(items, 0, length); 1038return ImmutableArray.Create(self, start, length);
System\Linq\ImmutableArrayExtensions.cs (2)
483ImmutableArray.TwoElementArray.Single(); // throw the same exception as LINQ would 526ImmutableArray.TwoElementArray.Single(); // throw the same exception as LINQ would
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule, RuleHelper, RuleCantParse, RuleAttributeNotSpecificEnough); } }
System.Private.Windows.Core.TestUtilities (1)
XUnit\TestData.cs (1)
56= ImmutableArray.Create(T.MinValue == T.Zero
System.Reflection.Emit (2)
System\Reflection\Emit\SignatureHelper.cs (2)
182arrayEncoder.Shape(type.GetArrayRank(), ImmutableArray.Create<int>(), ImmutableArray.Create<int>(new int[rank]));
System.Reflection.Metadata (27)
System\Reflection\Internal\MemoryBlocks\ByteArrayMemoryBlock.cs (1)
35return ImmutableArray.Create(_provider.Array, _start + start, length);
System\Reflection\Metadata\BlobWriter.cs (1)
104return ImmutableArray.Create(_buffer.AsSpan(_start + start, byteCount));
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (3)
109var arguments = ImmutableArray.CreateBuilder<CustomAttributeTypedArgument<TType>>(count); 128var arguments = ImmutableArray.CreateBuilder<CustomAttributeNamedArgument<TType>>(count); 404var array = ImmutableArray.CreateBuilder<CustomAttributeTypedArgument<TType>>(count);
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (1)
159return ImmutableArray.Create(
System\Reflection\Metadata\Ecma335\MetadataBuilder.cs (1)
22var heapSizes = ImmutableArray.Create(
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
545var stringVirtualIndexToHeapOffsetMap = ImmutableArray.CreateBuilder<int>(totalCount);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (1)
296var rowCounts = ImmutableArray.CreateBuilder<int>(MetadataTokens.TableCount);
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
20internal static readonly ImmutableArray<int> EmptyRowCounts = ImmutableArray.Create(new int[MetadataTokens.TableCount]);
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (4)
148var types = ImmutableArray.CreateBuilder<TType>(count); 187var parameterBuilder = ImmutableArray.CreateBuilder<TType>(parameterCount); 260var builder = ImmutableArray.CreateBuilder<int>(sizesCount); 271var builder = ImmutableArray.CreateBuilder<int>(lowerBoundsCount);
System\Reflection\Metadata\IL\MethodBodyBlock.cs (2)
206return ImmutableArray.Create(result); 223return ImmutableArray.Create(result);
System\Reflection\Metadata\Internal\NamespaceCache.cs (3)
427Namespaces = ImmutableArray.CreateBuilder<NamespaceDefinitionHandle>(); 428TypeDefinitions = ImmutableArray.CreateBuilder<TypeDefinitionHandle>(); 429ExportedTypes = ImmutableArray.CreateBuilder<ExportedTypeHandle>();
System\Reflection\Metadata\MetadataReader.cs (1)
1435builder = ImmutableArray.CreateBuilder<TypeDefinitionHandle>();
System\Reflection\Metadata\TypeNameParser.cs (1)
125genericArgs = ImmutableArray.CreateBuilder<TypeName>(2);
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (1)
87other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>();
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (1)
94other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>();
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
96var builder = ImmutableArray.CreateBuilder<Section>(3);
System\Reflection\PortableExecutable\PEBuilder.cs (1)
126var result = ImmutableArray.CreateBuilder<SerializedSection>(sections.Length);
System\Reflection\PortableExecutable\PEHeaders.cs (1)
301var builder = ImmutableArray.CreateBuilder<SectionHeader>(numberOfSections);
System\Reflection\PortableExecutable\PEReader.cs (1)
567var builder = ImmutableArray.CreateBuilder<DebugDirectoryEntry>(entryCount);
System.Text.Json.SourceGeneration (6)
Helpers\KnownTypeSymbols.cs (1)
276factoryTypeFullName = typeof(ImmutableArray).FullName;
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
System.Text.RegularExpressions.Generator (7)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (5)
165case 1: return ImmutableArray.Create(span[0]); 166case 2: return ImmutableArray.Create(span[0], span[1]); 167case 3: return ImmutableArray.Create(span[0], span[1], span[2]); 168case 4: return ImmutableArray.Create(span[0], span[1], span[2], span[3]); 170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
UpgradeToGeneratedRegexAnalyzer.cs (1)
30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseRegexSourceGeneration);
UpgradeToGeneratedRegexCodeFixer.cs (1)
35public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(DiagnosticDescriptors.UseRegexSourceGeneration.Id);
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
29Return ImmutableArray.Create(DiagnosticIDs.MissingPropertySerializationConfiguration)
System.Windows.Forms.Analyzers.VisualBasic (2)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
22Return ImmutableArray.Create(s_avoidFuncReturningTaskWithoutCancellationToken)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
17Return ImmutableArray.Create(s_missingPropertySerializationConfiguration)
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\MetadataCache.cs (1)
53return (moduleBuilder != null) ? moduleBuilder.ToImmutableAndFree() : ImmutableArray.Create(manifestModule);
VBCSCompiler.UnitTests (11)
AnalyzerConsistencyCheckerTests.cs (9)
89var analyzerReferences = ImmutableArray.Create(new CommandLineAnalyzerReference("Alpha.dll")); 99var analyzerReferences = ImmutableArray.Create( 119var analyzerReferences = ImmutableArray.Create( 145ImmutableArray.Create(new CommandLineAnalyzerReference(mvidAlpha1.Path)), 155ImmutableArray.Create(new CommandLineAnalyzerReference(mvidAlpha2.Path)), 184var analyzerReferences = ImmutableArray.Create( 207var analyzerReferences = ImmutableArray.Create( 225var analyzerReferences = ImmutableArray.Create( 240var analyzerReferences = ImmutableArray.Create(new CommandLineAnalyzerReference(compFile.Path));
BuildProtocolTest.cs (1)
50ImmutableArray.Create(
CompilerServerTests.cs (1)
1465dir.CopyFile(typeof(System.Collections.Immutable.ImmutableArray).Assembly.Location);
VisualBasicSyntaxGenerator (2)
Grammar\GrammarGenerator.vb (2)
161_majorRules = ImmutableArray.Create( 336ImmutableArray.Create(name))