753 references to Create
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
ILLink.RoslynAnalyzer (1)
CompilationExtensions.cs (1)
145 case 2: return ImmutableArray.Create (span[0], span[1]);
Microsoft.Analyzers.Extra (1)
CoalesceAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.CoalesceAssignment, DiagDescriptors.Coalesce);
Microsoft.AspNetCore.App.Analyzers (1)
Mvc\MvcAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
RequestDelegateGeneratorSuppressor.cs (1)
73public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray.Create(SuppressRUCDiagnostic, SuppressRDCDiagnostic);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixProvider.cs (1)
16public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(
Microsoft.Build (1)
Globbing\CompositeGlob.cs (1)
49: this(ImmutableArray.Create(glob1, glob2))
Microsoft.CodeAnalysis (15)
Collections\ArrayBuilderExtensions.cs (3)
82return ImmutableArray.Create(map(items[0]), map(items[1])); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg));
Collections\ImmutableArrayExtensions.cs (2)
182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]));
Collections\TemporaryArray`1.cs (1)
3112 => ImmutableArray.Create(_item0, _item1),
Collections\UnionCollection.cs (1)
45return new UnionCollection<T>(ImmutableArray.Create(coll1, coll2));
Diagnostic\DiagnosticInfo.cs (1)
37private static readonly ImmutableArray<string> s_compilerNonErrorCustomTags = ImmutableArray.Create(WellKnownDiagnosticTags.Compiler, WellKnownDiagnosticTags.Telemetry);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
1014return ImmutableArray.Create<CompilationEvent>(compilationStartedEvent, compilationUnitCompletedEvent);
InternalUtilities\OneOrMany.cs (1)
272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
Operations\ControlFlowGraphBuilder.cs (3)
3297return MakeInvalidOperation(syntax, type, ImmutableArray.Create<IOperation>(child1, child2)); 4371ImmutableArray.Create<IArgumentOperation>( 5856initializer = new InvalidOperation(ImmutableArray.Create(initializer, operationInitializer),
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));
Microsoft.CodeAnalysis.CodeStyle (11)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
649var additionalLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
35var additionalUnnecessaryLocations = ImmutableArray.Create( 47var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
82return ImmutableArray.Create(map(items[0]), map(items[1])); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]));
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
3112 => ImmutableArray.Create(_item0, _item1),
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
132return (ImmutableArray.Create<ISymbol>(disposeImplMethod, disposeInterfaceMethod), finalizer);
Microsoft.CodeAnalysis.CSharp (104)
Binder\Binder_Expressions.cs (1)
10112argumentPlaceholders = ImmutableArray.Create(startArgumentPlaceholder, lengthArgumentPlaceholder);
Binder\Binder_Query.cs (9)
263result = MakeQueryInvocation(state.selectOrGroup, e, "GroupBy", ImmutableArray.Create(lambdaLeft, lambdaRight), d 424var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), select.Expression, diagnostics.AccumulatesDependencies); 452var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, g), select.Expression, diagnostics.AccumulatesDependencies); 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); 807ImmutableArray.Create( 815return MakeConstruction(node, anonymousType, ImmutableArray.Create(field1Value, field2Value), diagnostics);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1228return Conversion.MakeConditionalExpression(ImmutableArray.Create(trueConversion, falseConversion));
BoundTree\Constructors.cs (1)
180return Synthesized(syntax, receiverOpt, initialBindingReceiverIsSubjectToCloning: initialBindingReceiverIsSubjectToCloning, method, ImmutableArray.Create(arg0, arg1));
BoundTree\Expression.cs (3)
44protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Left, this.Right); 96protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Expression, this.Index); 180protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Receiver, Argument);
BoundTree\Statement.cs (1)
30protected override ImmutableArray<BoundNode?> Children => ImmutableArray.Create<BoundNode?>(this.Declarations, this.Body);
Compiler\MethodBodySynthesizer.cs (3)
402arguments: ImmutableArray.Create<BoundExpression>(boundBackingField, boundParameter)), 416statements: ImmutableArray.Create<BoundStatement>( 467arguments: ImmutableArray.Create<BoundExpression>(boundTmps[1], boundParameter)),
Compiler\MethodBodySynthesizer.Lowered.cs (2)
83ImmutableArray.Create<LocalSymbol>(hashCode, i), 175ImmutableArray.Create<LocalSymbol>(hashCode, i),
Compiler\MethodCompiler.cs (2)
1864body = new BoundBlock(constructor.Syntax, constructor.Locals, ImmutableArray.Create<BoundStatement>(constructor.Initializer, body)); 1959statements = ImmutableArray.Create(constructorInitializer, body);
Emitter\NoPia\EmbeddedType.cs (1)
280ImmutableArray.Create(new TypedConstant(stringType, TypedConstantKind.Primitive, guidString),
Emitter\NoPia\EmbeddedTypesManager.cs (1)
139ImmutableArray.Create<TypedConstant>(constructorArguments[0], constructorArguments[0]),
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
499ImmutableArray.Create<LocalSymbol>(
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
653return (secondOpt == null) ? ImmutableArray.Create(first) : ImmutableArray.Create(first, secondOpt);
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (1)
354ImmutableArray.Create(instSymbol, versionSymbol),
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
198F.CloseMethod(F.Block(ImmutableArray.Create(F.BaseInitialization(), F.Return())));
Lowering\Instrumentation\DebugInfoInjector.cs (1)
299ImmutableArray.Create<BoundStatement>(foreachKeywordSequencePoint,
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (4)
445return ImmutableArray.Create(_factory.Sequence(new[] { value }, refAssignmentSourceIndex), index); 479return ImmutableArray.Create(toString, index); 482return ImmutableArray.Create(_factory.Convert(parameter.Type, value), index); 539ImmutableArray.Create<BoundStatement>(logCallStatement, rewrittenFilterPrologue) :
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
114ImmutableArray.Create(cachedState, cachedThis),
Lowering\LocalRewriter\LocalRewriter.cs (2)
588return BadExpression(syntax, resultType, ImmutableArray.Create(child1, child2)); 850ImmutableArray.Create(
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (8)
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), 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),
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
808extraRefInitialization is object ? ImmutableArray.Create<BoundExpression>(extraRefInitialization, assignmentToTemp) : ImmutableArray.Create<BoundExpression>(assignmentToTemp),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
576Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType)); 605inlineArrayAsSpan = inlineArrayAsSpan.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType));
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
137marshalArguments = ImmutableArray.Create<BoundExpression>(removeDelegate, rewrittenArgument); 334ImmutableArray.Create(rewrittenReceiver, rewrittenArgument), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (9)
270statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, tryFinally)); 282statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, whileLoop)); 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)); 953statements: ImmutableArray.Create<BoundStatement>(arrayVarDecl, positionVarDecl)); 989outerLocals: ImmutableArray.Create<LocalSymbol>(arrayVar, positionVar),
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (3)
81statements: ImmutableArray.Create(expressionStatement, tryFinally)); 170ImmutableArray.Create(boundLockTemp.LocalSymbol, boundLockTakenTemp.LocalSymbol), 176BoundBlock.SynthesizedNoLocals(lockSyntax, ImmutableArray.Create<BoundStatement>(
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (1)
129var alternative = _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, ImmutableArray.Create(tmpAssignment, transformedLhsAssignment), tmp);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
428rewrittenAccess = getSubArrayCall.Update(ImmutableArray.Create(getSubArrayCall.Arguments[0], rangeTemp));
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
175return F.New(constructionMethod, ImmutableArray.Create(left, right)); 205ImmutableArray.Create<BoundExpression>(F.Literal(0), F.Literal(fromEnd)));
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
133return new InterpolationHandlerResult(ImmutableArray.Create(_factory.ExpressionStatement(handlerConstructionAssignment), resultIf), builderTemp, appendShouldProceedLocal.LocalSymbol, this); 286? ImmutableArray.Create(HandlerTemp.LocalSymbol, _outTemp)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
516ImmutableArray<BoundExpression> assignments = ImmutableArray.Create<BoundExpression>(
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
196statements: ImmutableArray.Create<BoundStatement>(expressionStatement, tryFinally));
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
172var loweredArguments = ImmutableArray.Create<BoundExpression>(loweredLeft, loweredRight);
Lowering\SpillSequenceSpiller.cs (2)
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\SyntheticBoundNodeFactory.cs (2)
495return new BoundStatementList(Syntax, ImmutableArray.Create(first, second)) { WasCompilerGenerated = true }; 836return Call(receiver, method, ImmutableArray.Create(arg0, arg1), useStrictArgumentRefKinds);
Symbols\AbstractTypeMap.cs (1)
206interfaces = ImmutableArray.Create<NamedTypeSymbol>(SubstituteNamedType(interfaces[0]), SubstituteNamedType(interfaces[1]));
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\Compilation_WellKnownMembers.cs (1)
817var namedArguments = ImmutableArray.Create(
Symbols\MethodSymbol.cs (1)
1280ImmutableArray.Create(
Symbols\NonMissingModuleSymbol.cs (1)
100var involvedAssemblies = ImmutableArray.Create<Symbol>(ownerAssembly, dependentAssembly);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
219InitializeParameters(ImmutableArray.Create<ParameterSymbol>(
Symbols\Source\SourceFixedFieldSymbol.cs (2)
51ImmutableArray.Create<TypedConstant>(item1, item2))); 220return ImmutableArray.Create<Symbol>(_constructor, _internalField);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1692ImmutableArray.Create(
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
402return OneOrMany.Create(ImmutableArray.Create(AttributeDeclarationSyntaxList, this.SourcePartialImplementation.AttributeDeclarationSyntaxList));
Symbols\SymbolDistinguisher.cs (1)
137ImmutableInterlocked.InterlockedInitialize(ref _lazyDescriptions, ImmutableArray.Create(description0, description1));
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
70Parameters: ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
20_parameters = ImmutableArray.Create<ParameterSymbol>(
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (1)
46_constructors = ImmutableArray.Create<MethodSymbol>(
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (1)
50_constructors = ImmutableArray.Create<MethodSymbol>(
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
403statements: ImmutableArray.Create<BoundStatement>( 620ImmutableArray.Create<BoundStatement>(submissionAssignment, returnStatement))
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 (1)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement")));
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
15this.SetTypeParameters(ImmutableArray.Create<TypeParameterSymbol>(new SynthesizedSimpleMethodTypeParameterSymbol(this, 0, "TBuffer"), new SynthesizedSimpleMethodTypeParameterSymbol(this, 1, "TElement")));
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
44_parameters = ImmutableArray.Create<ParameterSymbol>(new SynthesizedOperatorParameterSymbol(this, leftType, 0, "left"),
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
60var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
85var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
133var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
148var additionalLocations = ImmutableArray.Create(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
15940return ImmutableArray.Create(Hidden01, Hidden02); 16033return ImmutableArray.Create(Error01, Error02);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (25)
Classification\SemanticClassifierTests_TestMarkup.cs (1)
119var spans = ImmutableArray.Create(
CodeActions\AddUsing\AddUsingNuGetTests.cs (1)
229.Returns(ImmutableArray.Create("1.0", "2.0"));
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (2)
2042MemberNames = ImmutableArray.Create("a", "b"), 2087MemberNames = ImmutableArray.Create("c", "b"),
CodeActions\GenerateType\GenerateTypeTests.cs (1)
5625expectedContainers: ImmutableArray.Create("Namespace1", "Namespace2"),
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (14)
800newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 842newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 878newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 921newFileFolderContainers: ImmutableArray.Create("outer", "inner"), 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 (6)
347var selectedMembers = ImmutableArray.Create("TestMethodInt", "TestMethodBool"); 984var selectedMembers = ImmutableArray.Create("TestProperty", "_testProperty"); 1153var selectedMembers = ImmutableArray.Create("TestMethod", "TestGeneric"); 2644var selectedMembers = ImmutableArray.Create("IsValidWorkflowType", "validWorkflowTypes"); 2921var selectedMembers = ImmutableArray.Create("Goo", "Foo"); 3002var selectedMembers = ImmutableArray.Create("Goo", "Foo");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (55)
CodeGen\CodeGenTupleTest.cs (55)
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")); 6009var tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")); 6279var tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")); 6296var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))); 6367var tupleWithoutNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create<string>(null, null)); 6391ImmutableArray.Create<string>(null, null), 6392ImmutableArray.Create(loc1, loc2)); 6431var tupleWithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType), ImmutableArray.Create("Alice", "Bob")); 6446var tupleWithNames = comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, intType), ImmutableArray.Create("Item2", "Item1")); 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")); 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)); 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")); 13701ImmutableArray.Create("a", "b")))) 13757ImmutableArray.Create("Item1", "Item2")))) 13818ImmutableArray.Create("a", "b")))) 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)); 18886var string_string = comp.CreateTupleTypeSymbol(ImmutableArray.Create(stringType, stringType)); 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)); 19108var int_string1 = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, stringType)); 19109var int_object = tupleComp1.CreateTupleTypeSymbol(ImmutableArray.Create(intType, objectType));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (36)
Emit\EditAndContinue\AssemblyReferencesTests.cs (1)
337ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueClosureTests.cs (6)
2731ImmutableArray.Create( 2742ImmutableArray.Create( 2875ImmutableArray.Create( 2981ImmutableArray.Create( 3100ImmutableArray.Create( 3195ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinuePdbTests.cs (1)
150ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (6)
7438ImmutableArray.Create( 7461ImmutableArray.Create( 8187ImmutableArray.Create( 8210ImmutableArray.Create( 10778ImmutableArray.Create( 10963ImmutableArray.Create(
Emit\EditAndContinue\EditAndContinueTests.cs (16)
3009ImmutableArray.Create( 3123ImmutableArray.Create( 3687ImmutableArray.Create( 3847ImmutableArray.Create( 3976? ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Insert, null, r1), SemanticEdit.Create(SemanticEditKind.Insert, null, r1.GetMethod)) 6226ImmutableArray.Create( 6628ImmutableArray.Create( 6730ImmutableArray.Create( 6791ImmutableArray.Create( 6905ImmutableArray.Create( 6919ImmutableArray.Create( 9381ImmutableArray.Create( 12575ImmutableArray.Create( 12584ImmutableArray.Create( 18696ImmutableArray.Create( 18790ImmutableArray.Create(
PDB\PDBUsingTests.cs (6)
793new CSharpCompilationReference(dummyCompilation, ImmutableArray.Create("A", "A")), 1030var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2", "A3")); 1123var refA1 = comp.EmitToImageReference(aliases: ImmutableArray.Create("A2", "A3")); 1415new CSharpCompilationReference(dummyCompilation1, ImmutableArray.Create("global", "A")), 1416new CSharpCompilationReference(dummyCompilation2, ImmutableArray.Create("B", "global")) 1718new CSharpCompilationReference(compilation1, ImmutableArray.Create("A", "B"))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Diagnostics\DiagnosticAnalyzerTests.cs (6)
492get { return ImmutableArray.Create(desc1, desc2); } 2306public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning, Summary); 3349var compilationWithAnalyzers = compilation.WithAnalyzers(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2)); 3686var allAnalyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2); 3923var additionalFiles = ImmutableArray.Create(additionalFile1, additionalFile2); 3929var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2);
Diagnostics\DiagnosticSuppressorTests.cs (2)
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 (1)
952public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor, DescriptorForBlockEnd);
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));
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
60var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
85var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
133var additionalLocations = ImmutableArray.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
148var additionalLocations = ImmutableArray.Create(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (13)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (2)
61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor0168, Descriptor0219); 184=> ImmutableArray.Create<DiagnosticAnalyzer>(new UserDiagnosticAnalyzer(), new CompilationEndDiagnosticAnalyzer());
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Decsciptor1, Decsciptor2);
EditAndContinue\SyntaxComparerTests.cs (1)
46ImmutableArray.Create(MakeLiteral(1), MakeLiteral(3)));
Wrapping\SortingTests.cs (9)
19var items = ImmutableArray.Create("Action1", "Action2"); 31var items = ImmutableArray.Create("Action1", "Action2"); 43var items = ImmutableArray.Create("Action1", "Action2"); 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 (49)
Semantics\InterceptorsTests.cs (1)
5418var pathMap = ImmutableArray.Create(
SourceGeneration\StateTableTests.cs (48)
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); 85builder.TryModifyEntries(ImmutableArray.Create(10, 11), EqualityComparer<int>.Default, TimeSpan.Zero, default, EntryState.Modified); 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); 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)); 312nodeBuilder.AddEntries(ImmutableArray.Create(5, 6), EntryState.Modified, TimeSpan.Zero, emptyInputSteps, EntryState.Modified); 486inputValue = ImmutableArray.Create(1, 2); 515Assert.Equal(ImmutableArray.Create(1, 2), (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) }); 1028ImmutableArray<ImmutableArray<string>> values = ImmutableArray.Create(ImmutableArray.Create("class1"), ImmutableArray.Create("class2")); 1040values = ImmutableArray.Create(ImmutableArray.Create("class3"), ImmutableArray.Create("class2")); 1048values = ImmutableArray.Create(ImmutableArray.Create("class3"), ImmutableArray.Create("class4")); 1069ImmutableArray<ImmutableArray<string>> values = ImmutableArray.Create(ImmutableArray.Create("class1", "class1.1"), ImmutableArray.Create("class2", "class2.1")); 1081values = ImmutableArray.Create(ImmutableArray.Create("class3", "class3.1"), ImmutableArray.Create("class2", "class2.1")); 1089values = ImmutableArray.Create(ImmutableArray.Create("class3", "class3.1"), ImmutableArray.Create("class4", "class4.1")); 1098values = ImmutableArray.Create(ImmutableArray.Create("class1", "class1.1")); 1110ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1117"1" => ImmutableArray.Create("1.1", "1.2"), 1118"2" => ImmutableArray.Create("2.1", "2.2"), 1133values = ImmutableArray.Create("3", "2"); 1145ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1152"1" => ImmutableArray.Create("1.1", "1.2"), 1153"2" => ImmutableArray.Create("2.1", "2.2"), 1168values = ImmutableArray.Create("3", "2"); 1180ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1187"1" => ImmutableArray.Create("1.1", "1.2"), 1188"2" => ImmutableArray.Create("2.1", "2.2"), 1203values = ImmutableArray.Create("3", "2"); 1215ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1222"1" => ImmutableArray.Create("1.1", "1.2"), 1223"2" => ImmutableArray.Create("2.1", "2.2"), 1238values = ImmutableArray.Create("1", "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"), 1286ImmutableArray<string> values = ImmutableArray.Create("1", "2"); 1293"1" => ImmutableArray.Create("1.1", "1.2"), 1294"2" => ImmutableArray.Create("2.1", "2.2"), 1309values = ImmutableArray.Create("3", "2");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (81)
Compilation\CompilationAPITests.cs (31)
617var mtref = refcomp.EmitToImageReference(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)")); 685var mtref = refcomp.EmitToImageReference(aliases: ImmutableArray.Create("a", "Alias(*#$@^%*&)")); 2511ImmutableArray.Create("m1", "m2"))); 2520ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2522ImmutableArray.Create("m1", "m2"), 2532ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2534ImmutableArray.Create("m1", "m2"), 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))); 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"); 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));
Compilation\CSharpCompilationOptionsTests.cs (1)
113TestProperty((old, value) => old.WithUsings(value), opt => opt.Usings, ImmutableArray.Create("A", "B"));
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 (2)
2292CreateCompilation(@"[assembly: System.Reflection.AssemblyVersion(""2.0.0.1"")] public class C {}", assemblyName: "C").ToMetadataReference(aliases: ImmutableArray.Create("X", "Y")), 2509aRef.WithProperties(MetadataReferenceProperties.Assembly.WithAliases(ImmutableArray.Create("Y", "Y")).WithRecursiveAliases(true)),
Symbols\AnonymousTypesSymbolTests.cs (1)
1926ImmutableArray.Create("m1", "m2"));
Symbols\CompilationCreationTests.cs (1)
2821options: TestOptions.ReleaseDll.WithUsings(ImmutableArray.Create("System.Console", "System")));
Symbols\FunctionPointerTypeSymbolTests.cs (8)
1570ImmutableArray.Create(c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.NotAnnotated), c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated)), 1571ImmutableArray.Create(RefKind.None, RefKind.None)); 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)!); 1990var funcPtrThiscallObject = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, objectMod)); 1991var funcPtrObjectThiscall = createTypeSymbol(customModifiers: ImmutableArray.Create(objectMod, thiscallMod)); 1994var funcPtrThiscallStdcall = createTypeSymbol(customModifiers: ImmutableArray.Create(thiscallMod, stdcallMod)); 1995var funcPtrStdcallThiscall = createTypeSymbol(customModifiers: ImmutableArray.Create(stdcallMod, thiscallMod));
Symbols\Source\NullablePublicAPITests.cs (1)
1155public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor1, s_descriptor2);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Parsing\CSharpParseOptionsTests.cs (3)
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.EditorFeatures.Test.Utilities (1)
BracePairs\AbstractBracePairsTests.cs (1)
56if (sortedSpans.SequenceEqual(ImmutableArray.Create(bracePair.Start, bracePair.End)))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
CodeFixes\CodeFixServiceTests.cs (3)
77ImmutableArray.Create<DiagnosticAnalyzer>( 131var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(analyzerWithFix, analyzerWithoutFix); 688var reportedDiagnosticIds = ImmutableArray.Create(id1, id2);
Completion\FileSystemCompletionHelperTests.cs (7)
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"), 191searchPaths: ImmutableArray.Create(@"/A", @"/B"), 193allowableExtensions: ImmutableArray.Create(".abc", ".def"),
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
701var analyzerReference = new AnalyzerImageReference(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1, analyzer2));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (13)
Diagnostics\DiagnosticServiceTests.vb (1)
1015Await TestDiagnosticsReportedOnAllPartialDefinitionsCoreAsync(ImmutableArray.Create(Of DiagnosticAnalyzer)(dummyAnalyzer, analyzer))
IntelliSense\CSharpCompletionCommandHandlerTests.vb (2)
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")))
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (6)
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")
IntelliSense\IntellisenseQuickInfoBuilderTests.vb (4)
27ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public), 119ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public), 120ImmutableArray.Create( 204ImmutableArray.Create(WellKnownTags.Method, WellKnownTags.Public),
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Native.cs (1)
593importRecordGroups = ImmutableArray.Create(
Microsoft.CodeAnalysis.Features (6)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (1)
133var parameters = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
109var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
649var additionalLocations = ImmutableArray.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
35var additionalUnnecessaryLocations = ImmutableArray.Create( 47var additionalUnnecessaryLocations = ImmutableArray.Create(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
132return (ImmutableArray.Create<ISymbol>(disposeImplMethod, disposeInterfaceMethod), finalizer);
Microsoft.CodeAnalysis.Features.UnitTests (7)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
1953_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline", "ChangeCustomAttributes"); 2003_debuggerService.GetCapabilitiesImpl = () => ImmutableArray.Create("Baseline", "ChangeCustomAttributes");
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
573updatedMethodTokens: ImmutableArray.Create(0x06000002, 0x06000004), // F2, F4
EditAndContinue\RemoteEditAndContinueServiceTests.cs (4)
187ilDelta: ImmutableArray.Create<byte>(1, 2), 188metadataDelta: ImmutableArray.Create<byte>(3, 4), 189pdbDelta: ImmutableArray.Create<byte>(5, 6), 263var baseActiveSpans = await sessionProxy.GetBaseActiveStatementSpansAsync(localWorkspace.CurrentSolution, ImmutableArray.Create(documentId, inProcOnlyDocumentId), CancellationToken.None);
Microsoft.CodeAnalysis.InteractiveHost (4)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
83metadataReferencePaths: ImmutableArray.Create(typeof(object).Assembly.Location, typeof(InteractiveScriptGlobals).Assembly.Location),
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
82return ImmutableArray.Create(map(items[0]), map(items[1])); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg));
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Extensions\ProtocolConversions.cs (3)
65{ WellKnownTags.Delegate, ImmutableArray.Create(LSP.CompletionItemKind.Class, LSP.CompletionItemKind.Delegate) }, 69{ WellKnownTags.ExtensionMethod, ImmutableArray.Create(LSP.CompletionItemKind.Method, LSP.CompletionItemKind.ExtensionMethod) }, 76{ WellKnownTags.Namespace, ImmutableArray.Create(LSP.CompletionItemKind.Module, LSP.CompletionItemKind.Namespace) },
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
118=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(
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\WorkspaceProjectDiagnosticsTests.cs (1)
67=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(
Microsoft.CodeAnalysis.Scripting (2)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
45internal static ImmutableArray<string> AssemblyExtensions = ImmutableArray.Create(".dll", ".exe");
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
38s_rootLocations = ImmutableArray.Create(GetLocation(ASM_CACHE.ROOT), GetLocation(ASM_CACHE.ROOT_EX));
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
GlobalAssemblyCacheTests.cs (1)
33names = gac.GetAssemblyIdentities(new AssemblyName("mscorlib"), ImmutableArray.Create(ProcessorArchitecture.MSIL, ProcessorArchitecture.X86)).ToArray();
Microsoft.CodeAnalysis.Scripting.UnitTests (1)
RuntimeMetadataReferenceResolverTests.cs (1)
32packageResolver: new PackageResolver(ImmutableDictionary<string, ImmutableArray<string>>.Empty.Add("nuget:N/1.0", ImmutableArray.Create(assembly1.Path, assembly2.Path))),
Microsoft.CodeAnalysis.Test.Utilities (19)
Diagnostics\CommonDiagnosticAnalyzers.cs (5)
60return ImmutableArray.Create(Descriptor1, Descriptor2); 518=> ImmutableArray.Create(Descriptor1, Descriptor2); 555return ImmutableArray.Create(EnabledRule, DisabledRule); 602return ImmutableArray.Create(CodeBlockTopLevelRule, CodeBlockPerCompilationRule); 2366=> ImmutableArray.Create(_descriptor1, _descriptor2);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
39get { return ImmutableArray.Create(LocalCouldHaveMoreSpecificTypeDescriptor, FieldCouldHaveMoreSpecificTypeDescriptor); }
Diagnostics\OperationTestAnalyzer.cs (13)
707get { return ImmutableArray.Create(DoNotUseFieldInitializerDescriptor, DoNotUsePropertyInitializerDescriptor); } 834get { return ImmutableArray.Create(TooManyLocalVarDeclarationsDescriptor, LocalVarInitializedDeclarationDescriptor); } 891get { return ImmutableArray.Create(HasDefaultCaseDescriptor, MultipleCaseClausesDescriptor); } 946public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ImplicitInstanceDescriptor, ExplicitInstanceDescriptor); 1093public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LongParamsDescriptor, InvalidConstructorDescriptor); 1254ImmutableArray.Create(AddressOfDescriptor, InvalidAddressOfReferenceDescriptor); 1368return ImmutableArray.Create(StaticMemberDescriptor, 1442public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LabelDescriptor, GotoDescriptor); 1601=> ImmutableArray.Create(BinaryOperatorDescriptor, UnaryOperatorDescriptor); 1686get { return ImmutableArray.Create(NullOperationSyntaxDescriptor, ParamsArrayOperationDescriptor); } 1837get { return ImmutableArray.Create(ConditionalAccessOperationDescriptor, ConditionalAccessInstanceOperationDescriptor); } 1964=> ImmutableArray.Create(UnaryTrueDescriptor, UnaryFalseDescriptor); 2007get { return ImmutableArray.Create(AssignmentOperationDescriptor, AssignmentSyntaxDescriptor); }
Microsoft.CodeAnalysis.UnitTests (34)
Collections\ImmutableArrayExtensionsTests.cs (12)
146Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2).Single()); 152Assert.Equal(1, ImmutableArray.Create<int>(1, 2).Single(isOdd)); 162Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 1).Single((x, a) => x == a, 1)); 166Assert.Equal(1, ImmutableArray.Create<int>(1, 2).Single((x, a) => x % a == 1, 2)); 340var c = ImmutableArray.Create<string>("A", "b"); 379AssertEx.Equal(new[] { 10, 20 }, ImmutableArray.Create(1, 2).SelectAsArray(i => 10 * i)); 407var pair1 = ImmutableArray.Create(1, 2); 408var pair2 = ImmutableArray.Create(10, 11); 409var pair3 = ImmutableArray.Create(11, 13); 439var pair1 = ImmutableArray.Create(1, 2); 440var pair2 = ImmutableArray.Create(10, 11); 441var pair3 = ImmutableArray.Create(13, 16);
FileSystem\RelativePathResolverTests.cs (1)
171ImmutableArray.Create(dir1.Path, dir2.Path),
InternalUtilities\OneOrManyTests.cs (13)
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)); 111Verify(OneOrMany.Create(ImmutableArray.Create(1, 2)).Select(i => i + 1), 2, 3); 120Verify(OneOrMany.Create(ImmutableArray.Create(1, 2)).Select((i, a) => i + a, 1), 2, 3); 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)); 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)); 256Assert.False(ImmutableArray.Create(1, 2).SequenceEqual(OneOrMany<int>.Empty)); 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\MetadataReferencePropertiesTests.cs (2)
25m = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases: ImmutableArray.Create("\\/[.'\":_)??\t\n*#$@^%*&)", "goo"), embedInteropTypes: true); 62Assert.Equal(a.WithAliases(new[] { "goo", "aaa" }), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("goo", "aaa"), embedInteropTypes: true));
MetadataReferences\MetadataReferenceTests.cs (5)
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); 309var r3 = r.WithAliases(ImmutableArray.Create("b", "c"));
StrongNameProviderTests.cs (1)
61var searchPathsNullBaseSP = ImmutableArray.Create(dir, subdir);
Microsoft.CodeAnalysis.VisualBasic (79)
Binding\Binder_Operators.vb (4)
608ImmutableArray.Create(Of BoundExpression)(left, right), 618ImmutableArray.Create(Of BoundExpression)(left, right), 746PassArguments(node, bitwiseAnalysis, ImmutableArray.Create(Of BoundExpression)(left, right), diagnostics) 757ImmutableArray.Create(Of BoundExpression)(leftPlaceholder, argumentInfo.Arguments(1)),
Binding\Binder_Query.vb (13)
346underlyingExpression = BadExpression(aggregate, ImmutableArray.Create(Of BoundExpression)(source, letSelectorLambda), 404ImmutableArray.Create(Of Binder)(firstSelectSelectorBinder, intoBinder), 541underlyingExpression = BadExpression(aggregate, ImmutableArray.Create(Of BoundExpression)(letOperator, selectSelectorLambda), 562ImmutableArray.Create(Of Binder)(firstSelectSelectorBinder, intoBinder), 685boundCallOrBadExpression = BadExpression(clauseSyntax, ImmutableArray.Create(Of BoundExpression)(source, selectorLambda), 822boundCallOrBadExpression = BadExpression(variable, ImmutableArray.Create(Of BoundExpression)(source, selectorLambda), 1092lambdaBinders = ImmutableArray.Create(Of Binder)(manySelectorBinder, joinSelectorBinder) 1157ImmutableArray.Create(Of BoundExpression)(manySelectorLambda, joinSelectorLambda), 1504lambdaBinders = ImmutableArray.Create(Of Binder)(outerKeyBinder, innerKeyBinder) 1799lambdaBinders = ImmutableArray.Create(Of Binder)(keysLambdaBinder, intoBinder) 2376boundCallOrBadExpression = BadExpression(operatorSyntax, ImmutableArray.Create(Of BoundExpression)(source, filterLambda), 2484boundCallOrBadExpression = BadExpression(partition, ImmutableArray.Create(source, boundCount), 2573boundCallOrBadExpression = BadExpression(ordering, ImmutableArray.Create(Of BoundExpression)(sourceOrPreviousOrdering, keyLambda),
Binding\Binder_XmlLiterals.vb (10)
83ImmutableArray.Create(Of BoundExpression)(target, data), 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)) 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)
Binding\SyntheticBoundTrees\AnonymousTypeSyntheticMethods.vb (2)
224ImmutableArray.Create(localMyFieldBoxed, localOtherFieldBoxed), 296ImmutableArray.Create(Of BoundExpression)(assignLocalMyField, assignLocalOtherField),
Binding\SyntheticBoundTrees\SynthesizedStringSwitchHashMethod.vb (1)
95ImmutableArray.Create(Of LocalSymbol)(hashCode, i),
BoundTree\Expression.vb (2)
27Return ImmutableArray.Create(Of BoundNode)(Me.Left, Me.Right) 195Return ImmutableArray.Create(Of BoundNode)(Me.CapturedGroupOpt, Me.UnderlyingExpression)
BoundTree\Statement.vb (1)
37Return ImmutableArray.Create(Of BoundNode)(Me.CaseStatement, Me.Body)
Emit\NoPia\EmbeddedTypesManager.vb (1)
100ImmutableArray.Create(constructorArguments(0), constructorArguments(0)),
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
202Me.F.CloseMethod(F.Block(ImmutableArray.Create(F.BaseInitialization(), F.Return())))
Lowering\LocalRewriter\LocalRewriter.vb (2)
437Return New BoundStatementList(statement.Syntax, ImmutableArray.Create(prologueOpt, statement)) 449ImmutableArray.Create(Of BoundStatement)(prologueOpt, block))
Lowering\LocalRewriter\LocalRewriter_AddRemoveHandler.vb (3)
137marshalArguments = ImmutableArray.Create(Of BoundExpression)(removeDelegate, rewrittenHandler) 174statements:=ImmutableArray.Create(Of BoundStatement)( 306ImmutableArray.Create(receiver, handler),
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (6)
486ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 525ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 637ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 665ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType) 788ImmutableArray.Create(left, right), Nothing, memberSymbol.ReturnType, suppressObjectClone:=True) 1453ImmutableArray.Create(Of BoundExpression)(leftCallInput, rightCallInput),
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (1)
168result = New BoundSequence(node.Syntax, ImmutableArray.Create(temp), ImmutableArray.Create(assignment, result), Nothing, result.Type)
Lowering\LocalRewriter\LocalRewriter_ForEach.vb (3)
445incrementAssignment = New BoundStatementList(statementSyntax, ImmutableArray.Create(epilogue, incrementAssignment)) 659ImmutableArray.Create(Of BoundStatement)(boundEnumeratorAssignment, 719ImmutableArray.Create(rewrittenBoundLocal, rewrittenCondition),
Lowering\LocalRewriter\LocalRewriter_Label.vb (1)
39statement = New BoundStatementList(node.Syntax, ImmutableArray.Create(statement, trackLineNumber))
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (1)
375ImmutableArray.Create(Of BoundExpression)(value, getTypeExpr),
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.vb (3)
293New BoundStatementList(syntax, ImmutableArray.Create(flagStateAssignTwo, rewrittenInitialization)), 307statementsInTry = ImmutableArray.Create(boundMonitorEnterCall, conditionalValueInit) 328ImmutableArray.Create(flagStateAssignOne, monitorExit))
Lowering\LocalRewriter\LocalRewriter_RedimClause.vb (1)
65ImmutableArray.Create(Of BoundExpression)(arrayValueAccess, valueBeingAssigned),
Lowering\LocalRewriter\LocalRewriter_Return.vb (1)
82Return New BoundStatementList(syntaxNode, ImmutableArray.Create(assignment, jump))
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (2)
119tryStatements = ImmutableArray.Create(Of BoundStatement)(boundMonitorEnterCallStatement, 199parameters = ImmutableArray.Create(Of BoundExpression)(boundLockObject, boundLockTakenLocal)
Lowering\LocalRewriter\LocalRewriter_Using.vb (3)
167Return New BoundStatementList(node.UsingInfo.UsingStatementSyntax, ImmutableArray.Create(Of BoundStatement)(prologue, currentBody)) 244finallyStatements = ImmutableArray.Create(disposePrologue, disposeCall) 261ImmutableArray.Create(boundResourceInitializationAssignment, tryFinally))
Lowering\LocalRewriter\LocalRewriter_XmlLiterals.vb (1)
273ImmutableArray.Create(Of BoundExpression)(
Lowering\SyntheticBoundNodeFactory.vb (1)
348Dim boundNode As New BoundStatementList(Syntax, ImmutableArray.Create(first, second))
Semantics\Operators.vb (1)
3252ImmutableArray.Create(Of BoundExpression)(argument1, argument2)),
Symbols\AnonymousTypes\PublicSymbols\AnonymousDelegate_TypePublicSymbol.vb (2)
55ImmutableArray.Create(Of ParameterSymbol)( 73_members = ImmutableArray.Create(delegateCtor, delegateInvoke)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (2)
69ImmutableArray.Create(Of ParameterSymbol)( 82_members = ImmutableArray.Create(delegateCtor, delegateInvoke)
Symbols\ArrayTypeSymbol.vb (1)
91Return ImmutableArray.Create(iListOfT.Construct(elementType), iReadOnlyListOfT.Construct(elementType))
Symbols\Source\SourceComplexParameterSymbol.vb (1)
84Return OneOrMany.Create(ImmutableArray.Create(attributes, otherAttributes))
Symbols\Source\SourceDelegateMethodSymbol.vb (1)
227InitializeParameters(ImmutableArray.Create(Of ParameterSymbol)(
Symbols\Source\SourceMemberMethodSymbol.vb (1)
143Return OneOrMany.Create(ImmutableArray.Create(AttributeDeclarationSyntaxList, Me.SourcePartialImplementation.AttributeDeclarationSyntaxList))
Symbols\Source\SynthesizedEntryPointSymbol.vb (1)
388ImmutableArray.Create(Of BoundStatement)(submissionAssignment, returnStatement)).MakeCompilerGenerated()
Symbols\Source\SynthesizedEventAccessorSymbol.vb (2)
245statements:=ImmutableArray.Create(Of BoundStatement)(callStatement, returnStatement)).MakeCompilerGenerated() 364ImmutableArray.Create(Of BoundStatement)(
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
77members = ImmutableArray.Create(Of Symbol)(ctor, invoke)
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionConstructorSymbol.vb (1)
19_parameters = ImmutableArray.Create(Of ParameterSymbol)(
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionSymbol.vb (1)
29_members = ImmutableArray.Create(Of Symbol)(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Analyzers\VisualBasic\CodeFixes\AddObsoleteAttribute\VisualBasicAddObsoleteAttributeCodeFixProvider.vb (1)
18ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
26ImmutableArray.Create(BC30387, BC40056)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
11011Return ImmutableArray.Create(Info01, Info02)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (25)
CodeGen\CodeGenTuples.vb (25)
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")) 7003Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")) 7177Dim tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")) 7194Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))) 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")) 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)
Microsoft.CodeAnalysis.VisualBasic.Features (22)
CodeFixes\AddMissingReference\VisualBasicAddMissingReferenceCodeFixProvider.vb (1)
27ImmutableArray.Create(BC30005, BC30652)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
26Return ImmutableArray.Create(BC30070, BC30451)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
31Return ImmutableArray.Create(BC36938, BC36945)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (1)
28Return ImmutableArray.Create(BC40003, BC40004)
Completion\KeywordRecommenders\Declarations\AttributeScopesKeywordRecommender.vb (1)
19ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\CovarianceModifiersKeywordRecommender.vb (1)
16Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\DelegateSubFunctionKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Declarations\ExternalSubFunctionKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\LambdaKeywordRecommender.vb (1)
31Return ImmutableArray.Create(
Completion\KeywordRecommenders\Expressions\TrueFalseKeywordRecommender.vb (1)
23Return ImmutableArray.Create(
Completion\KeywordRecommenders\OnErrorStatements\ErrorKeywordRecommender.vb (1)
21Return ImmutableArray.Create(
Completion\KeywordRecommenders\OnErrorStatements\GoToDestinationsRecommender.vb (1)
19ImmutableArray.Create(New RecommendedKeyword("0"), New RecommendedKeyword("-1"))
Completion\KeywordRecommenders\OnErrorStatements\OnErrorKeywordRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = 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\StrictOptionsRecommender.vb (1)
17Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\PreprocessorDirectives\WarningDirectiveKeywordRecommender.vb (1)
19Return ImmutableArray.Create(
Completion\KeywordRecommenders\Queries\AscendingDescendingKeywordRecommender.vb (1)
18Private Shared ReadOnly s_keywords As ImmutableArray(Of RecommendedKeyword) = ImmutableArray.Create(
Completion\KeywordRecommenders\Statements\ForKeywordRecommender.vb (1)
19Return ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\AddObsoleteAttribute\VisualBasicAddObsoleteAttributeCodeFixProvider.vb (1)
18ImmutableArray.Create(
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
26ImmutableArray.Create(BC30387, BC40056)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\SyntaxComparerTests.vb (1)
36ImmutableArray.Create(MakeLiteral(1), MakeLiteral(3)))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (29)
Compilation\CompilationAPITests.vb (25)
1498Dim tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")) 1552ImmutableArray.Create("m1", "m2")) 1562ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1564ImmutableArray.Create("m1", "m2"), 1575ImmutableArray.Create(DirectCast(Compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1577ImmutableArray.Create("m1", "m2"), 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)) 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") 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)) 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)) 1992typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String))
Compilation\VisualBasicCompilationOptionsTests.vb (1)
94ImmutableArray.Create(GlobalImport.Parse("Goo.Bar"), GlobalImport.Parse("Baz")))
Diagnostics\DiagnosticAnalyzerTests.vb (2)
220Return ImmutableArray.Create(desc1, desc2) 236Return ImmutableArray.Create(desc1, desc2)
Diagnostics\GetDiagnosticsTests.vb (1)
597Return ImmutableArray.Create(Descriptor, DescriptorForBlockEnd)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
18Public Overrides ReadOnly Property SyntaxNodeTypes As ImmutableArray(Of Type) = ImmutableArray.Create(
Microsoft.CodeAnalysis.Workspaces (8)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
82return ImmutableArray.Create(map(items[0]), map(items[1])); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]));
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
3112 => ImmutableArray.Create(_item0, _item1),
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
55var formattingRules = ImmutableArray.Create(
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
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 (7)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
82return ImmutableArray.Create(map(items[0]), map(items[1])); 122return ImmutableArray.Create(map(items[0], arg), map(items[1], arg)); 162return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg));
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (2)
182return ImmutableArray.Create(map(items[0], 0, arg), map(items[1], 1, arg)); 497return ImmutableArray.Create(map(self[0], other[0]), map(self[1], other[1]));
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
3112 => ImmutableArray.Create(_item0, _item1),
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
272=> new OneOrMany<T>(ImmutableArray.Create(one, two));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\OptionsTestHelpers.cs (1)
136ImmutableArray<string> array => array is ["X"] ? ImmutableArray.Create("X", "Y") : ImmutableArray.Create("X"),
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
SolutionTests\SolutionTestHelpers.cs (1)
76var boxedDupItems = (IEnumerable<TValue>)ImmutableArray.Create(item, item);
SolutionTests\SolutionTests.cs (9)
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)); 4421AssertEx.SetEqual(relatedIds1, ImmutableArray.Create(document1.Id, document2.Id)); 4422AssertEx.SetEqual(relatedIds2, ImmutableArray.Create(document1.Id, document2.Id));
WorkspaceTests\WorkspaceReferenceTests.cs (1)
189var forkedProject = project.WithMetadataReferences(ImmutableArray.Create<MetadataReference>(
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
EmitterTests.cs (1)
58ImmutableArray.Create("Foo", "Bar"));
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
116return ImmutableArray.Create(span[0], span[1]);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
116return ImmutableArray.Create(span[0], span[1]);
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
150var useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>(
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (4)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(RuntimeComApisDoNotSupportSourceGeneratedCom, CastsBetweenRuntimeComAndSourceGeneratedComNotSupported); 68methodsOfInterest.Add(createAggregatedObject, ImmutableArray.Create(CreateTypeArgumentTypeLookup(0), CreateArgumentTypeLookup(1))); 84methodsOfInterest.Add(createWrapperOfType, ImmutableArray.Create(firstArgumentTypeLookup, CreateTypeOfArgumentTypeLookup(1))); 100methodsOfInterest.Add(getComInterfaceForObject, ImmutableArray.Create(CreateArgumentTypeLookup(0), CreateTypeOfArgumentTypeLookup(1)));
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.Interop.SourceGeneration (2)
DefaultMarshallingInfoParser.cs (1)
53var useSiteAttributeParsers = ImmutableArray.Create<IUseSiteAttributeParser>(
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
72ImmutableArray.Create(PrivateFieldName.Rule, GeneralName.Rule);
Microsoft.VisualStudio.LanguageServices (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
38s_rootLocations = ImmutableArray.Create(GetLocation(ASM_CACHE.ROOT), GetLocation(ASM_CACHE.ROOT_EX));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
Interactive\Commands\ResetInteractiveTests.cs (3)
95ReferenceSearchPaths = ImmutableArray.Create("rsp1", "rsp2"), 96SourceSearchPaths = ImmutableArray.Create("ssp1", "ssp2"), 98NamespacesToImport = ImmutableArray.Create("System", "ResetInteractiveTestsDocument"),
Roslyn.VisualStudio.Next.UnitTests (14)
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" }) :
Services\ServiceHubServicesTests.cs (10)
619ImmutableArray.Create(("SG.cs", CreateText(contents)), ("SG1.cs", CreateText(contents)))); 628ImmutableArray.Create(("SG.cs", CreateText(contents)), ("SG1.cs", CreateText("Other")))); 637ImmutableArray.Create(("SG1.cs", CreateText(contents)), ("SG.cs", CreateText("Other")))); 646ImmutableArray.Create(("SG1.cs", CreateText("Other")), ("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))));
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
166case 2: return ImmutableArray.Create(span[0], span[1]);
VBCSCompiler.UnitTests (1)
AnalyzerConsistencyCheckerTests.cs (1)
119var analyzerReferences = ImmutableArray.Create(