public CodeForeachStatement(CodeVariableDeclarationStatement declaration, CodeExpression expression, IEnumerable <CodeStatement> statements) { Debug.Assert(declaration.InitExpression == null, "foreach variable declaration cannot have initializer"); Declaration = declaration; Expression = expression; Statements.AddRange(statements); }
/// <include file='doc\CodeIterationStatement.uex' path='docs/doc[@for="CodeIterationStatement.CodeIterationStatement1"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of <see cref='System.CodeDom.CodeIterationStatement'/>. /// </para> /// </devdoc> public CodeIterationStatement(CodeStatement initStatement, CodeExpression testExpression, CodeStatement incrementStatement, params CodeStatement[] statements) { InitStatement = initStatement; TestExpression = testExpression; IncrementStatement = incrementStatement; Statements.AddRange(statements); }
public JSForLoop(JSStatement initializer, JSExpression condition, JSStatement increment, params JSStatement[] body) { _Initializer = initializer; _Condition = condition; _Increment = increment; Statements.AddRange(body); }
public CodeForStatement(CodeStatement initStatement, CodeExpression testExpression, CodeExpression incrementExpression, IEnumerable <CodeStatement> statements) { InitStatement = initStatement; TestExpression = testExpression; IncrementExpression = incrementExpression; Statements.AddRange(statements); }
public CodeIterationStatement(ILInstruction inline, CodeStatement initStatement, CodeExpression testExpression, CodeStatement incrementStatement, params CodeStatement[] statements) : base(inline) { InitStatement = initStatement; TestExpression = testExpression; IncrementStatement = incrementStatement; Statements.AddRange(statements); }
public CodeLambdaExpression(IEnumerable <CodeParameterDeclaration> parameters, IEnumerable <CodeStatement> statements) { Ensure.That(nameof(parameters)).IsNotNull(parameters); Ensure.That(nameof(statements)).IsNotNull(statements); Parameters = new List <CodeParameterDeclaration>(parameters); Statements.AddRange(statements); }
public CodeCatchClause(String localName, CodeTypeReference catchExceptionType, params CodeStatement[] statements) { this.localName = localName; this.catchExceptionType = catchExceptionType; Statements.AddRange(statements); }
public void Add(Block block) { if (block.HasAnnotations) { Statements.Add(block); return; } Statements.AddRange(block.Statements); }
public CodeForeachStatement(CodeVariableDeclarationStatement element, CodeExpression iterator, params CodeStatement[] statements) { if (element.InitExpression != null) { throw new System.InvalidOperationException($"{nameof(element)} cannot be initialized in foreach loop"); } Element = element; Iterator = iterator; if (statements != null) { Statements.AddRange(statements); } }
public Block(params Statement[] statements) { Statements.AddRange(statements); }
public CodeUsingStatement(CodeStatement initStatement, IEnumerable <CodeStatement> statements) { InitStatement = initStatement; Statements.AddRange(statements); }
public CodeBasicMethodMember(CodeMemberModifiers modifiers, IEnumerable <CodeParameterDeclaration> parameters, IEnumerable <CodeStatement> statements) : base(modifiers) { Parameters.AddRange(parameters); Statements.AddRange(statements); }
public CodeDefaultStatement(IEnumerable <CodeStatement> statements) { Statements.AddRange(statements); Fallthrough = false; }
public CodeDoWhileStatement(CodeExpression condition, IEnumerable <CodeStatement> statements) { Condition = condition; Statements.AddRange(statements); }
public CodeBlockStatement(IEnumerable <CodeStatement> statements) { Statements.AddRange(statements); }
public RunScriptEventArgs(IEnumerable <string> statements, DatabaseConnection databaseConnection) : this(databaseConnection) { Statements.AddRange(statements); }
public CodeCaseStatement(CodeExpression value, IEnumerable <CodeStatement> statements) { Value = value; Statements.AddRange(statements); Fallthrough = false; }
public BlockSyntax AddStatements(params StatementSyntax[] items) { Statements.AddRange(items); return(Update(OpenBraceToken, Statements, CloseBraceToken)); }
public ConstructorGenerator AddStatements(IEnumerable <StatementSyntax> statements) { Statements.AddRange(statements); return(this); }
public CodeCatchClause(string localName, CodeTypeReference catchExceptionType, IEnumerable <CodeStatement> statements) { LocalName = localName; CatchExceptionType = catchExceptionType; Statements.AddRange(statements); }
public Block(Location startLoc, List <Statement> statements, Location endLoc) { StartLocation = startLoc; Statements.AddRange(statements); EndLocation = endLoc; }
public CodeUserPropertyAccessor(CodeMemberModifiers modifiers, IEnumerable <CodeStatement> statements) : base(modifiers) { Statements.AddRange(statements); }
public BlockSyntax(IEnumerable <StatementSyntax> statements) { Statements.AddRange(statements.EmptyIfNull()); }
public void AddRange(List <Statement> stmts) { Statements.AddRange(stmts); }
/// <summary> /// Creates a new <see cref="StatementListInfo"/> with the specified statements added at the end. /// </summary> /// <param name="statements"></param> /// <returns></returns> public StatementListInfo AddRange(IEnumerable <StatementSyntax> statements) { return(WithStatements(Statements.AddRange(statements))); }
public JSDoLoop(JSExpression condition, params JSStatement[] body) { _Condition = condition; Statements.AddRange(body); }
public CodeSwitchStatement(CodeExpression value, IEnumerable <CodeStatement> statements) { Value = value; Statements.AddRange(statements); }