本文整理汇总了C#中Statements类的典型用法代码示例。如果您正苦于以下问题:C# Statements类的具体用法?C# Statements怎么用?C# Statements使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Statements类属于命名空间,在下文中一共展示了Statements类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CaseExpression
public CaseExpression(Expression value, WhenClause/*!*/[] whenClauses, Statements elseStatements, SourceSpan location)
: base(location)
{
_value = value;
_whenClauses = whenClauses ?? WhenClause.EmptyArray;
_elseStatements = elseStatements;
}
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:CaseExpression.cs
示例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;
}
开发者ID:joshholmes,项目名称:ironruby,代码行数:7,代码来源:ForLoopExpression.cs
示例3: Finalizer
public Finalizer(LexicalScope/*!*/ definedScope, Statements statements, SourceSpan location)
: base(location) {
Assert.NotNull(definedScope);
_definedScope = definedScope;
_statements = statements;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:7,代码来源:Finalizer.cs
示例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;
}
开发者ID:jschementi,项目名称:iron,代码行数:7,代码来源:ForLoopExpression.cs
示例5: RescueClause
public RescueClause(CompoundRightValue type, LeftValue target, Statements statements, SourceSpan location)
: base(location) {
_types = type.RightValues;
_splatType = type.SplattedValue;
_target = target;
_statements = statements;
}
开发者ID:aceptra,项目名称:ironruby,代码行数:7,代码来源:RescueClause.cs
示例6: BlockExpression
internal BlockExpression(Statements/*!*/ statements, SourceSpan location)
: base(location) {
Assert.NotNull(statements);
Debug.Assert(statements.Count > 1);
_statements = statements;
}
开发者ID:ExpertsInside,项目名称:IronSP,代码行数:7,代码来源:BlockExpression.cs
示例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;
}
开发者ID:janivihervas,项目名称:mini-pl-interpreter,代码行数:15,代码来源:StatementFor.cs
示例8: ElseIfClause
public ElseIfClause(Expression condition, Statements/*!*/ statements, SourceSpan location)
: base(location)
{
Assert.NotNull(statements);
_statements = statements;
_condition = condition;
}
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:ElseIfClause.cs
示例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;
}
开发者ID:joshholmes,项目名称:ironruby,代码行数:8,代码来源:CaseExpression.cs
示例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;
}
开发者ID:nieve,项目名称:ironruby,代码行数:8,代码来源:BlockDefinition.cs
示例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;
}
开发者ID:TerabyteX,项目名称:main,代码行数:14,代码来源:RescueClause.cs
示例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;
}
开发者ID:jschementi,项目名称:iron,代码行数:8,代码来源:BlockDefinition.cs
示例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;
}
开发者ID:aslakhellesoy,项目名称:ironruby,代码行数:10,代码来源:UnlessExpression.cs
示例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;
}
开发者ID:ExpertsInside,项目名称:IronSP,代码行数:11,代码来源:WhileLoopExpression.cs
示例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;
}
开发者ID:jcteague,项目名称:ironruby,代码行数:11,代码来源:Body.cs
示例16: CopyFile
public static void CopyFile(FileInfo source, FileInfo destination,
Statements.FileCopyOptions options, CopyFileHandler callback, object state)
{
if (source == null) throw new ArgumentNullException("source");
if (destination == null) throw new ArgumentNullException("destination");
new FileIOPermission(FileIOPermissionAccess.Read, source.FullName).Demand();
new FileIOPermission(FileIOPermissionAccess.Write, destination.FullName).Demand();
CopyProgressRoutine cpr = (callback == null) ? null : new CopyProgressRoutine(
new CopyProgressData(source, destination, callback, state).CallbackHandler);
bool cancel = false;
if (!NativeMethod.CopyFileEx(source.FullName, destination.FullName, cpr, IntPtr.Zero, ref cancel, (int)options))
throw new IOException(new Win32Exception().Message);
}
开发者ID:miguelhasse,项目名称:Workflow-Activities,代码行数:16,代码来源:FileCopyHelper.cs
示例17: IfExpression
public IfExpression(Expression/*!*/ condition, Statements/*!*/ body, List<ElseIfClause>/*!*/ elseIfClauses, SourceSpan location)
: base(location) {
ContractUtils.RequiresNotNull(body, "body");
ContractUtils.RequiresNotNull(condition, "condition");
ContractUtils.RequiresNotNull(elseIfClauses, "elseIfClauses");
// all but the last clause should have non-null conditions:
for (int i = 0; i < elseIfClauses.Count - 1; i++) {
if (elseIfClauses[i].Condition == null) {
throw ExceptionUtils.MakeArgumentItemNullException(i, "elseIfClauses");
}
}
_condition = condition;
_body = body;
_elseIfClauses = elseIfClauses;
}
开发者ID:ExpertsInside,项目名称:IronSP,代码行数:17,代码来源:IfExpression.cs
示例18: Resume
public bool Resume(Bookmark bookmark, FileInfo source, FileInfo destination, Statements.FileCopyOptions options, int stepIncrement)
{
var context = new CopyFileContext(stepIncrement)
{
Instance = this,
Bookmark = bookmark,
Action = CopyFileAction.Continue
};
if (contexts.TryAdd(bookmark.Name, context))
{
var action = new Action(() => ExecuteCopyFile(context, source, destination, options));
action.BeginInvoke((a) =>
{
try { action.EndInvoke(a); }
catch (Exception ex) { ((CopyFileContext)a.AsyncState).Exception = ex; }
finally { ((CopyFileContext)a.AsyncState).NotifyCompletion(); }
}, context);
return true;
}
return false;
}
开发者ID:miguelhasse,项目名称:Workflow-Activities,代码行数:21,代码来源:FileCopyExtension.cs
示例19: Visit
public virtual void Visit(Statements.TryStatement.FinallyStatement s)
{
VisitChildren(s);
}
开发者ID:DinrusGroup,项目名称:DinrusIDE,代码行数:4,代码来源:DefaultDepthFirstVisitor.cs
注:本文中的Statements类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论