289 references to Create
ILLink.RoslynAnalyzer (2)
InteractiveHost.UnitTests (1)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers (3)
Microsoft.AspNetCore.App.Analyzers.Test (2)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.Build (1)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (40)
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 });
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 });
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.Compiler.Test.Resources (3)
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)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (25)
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)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
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);
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
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)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Features.UnitTests (2)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Test.Utilities (6)
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);
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);
Microsoft.CodeAnalysis.VisualBasic (20)
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\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)))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
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)
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)
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)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.DotNet.SignTool (1)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.ML.Data (15)
Microsoft.ML.Transforms (1)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
System.Reflection.Emit (1)
System.Reflection.Metadata (3)
VisualBasicSyntaxGenerator (1)