本文整理汇总了C#中Statements类的典型用法代码示例。如果您正苦于以下问题:C# Statements类的具体用法?C# Statements怎么用?C# Statements使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Statements类属于命名空间,在下文中一共展示了Statements类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CaseExpression
public CaseExpression(Expression value, WhenClause/*!*/[] whenClauses, Statements elseStatements, SourceSpan location)
: base(location)
{
_value = value;
_whenClauses = whenClauses ?? WhenClause.EmptyArray;
_elseStatements = elseStatements;
}
示例2: ForLoopExpression
public ForLoopExpression(CompoundLeftValue/*!*/ variables, Expression/*!*/ list, Statements body, SourceSpan location)
: base(location) {
Assert.NotNull(variables, list);
_block = new BlockDefinition(null, variables, body, location);
_list = list;
}
示例3: Finalizer
public Finalizer(LexicalScope/*!*/ definedScope, Statements statements, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope);
_definedScope = definedScope;
_statements = statements;
}
示例4: ForLoopExpression
public ForLoopExpression(LexicalScope/*!*/ definedScope, Parameters/*!*/ variables, Expression/*!*/ list, Statements body, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope, variables, list);
_block = new BlockDefinition(definedScope, variables, body, location);
_list = list;
}
示例5: RescueClause
public RescueClause(CompoundRightValue type, LeftValue target, Statements statements, SourceSpan location)
: base(location) {
_types = type.RightValues;
_splatType = type.SplattedValue;
_target = target;
_statements = statements;
}
示例6: BlockExpression
internal BlockExpression(Statements/*!*/ statements, SourceSpan location)
: base(location) {
Assert.NotNull(statements);
Debug.Assert(statements.Count > 1);
_statements = statements;
}
示例7: StatementFor
/// <summary>
/// Creates a new for loop statement. Usage:
/// for 'identifier' in 'firstExpression' .. 'secondExpression' do 'statements' end for;
/// </summary>
/// <param name="identifier">Iterator's identifier</param>
/// <param name="firstExpression">Starting value</param>
/// <param name="secondExpression">Ending value</param>
/// <param name="statements">Statements to execute</param>
public StatementFor(string identifier, Expression firstExpression, Expression secondExpression, Statements statements)
{
Identifier = identifier;
FirstExpression = firstExpression;
SecondExpression = secondExpression;
Statements = statements;
}
示例8: ElseIfClause
public ElseIfClause(Expression condition, Statements/*!*/ statements, SourceSpan location)
: base(location)
{
Assert.NotNull(statements);
_statements = statements;
_condition = condition;
}
示例9: CaseExpression
public CaseExpression(Expression value, List<WhenClause>/*!*/ whenClauses, Statements elseStatements, SourceSpan location)
: base(location) {
ContractUtils.RequiresNotNull(whenClauses, "whenClauses");
_value = value;
_whenClauses = whenClauses;
_elseStatements = elseStatements;
}
示例10: BlockDefinition
public BlockDefinition(LexicalScope/*!*/ definedScope, CompoundLeftValue/*!*/ parameters, Statements/*!*/ body, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope, parameters, body);
_definedScope = definedScope;
_body = body;
_parameters = parameters;
}
示例11: RescueClause
private readonly Expression[] _types; // might be empty, might include SplattedArgument expressions
#endregion Fields
#region Constructors
public RescueClause(Expression/*!*/[]/*!*/ types, LeftValue target, Statements statements, SourceSpan location)
: base(location)
{
Assert.NotNullItems(types);
_types = types;
_target = target;
_statements = statements;
}
示例12: BlockDefinition
public BlockDefinition(LexicalScope/*!*/ definedScope, Parameters parameters, Statements/*!*/ body, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope, body);
_definedScope = definedScope;
_body = body;
_parameters = parameters ?? Parameters.Empty;
}
示例13: UnlessExpression
public UnlessExpression(Expression/*!*/ condition, Statements/*!*/ statements, ElseIfClause elseClause, SourceSpan location)
: base(location) {
ContractUtils.RequiresNotNull(condition, "condition");
ContractUtils.RequiresNotNull(statements, "statements");
ContractUtils.Requires(elseClause == null || elseClause.Condition == null, "elseClause", "No condition allowed.");
_statements = statements;
_condition = condition;
_elseClause = elseClause;
}
示例14: WhileLoopExpression
public WhileLoopExpression(Expression/*!*/ condition, bool isWhileLoop, bool isPostTest, Statements/*!*/ statements, SourceSpan location)
: base(location) {
ContractUtils.RequiresNotNull(condition, "condition");
ContractUtils.RequiresNotNull(statements, "statements");
_condition = condition;
_isWhileLoop = isWhileLoop;
_isPostTest = isPostTest;
_statements = statements;
}
示例15: Body
public Body(Statements/*!*/ statements, List<RescueClause> rescueClauses, Statements elseStatements,
Statements ensureStatements, SourceSpan location)
: base(location) {
Assert.NotNull(statements);
_statements = statements;
_rescueClauses = rescueClauses;
_elseStatements = elseStatements;
_ensureStatements = ensureStatements;
}