289 references to Create
ILLink.RoslynAnalyzer (2)
RequiresAssemblyFilesAnalyzer.cs (1)
37 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (s_locationRule, s_getFilesRule, s_requiresAssemblyFilesRule, s_requiresAssemblyFilesAttributeMismatch, s_requiresAssemblyFilesOnStaticCtor, s_requiresAssemblyFilesOnEntryPoint);
RequiresUnreferencedCodeAnalyzer.cs (1)
49 ImmutableArray.Create (s_makeGenericMethodRule, s_makeGenericTypeRule, s_requiresUnreferencedCodeRule, s_requiresUnreferencedCodeAttributeMismatch, s_typeDerivesFromRucClassRule, s_requiresUnreferencedCodeOnStaticCtor, s_requiresUnreferencedCodeOnEntryPoint);
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
129return ImmutableArray.Create(text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
Microsoft.Analyzers.Extra (1)
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
Microsoft.Analyzers.Local (1)
ApiLifecycle\ApiLifecycleAnalyzer.cs (1)
22=> ImmutableArray.Create(
Microsoft.AspNetCore.Analyzers (1)
StartupAnalyzer.Diagnostics.cs (1)
42public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create<DiagnosticDescriptor>(new[]
Microsoft.AspNetCore.App.Analyzers (3)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
RouteHandlers\RouteHandlerAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.AspNetCore.App.Analyzers.Test (2)
Infrastructure\WellKnownTypesTests.cs (1)
98public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
Verifiers\CSharpAnalyzerVerifier.cs (1)
64return net10Ref.AddAssemblies(ImmutableArray.Create(
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentParameterAnalyzer.cs (1)
24SupportedDiagnostics = ImmutableArray.Create(new[]
ComponentParameterUsageAnalyzer.cs (1)
17SupportedDiagnostics = ImmutableArray.Create(new[]
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentParameterAnalyzer.cs (1)
19SupportedDiagnostics = ImmutableArray.Create(new[]
ComponentParameterUsageAnalyzer.cs (1)
17SupportedDiagnostics = ImmutableArray.Create(new[]
Microsoft.AspNetCore.Mvc.Analyzers (1)
ViewFeatureAnalyzerBase.cs (1)
15SupportedDiagnostics = ImmutableArray.Create(new[] { SupportedDiagnostic });
Microsoft.Build (1)
Globbing\CompositeGlob.cs (1)
40: this(ImmutableArray.Create(globs))
Microsoft.Build.Framework (1)
HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
Microsoft.CodeAnalysis (40)
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
64_sortedCaseLabels = ImmutableArray.Create(caseLabels);
Collections\ImmutableArrayExtensions.cs (4)
87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray());
CryptographicHashProvider.cs (6)
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 });
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\StringExtensions.cs (1)
22numerals = ImmutableArray.Create("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
MetadataReader\MetadataDecoder.cs (1)
374typeSymbol = MakeFunctionPointerTypeSymbol(Cci.CallingConventionUtils.FromSignatureConvention(signatureHeader.CallingConvention), ImmutableArray.Create(parameters));
MetadataReader\PEModule.cs (1)
187return ImmutableArray.Create(hash);
MetadataReference\AssemblyIdentity.cs (2)
537ImmutableArray<byte> publicKey = (publicKeyBytes != null) ? ImmutableArray.Create(publicKeyBytes) : ImmutableArray<byte>.Empty; 556ImmutableArray.Create(name.GetPublicKeyToken()),
Operations\ControlFlowGraphBuilder.cs (1)
6063var validKinds = ImmutableArray.Create(OperationKind.Invocation, OperationKind.DynamicInvocation, OperationKind.Increment, OperationKind.Literal,
PEWriter\MetadataWriter.DynamicAnalysis.cs (1)
244BlobHandle partIndex = GetOrAddBlob(ImmutableArray.Create(MetadataWriter.s_utf8Encoding.GetBytes(part)));
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);
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
38private static readonly ImmutableArray<int> s_primes = ImmutableArray.Create(
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));
Text\SourceText.cs (2)
688return ImmutableArray.Create(algorithm.ComputeHash(buffer, offset, count)); 701return ImmutableArray.Create(algorithm.ComputeHash(stream));
Microsoft.CodeAnalysis.CodeStyle (7)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray());
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
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 (13)
BoundTree\Constructors.cs (1)
254: this(syntax, constructor, ImmutableArray.Create<BoundExpression>(arguments), default(ImmutableArray<string?>), default(ImmutableArray<RefKind>), false, default(ImmutableArray<int>), default(BitVector), null, null, constructor.ContainingType)
Compiler\MethodBodySynthesizer.cs (1)
517statements: ImmutableArray.Create<BoundStatement>(
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
189return ImmutableArray.Create(result);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
1123indices: ImmutableArray.Create((BoundExpression[])boundPositionVar),
Lowering\SyntheticBoundNodeFactory.cs (5)
455return Block(ImmutableArray.Create(statements)); 460return Block(locals, ImmutableArray.Create(statements)); 470return Block(locals, localFunctions, ImmutableArray.Create(statements)); 841return Call(receiver, method, ImmutableArray.Create<BoundExpression>(args)); 1058=> new(values, ImmutableArray.Create(statements));
Symbols\Attributes\PEAttributeData.cs (2)
114ImmutableArray.Create<TypedConstant>(lazyConstructorArguments)); 117ImmutableArray.Create<KeyValuePair<string, TypedConstant>>(lazyNamedArguments));
Symbols\Compilation_WellKnownMembers.cs (1)
470ImmutableArray.Create(
Symbols\MethodSymbol.cs (1)
843return this.Construct(ImmutableArray.Create(typeArguments));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\Utilities.cs (1)
13ImmutableArray.Create(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Classification\SemanticClassifierTests_TestMarkup.cs (1)
123var expected = ImmutableArray.Create(Keyword("class"),
CodeActions\AddUsing\AddUsingNuGetTests.cs (1)
387=> new(ImmutableArray.Create(results));
SignatureHelp\GenericNameSignatureHelpProviderTests.cs (1)
991classificationTypeNames: ImmutableArray.Create(
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (25)
CodeGen\CodeGenFunctionPointersTests.cs (1)
12623publicKeyOrToken: metadata.GetOrAddBlob(ImmutableArray.Create<byte>(0xB7, 0x7A, 0x5C, 0x56, 0x19, 0x34, 0xE0, 0x89)),
CodeGen\CodeGenTupleTest.cs (24)
5855var tupleWithoutNames = comp.CreateTupleTypeSymbol(vt1, ImmutableArray.Create(new[] { (string)null })); 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")); 6483ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")); 6524ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")); 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")); 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")); 13759ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")); 13820ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "item9")); 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)); 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));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
86var actualIL = ImmutableArray.Create(ilStream.ToArray()).GetMethodIL(); 158var actualIL = ImmutableArray.Create(ilStream.ToArray()).GetMethodIL();
Emit\EditAndContinue\EditAndContinueTests.cs (3)
277ImmutableArray.Create( 7218ImmutableArray.Create( 7243ImmutableArray.Create(
PDB\PDBUsingTests.cs (1)
1786new CSharpCompilationReference(compilation1, ImmutableArray.Create("global", "B", "A", "A", "global"))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Attributes\AttributeTests_NativeInteger.cs (1)
1384AssertEx.Equal(ImmutableArray.Create(true, true, true, false, true, true), reader.ReadBoolArray(customAttribute.Value));
Attributes\AttributeTests_Nullable.cs (4)
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);
Diagnostics\DiagnosticAnalyzerTests.cs (1)
763get { return ImmutableArray.Create(Descriptor1, Descriptor2, Descriptor3, Descriptor4, Descriptor5, Descriptor6); }
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\Utilities.cs (1)
13ImmutableArray.Create(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverFuzzTests.cs (1)
525var editedInputs = ImmutableArray.Create(new AdditionalText[]
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
TextEditorFactoryExtensions.cs (1)
27roles = ImmutableArray.Create(PredefinedTextViewRoles.Analyzable,
Workspaces\EditorTestHostDocument.cs (1)
23private static readonly ImmutableArray<string> s_defaultRoles = ImmutableArray.Create<string>
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
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));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (8)
Diagnostics\DiagnosticServiceTests.vb (1)
1812Return ImmutableArray.Create(Descriptor1, Descriptor2, Descriptor3, Descriptor4, Descriptor5, Descriptor6)
IntelliSense\IntellisenseQuickInfoBuilderTests.vb (7)
31ImmutableArray.Create( 55ImmutableArray.Create( 123ImmutableArray.Create( 144ImmutableArray.Create( 208ImmutableArray.Create( 229ImmutableArray.Create( 243ImmutableArray.Create(
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.FixAllProvider.cs (1)
26=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project,
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\ActiveStatementsMapTests.cs (2)
34var array = ImmutableArray.Create( 50var array = ImmutableArray.Create(
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\RemoteInitializationResult.cs (2)
21ImmutableArray.Create(MetadataReferencePaths), 22ImmutableArray.Create(Imports));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\CodeCleanup\DiagnosticSet.cs (1)
33: this(description, ImmutableArray.Create(diagnosticIds), isAnyDiagnosticIdExplicitlyEnabled: true)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Completion\CompletionTests.cs (1)
357completionParams, document, preselect: true, commitCharacters: ImmutableArray.Create(' ', '(', '[', '{', ';', '.')).ConfigureAwait(false);
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
133ImmutableArray.Create(gacAssemblyName.GetPublicKeyToken()));
Microsoft.CodeAnalysis.Test.Utilities (6)
CommonTestBase.cs (1)
210return ImmutableArray.Create<byte>(File.ReadAllBytes(path));
Compilation\IRuntimeEnvironment.cs (1)
76return ImmutableArray.Create(bytes);
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1963return ImmutableArray.Create(
Diagnostics\OperationTestAnalyzer.cs (1)
1021ImmutableArray.Create(EventReferenceDescriptor,
Mocks\TestMetadataReference.cs (1)
61: this(ImmutableArray.Create(metadataBytes), display)
Platform\Custom\SigningTestHelpers.cs (1)
38internal static readonly ImmutableArray<byte> PublicKey = ImmutableArray.Create(TestResources.General.snPublicKey);
Microsoft.CodeAnalysis.UnitTests (34)
Collections\ImmutableArrayExtensionsTests.cs (16)
271Assert.True(a.Concat(a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 4, 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))); 301Assert.True(a.InsertRange(2, a).SequenceEqual(ImmutableArray.Create<int>(0, 2, 0, 2, 4, 4))); 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); 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); 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); 469var a = ImmutableArray.Create<int>(0, 1, 2, 3, 4, 5); 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))); 498var a = ImmutableArray.Create(0, 1, 2, 3, 4, 5);
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);
Emit\CustomDebugInfoTests.cs (5)
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)); 340compressedStateMachineStateMap: ImmutableArray.Create<byte>(0x06, 0x00, 0x02, 0x20, 0x04, 0x10, 0x00, 0x10, 0x06, 0x20, 0x08, 0x20, 0x0A, 0x30)));
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 (20)
Binding\Binder_Delegates.vb (1)
204ImmutableArray.Create(boundArguments),
Binding\Binder_Diagnostics.vb (1)
43If(nodes.IsEmpty, ImmutableArray(Of BoundExpression).Empty, ImmutableArray.Create(nodes)),
Binding\Binder_Query.vb (2)
1519boundCallOrBadExpression = BadExpression(join, ImmutableArray.Create(Of BoundExpression)(outer, inner, outerKeyLambda, innerKeyLambda, joinSelectorLambda), 1702boundCallOrBadExpression = BadExpression(groupJoin, ImmutableArray.Create(Of BoundExpression)(outer, inner, outerKeyLambda, innerKeyLambda, intoLambda),
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
532ImmutableArray.Create(Of BoundExpression)(arguments),
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
836arguments:=ImmutableArray.Create(Of BoundExpression)(arguments),
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (1)
427Dim arguments = ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (4)
557callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 569callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 637callArgs = ImmutableArray.Create(Of BoundExpression)(receiver, 798Dim callArgs = ImmutableArray.Create(Of BoundExpression)(receiver,
Lowering\SyntheticBoundNodeFactory.vb (6)
330Return Block(ImmutableArray.Create(Of BoundStatement)(statements)) 334Return Block(locals, ImmutableArray.Create(Of BoundStatement)(statements)) 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)) 740Dim boundCaseBlock = New BoundCaseBlock(_syntax, boundCaseStatement, Block(ImmutableArray.Create(Of BoundStatement)(statements)))
Symbols\MethodSymbol.vb (1)
638Return Construct(ImmutableArray.Create(typeArguments))
Symbols\Source\ImplementsHelper.vb (1)
685Return ImmutableArray.Create(Of TSymbol)(substitutedImplementations)
Symbols\Source\SynthesizedEventAccessorSymbol.vb (1)
473ImmutableArray.Create(Of BoundStatement)(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
21Private Shared ReadOnly s_kinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\Utilities.vb (1)
10ImmutableArray.Create(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
46Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
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 (1)
21Friend Shared ReadOnly AllDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057, BC30272, BC30274, BC30389, BC30455, BC32006, BC30512, BC30387, BC30516)
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)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (11)
CodeGen\CodeGenTuples.vb (11)
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")) 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")) 7511ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")), TypeSymbol) 7514ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")), TypeSymbol)
Microsoft.CodeAnalysis.VisualBasic.Features (13)
ChangeSignature\VisualBasicChangeSignatureService.vb (4)
28Private Shared ReadOnly _declarationKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create( 38_declarationKinds.Concat(ImmutableArray.Create( 50Private Shared ReadOnly _updatableNodeKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create( 71Private Shared ReadOnly _updatableAncestorKinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
53Return ImmutableArray.Create(BC30025, BC30026, BC30027, BC30081, BC30082, BC30083, BC30084, BC30085, BC30185, BC30253, BC30384, BC30481, BC30624, BC30625,
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
48Return ImmutableArray.Create(BC30781, BC30782, BC30783, BC30784, BC30240, BC30065, BC30066, BC30067, BC30089, BC30096, BC30097, BC30099, BC30393, BC30689)
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (1)
18Friend Shared ReadOnly KeywordList As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
21Private Shared ReadOnly s_kinds As ImmutableArray(Of SyntaxKind) = ImmutableArray.Create(
src\Analyzers\VisualBasic\Analyzers\UseCompoundAssignment\Utilities.vb (1)
10ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AddParameter\VisualBasicAddParameterCodeFixProvider.vb (1)
46Public Overrides ReadOnly Property FixableDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(
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 (1)
21Friend Shared ReadOnly AllDiagnosticIds As ImmutableArray(Of String) = ImmutableArray.Create(BC30057, BC30272, BC30274, BC30389, BC30455, BC32006, BC30512, BC30387, BC30516)
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)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
405ilImage = ImmutableArray.Create(File.ReadAllBytes(reference.Path))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
18Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(
Microsoft.CodeAnalysis.Workspaces (8)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
31=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project,
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray());
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
87return ImmutableArray.Create<T>(items); 104return ImmutableArray.Create<T>(items); 120return ImmutableArray.Create<T>(items); 130return ImmutableArray.Create<byte>(stream.ToArray());
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
31return ImmutableArray.Create<T>(items);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestHelpers.cs (2)
32public static readonly ImmutableArray<(IOption, object)> PublicFormattingOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 85public static readonly ImmutableArray<(IOption, object)> PublicCodeStyleOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>(
Microsoft.DotNet.SignTool (1)
src\ContentUtil.cs (1)
43return ImmutableArray.Create(sha2.ComputeHash(stream));
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
163ImmutableArray.Create<ITypeBasedMarshallingInfoProvider>(
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
570ImmutableArray.Create(
Microsoft.Interop.SourceGeneration (1)
DiagnosticOr.cs (1)
110return new ValueAndDiagnostic(value, ImmutableArray.Create(diagnostics));
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.Transforms (1)
Text\NgramTransform.cs (1)
1062_maximumNgramsCounts = ImmutableArray.Create(limits);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Options\CSharpVisualStudioOptionStorageReadFallbacks.cs (1)
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 (1)
ProjectSystemShim\CSharpHelpers.cs (1)
93cpsProject.SetOptions(ImmutableArray.Create(commandLineArguments));
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
MoveToNamespace\MoveToNamespaceDialogViewModelTests.vb (1)
80availableNamespaces = ImmutableArray.Create({
System.Reflection.Emit (1)
System\Reflection\Emit\SignatureHelper.cs (1)
182arrayEncoder.Shape(type.GetArrayRank(), ImmutableArray.Create<int>(), ImmutableArray.Create<int>(new int[rank]));
System.Reflection.Metadata (3)
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
20internal static readonly ImmutableArray<int> EmptyRowCounts = ImmutableArray.Create(new int[MetadataTokens.TableCount]);
System\Reflection\Metadata\IL\MethodBodyBlock.cs (2)
206return ImmutableArray.Create(result); 223return ImmutableArray.Create(result);
VisualBasicSyntaxGenerator (1)
Grammar\GrammarGenerator.vb (1)
161_majorRules = ImmutableArray.Create(