Binder\Binder_Expressions.cs (22)
176ImmutableArray.Create(AdjustBadExpressionChild(BindToTypeForErrorRecovery(childNode))),
244ImmutableArray.Create(AdjustBadExpressionChild(BindToTypeForErrorRecovery(expr))),
896node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(BindToTypeForErrorRecovery(BindValue(node.Expression, BindingDiagnosticBag.Discarded, BindValueKind.RefersToLocation))),
1048ImmutableArray.Create(BindValue(arguments[0].Expression, diagnostics, BindValueKind.RValue)) :
1084ImmutableArray.Create<BoundExpression>(boundArgument), CreateErrorType("void"));
1744symbols: ImmutableArray.Create(symbol),
1745childBoundNodes: ImmutableArray.Create(BindToTypeForErrorRecovery(expression)),
4328ImmutableArray.Create(boundExpression.ExpressionSymbol),
4329ImmutableArray.Create(boundExpression));
4717typeArguments: ImmutableArray.Create(elementTypeWithAnnotations),
5648return new BoundBadExpression(node, LookupResultKind.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type);
5658argument.Syntax, default, WellKnownMemberNames.DelegateInvokeName, ImmutableArray.Create(sourceDelegate.DelegateInvokeMethod),
5792return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated };
6524ImmutableArray.Create(boundElementInitializer),
6752ImmutableArray.Create((BoundExpression)addElementPlaceholder),
8082return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(AdjustBadExpressionChild(boundLeft)), CreateErrorType(rightName), hasErrors: true);
8120return new BoundBadExpression(node, lookupResult.Kind, symbols.AsImmutable(), ImmutableArray.Create(AdjustBadExpressionChild(boundLeft)), CreateErrorType(rightName), hasErrors: true);
8571(object)symbolOpt == null ? ImmutableArray<Symbol>.Empty : ImmutableArray.Create(symbolOpt),
8572boundLeft == null ? ImmutableArray<BoundExpression>.Empty : ImmutableArray.Create(AdjustBadExpressionChild(BindToTypeForErrorRecovery(boundLeft))),
10530Construct(ImmutableArray.Create(elementField.TypeWithAnnotations));
10706var argumentPlaceholders = ImmutableArray.Create(new BoundImplicitIndexerValuePlaceholder(convertedArguments[0].Syntax, int32) { WasCompilerGenerated = true });
11745methods = ImmutableArray.Create(method);
Binder\Binder_Query.cs (11)
303ImmutableArray.Create(state.fromExpression), state.fromExpression.Type);
741yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType());
747yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type);
757var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x), let.Expression, bodyFactory, diagnostics.AccumulatesDependencies);
808field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true);
833return MakeQueryUnboundLambda(qvm, ImmutableArray.Create(parameter), expression, withDependencies);
849return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, ImmutableArray.Create(parameter), (LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) =>
885return MakeQueryInvocation(node, receiver, methodName, default(SeparatedSyntaxList<TypeSyntax>), default(ImmutableArray<TypeWithAnnotations>), ImmutableArray.Create(arg), diagnostics
911return MakeQueryInvocation(node, receiver, methodName, new SeparatedSyntaxList<TypeSyntax>(new SyntaxNodeOrTokenList(typeArgSyntax, 0)), ImmutableArray.Create(typeArg), ImmutableArray<BoundExpression>.Empty, diagnostics
964receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
986receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (9)
358return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType);
389return new BoundBadExpression(node.Syntax, 0, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType);
876ImmutableArray.Create<TypeSymbol>(underlyingDelegateType),
921ImmutableArray.Create(param),
922ImmutableArray.Create<BoundExpression>(_bound.AssignmentExpression(parameterReference, parameter)),
926_bound.ArrayOrEmpty(ParameterExpressionType, ImmutableArray.Create<BoundExpression>(parameterReference))));
1143return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
1150return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
1182return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (10)
516ImmutableArray.Create(temp.LocalSymbol),
562var typeArgs = ImmutableArray.Create(elementType);
718var inlineArrayType = _factory.ModuleBuilderOpt.EnsureInlineArrayTypeExists(syntax, _factory, arrayLength, _diagnostics).Construct(ImmutableArray.Create(elementType));
906ImmutableArray.Create<BoundExpression>(
939ImmutableArray.Create(GetKnownLengthExpression(elements, numberIncludingLastSpread, localsBuilder)),
1214var typeArguments = ImmutableArray.Create(elementType);
1263rewrittenReceiver = _factory.New(constructor, ImmutableArray.Create<BoundExpression>(knownLengthTemp));
1268rewrittenReceiver = _factory.New(constructor, ImmutableArray.Create(knownLengthExpression));
1566var iterationVariables = ImmutableArray.Create(iterationVariable);
1638ImmutableArray.Create(statement),
Lowering\LocalRewriter\LocalRewriter_Event.cs (7)
54var rewrittenArguments = ImmutableArray.Create<BoundExpression>(rewrittenArgument);
124rewrittenArguments: ImmutableArray.Create<BoundExpression>(removeDelegate));
128clearCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(removeDelegate), ErrorTypeSymbol.UnknownResultType);
181: ImmutableArray.Create<LocalSymbol>(boundTemp.LocalSymbol);
265getOrCreateCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(fieldAccess), ErrorTypeSymbol.UnknownResultType);
287return new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(getOrCreateCall), ErrorTypeSymbol.UnknownResultType);
345return new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(node.Event),
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (4)
80locals: ImmutableArray.Create(boundTemp.LocalSymbol),
117exitCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType);
212enterCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType);
221ImmutableArray.Create(boundLockTemp.LocalSymbol),
Lowering\LocalRewriter\LocalRewriter.cs (6)
178return new BoundBadStatement(statement.Syntax, ImmutableArray.Create<BoundNode>(statement), hasErrors: true);
588return BadExpression(node.Syntax, node.Type, ImmutableArray.Create(node));
593return BadExpression(syntax, resultType, ImmutableArray.Create(child));
730return block.Update(locals, block.LocalFunctions, block.HasUnsafeModifier, block.Instrumentation, ImmutableArray.Create(statement));
742ImmutableArray.Create(statement));
856.Construct(ImmutableArray.Create(elementType)),
Lowering\SyntheticBoundNodeFactory.cs (9)
865return Call(receiver, method, ImmutableArray.Create(arg0), useStrictArgumentRefKinds);
879=> Call(receiver, WellKnownMethod(method), ImmutableArray.Create(arg0));
1026return MakeSequence(ImmutableArray.Create<LocalSymbol>(temp), parts);
1094=> SwitchSection(ImmutableArray.Create(value), statements);
1557arrayEmpty = arrayEmpty.Construct(ImmutableArray.Create(elementType));
1569ImmutableArray.Create<BoundExpression>(Literal(elements.Length)),
1578ImmutableArray.Create<BoundExpression>(length),
1614return new BoundCatchBlock(Syntax, ImmutableArray.Create(local), source, source.Type, exceptionFilterPrologueOpt: null, exceptionFilterOpt: null, body: block, isSynthesizedAsyncCatchAll: false);
1864sideEffects: ImmutableArray.Create<BoundExpression>(nonNullValue),
Operations\CSharpOperationFactory.cs (7)
409return ImmutableArray.Create(CreateVariableDeclaratorInternal((BoundLocalDeclaration)declaration, (declarationSyntax as VariableDeclarationSyntax)?.Variables[0] ?? declarationSyntax));
1711return new ArrayElementReferenceOperation(instance, ImmutableArray.Create(argument), _semanticModel, syntax, type, isImplicit);
1792ImmutableArray<IFieldSymbol> initializedFields = ImmutableArray.Create<IFieldSymbol>(boundFieldEqualsValue.Field.GetPublicSymbol());
1801ImmutableArray<IPropertySymbol> initializedProperties = ImmutableArray.Create<IPropertySymbol>(boundPropertyEqualsValue.Property.GetPublicSymbol());
2213return new VariableDeclarationGroupOperation(ImmutableArray.Create(multiVariableDeclaration), _semanticModel, varStatement, isImplicit);
2235var variableDeclaration = new VariableDeclarationGroupOperation(ImmutableArray.Create(multiVariableDeclaration), _semanticModel, declarationGroupSyntax, isImplicit);
2950propertySubpatterns: ImmutableArray.Create(result), declaredSymbol: null,
Symbols\AliasSymbol.cs (3)
76return new AliasSymbolFromResolvedTarget(targetSymbol, aliasToken.ValueText, containingSymbol, ImmutableArray.Create(aliasToken.GetLocation()), isExtern);
289: base(syntax.Alias!.Name.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Alias!.Name.Identifier.GetLocation()), isExtern: false)
297: base(syntax.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Identifier.GetLocation()), isExtern: true)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldHaveCorrectSuffix.cs (9)
75(WellKnownTypeNames.SystemAttribute, ImmutableArray.Create("Attribute")),
76(WellKnownTypeNames.SystemEventArgs, ImmutableArray.Create("EventArgs")),
77(WellKnownTypeNames.SystemException, ImmutableArray.Create("Exception")),
82(WellKnownTypeNames.SystemDataDataSet, ImmutableArray.Create("DataSet")),
84(WellKnownTypeNames.SystemIOStream, ImmutableArray.Create("Stream")),
95(WellKnownTypeNames.SystemSecurityIPermission, ImmutableArray.Create("Permission")),
96(WellKnownTypeNames.SystemSecurityPolicyIMembershipCondition, ImmutableArray.Create("Condition"))
153? namedTypeSymbol.BaseType != null ? ImmutableArray.Create(namedTypeSymbol.BaseType) : ImmutableArray<INamedTypeSymbol>.Empty
212suffixes = ImmutableArray.Create(suffix);