217 references to Create
ConfigurationSchemaGenerator (1)
GenerateRulesMissingDocumentation (1)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (2)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.App.CodeFixes (1)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.CodeAnalysis (8)
Collections\ArrayBuilderExtensions.cs (3)
85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]));
125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg));
165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
Collections\ImmutableArrayExtensions.cs (2)
185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]));
Microsoft.CodeAnalysis.CodeStyle (10)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
99ImmutableArray.Create(
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]));
125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg));
165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]));
Microsoft.CodeAnalysis.CSharp (14)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenTupleTest.cs (11)
5991var tupleWithSomeNames = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create(null, "Item2", "Charlie"));
6275var tuple2 = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create("123", " ", null));
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"));
18885var int_int_int = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType, intType));
19071var int_object_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType, objectType));
19110var int_object_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType, objectType));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (2)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (38)
SourceGeneration\StateTableTests.cs (38)
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);
52builder.AddEntries(ImmutableArray.Create(o, o, o), EntryState.Added, TimeSpan.Zero, default, EntryState.Added);
87builder.TryModifyEntries(ImmutableArray.Create(20, 21, 22), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified);
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);
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);
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);
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);
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);
774ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3);
827ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3);
861ImmutableArray<int> inputNodeValue = ImmutableArray.Create(1, 2, 3);
919var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, 3))
937var inputNode = new InputNode<int>((_) => ImmutableArray.Create(1, 2, thirdValue)).WithTrackingName("Input");
970ImmutableArray<int> values = ImmutableArray.Create(1, 2, 3);
1007values = ImmutableArray.Create(1, 2, 3);
1119_ => ImmutableArray.Create("1.1", "inserted", "1.2")
1154_ => ImmutableArray.Create("inserted", "1.1", "1.2")
1189_ => ImmutableArray.Create("1.1", "1.2", "inserted")
1224_ => ImmutableArray.Create("2.1", "inserted", "2.2")
1250ImmutableArray<string> values = ImmutableArray.Create("1", "2", "3");
1260_ => ImmutableArray.Create("2.1", "inserted", "2.2")
1274values = ImmutableArray.Create("1", "4", "3");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
99ImmutableArray.Create(
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (4)
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]));
125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg));
165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
Microsoft.CodeAnalysis.Scripting (2)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.UnitTests (29)
Collections\ImmutableArrayExtensionsTests.cs (20)
153Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single(isOdd));
167Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single((x, a) => x % a == 1, 2));
266var a = ImmutableArray.Create<int>(0, 2, 4);
278var a = ImmutableArray.Create<int>(0, 2, 4);
295var a = ImmutableArray.Create<int>(0, 2, 4);
338var a = ImmutableArray.Create<string>("A", "B", "C");
339var b = ImmutableArray.Create<string>("A", "b", "c");
348var r = ImmutableArray.Create<int>(1, 2, 3);
353var s = ImmutableArray.Create<int>(10, 20, 30);
380AssertEx.Equal(new[] { 10, 20, 30 }, ImmutableArray.Create(1, 2, 3).SelectAsArray(i => 10 * i));
412var triple1 = ImmutableArray.Create(1, 2, 3);
413var triple2 = ImmutableArray.Create(10, 11, 12);
414var triple3 = ImmutableArray.Create(11, 13, 15);
444var triple1 = ImmutableArray.Create(1, 2, 3);
445var triple2 = ImmutableArray.Create(10, 11, 12);
446var triple3 = ImmutableArray.Create(13, 16, 19);
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)));
InternalUtilities\OneOrManyTests.cs (5)
65Verify(OneOrMany.Create(ImmutableArray.Create(1, 2, 3)).Add(4), 1, 2, 3, 4);
68Verify(new OneOrMany<int>(ImmutableArray.Create(1, 2, 3)).Add(4), 1, 2, 3, 4);
233Assert.False(OneOrMany.Create(1, 2).SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3))));
252Assert.False(new[] { 1, 2 }.SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3))));
261Assert.False(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany.Create(ImmutableArray.Create(1, 2, 3))));
Microsoft.CodeAnalysis.VisualBasic (12)
Binding\Binder_Query.vb (4)
1137boundCallOrBadExpression = BadExpression(variable, ImmutableArray.Create(Of BoundExpression)(source, manySelectorLambda, joinSelectorLambda),
1486lambdaBinders = ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder, joinSelectorBinder)
1729ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder, intoBinder),
1802lambdaBinders = ImmutableArray.Create(Of Binder)(keysLambdaBinder, itemsLambdaBinder, intoBinder)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (6)
EditAndContinue\SyntaxComparerTests.vb (5)
35ImmutableArray.Create(MakeLiteral(0), MakeLiteral(1), MakeLiteral(2)),
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)))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (6)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]));
125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg));
165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
85return ImmutableArray.Create(map(items[0]), map(items[1]), map(items[2]));
125return ImmutableArray.Create(map(items[0], arg), map(items[1], arg), map(items[2], arg));
165return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
185return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg), map(items[2], 2, arg));
500return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]), map(self[2], other[2]));
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Metrics (1)
Microsoft.Interop.ComInterfaceGenerator (3)
Microsoft.Interop.LibraryImportGenerator (2)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (1)