本文整理汇总了C#中ScriptEngine.Pad方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptEngine.Pad方法的具体用法?C# ScriptEngine.Pad怎么用?C# ScriptEngine.Pad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptEngine
的用法示例。
在下文中一共展示了ScriptEngine.Pad方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToString
public override string ToString(ScriptEngine engine)
{
string msg = engine.Pad() + "Return" + Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
msg += engine.Pad() + "LHS:" + Environment.NewLine;
{
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int i = 0; i < _lhs.Count; i++)
{
msg += _lhs[i].ToString(engine);
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
msg += engine.Pad() + "RHS:" + Environment.NewLine;
{
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int i = 0; i < _rhs.Count; i++)
{
msg += _rhs[i].ToString(engine);
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
return msg;
}
示例2: ToString
public override string ToString(ScriptEngine engine)
{
string msg = engine.Pad() + "MathToken (" + _type.ToString() + ")";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
msg += engine.Pad() + "LHS";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
for (int i = 0; i < _lhs.Count; i++)
{
msg += _lhs[i].ToString(engine);
}
msg += Environment.NewLine;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
msg += engine.Pad() + "RHS";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
for (int i = 0; i < _rhs.Count; i++)
{
msg += _rhs[i].ToString(engine);
}
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
return msg;
}
示例3: ToString
public override string ToString(ScriptEngine engine)
{
string msg = engine.Pad() + "ForLoopToken";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
msg += engine.Pad() + "-Init";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
for (int i = 0; i < _loopInit.Count; i++)
{
msg += engine.Pad() + "Chunk #" + (i + 1).ToString();
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int j = 0; j < _loopInit[i].Count; j++)
{
msg += _loopInit[i][j].ToString(engine);
msg += Environment.NewLine;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
msg += engine.Pad() + "-Condition Check";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
for (int i = 0; i < _exitCondition.Count; i++)
{
msg += engine.Pad() + "Chunk #" + (i + 1).ToString();
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int j = 0; j < _exitCondition[i].Count; j++)
{
msg += _exitCondition[i][j].ToString(engine);
msg += Environment.NewLine;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
msg += engine.Pad() + "-Increment";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
{
for (int i = 0; i < _iterator.Count; i++)
{
msg += engine.Pad() + "Chunk #" + (i + 1).ToString();
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int j = 0; j < _iterator[i].Count; j++)
{
msg += _iterator[i][j].ToString(engine);
msg += Environment.NewLine;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
msg += engine.Pad() + "-Code";
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int i = 0; i < _code.Count; i++)
{
msg += engine.Pad() + "Line #" + (i + 1).ToString();
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int j = 0; j < _code[i].Count; j++)
{
msg += engine.Pad() + "Chunk #" + (j + 1).ToString();
msg += Environment.NewLine;
engine.IndentationLevel += ScriptEngine.PaddingIncrement;
for (int k = 0; k < _code[i][j].Count; k++)
{
msg += _code[i][j][k].ToString(engine);
msg += Environment.NewLine;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
}
engine.IndentationLevel -= ScriptEngine.PaddingIncrement;
return msg;
}