本文整理汇总了C#中Executor.GetAllFunctions方法的典型用法代码示例。如果您正苦于以下问题:C# Executor.GetAllFunctions方法的具体用法?C# Executor.GetAllFunctions怎么用?C# Executor.GetAllFunctions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executor
的用法示例。
在下文中一共展示了Executor.GetAllFunctions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OutputAllTable
void OutputAllTable(StreamWriter sw, Executor exec)
{
sw.WriteLine("<table width='100%'>");
int nRow = 0;
foreach (Function f in exec.GetAllFunctions())
{
if (nRow % 5 == 0)
sw.WriteLine("<tr valign='top'>");
string sName = Util.ToHtml(f.GetName());
string s = "<td><a href='#" + sName + "'>" + sName + "</a></td>";
sw.WriteLine(s);
if (nRow++ % 5 == 4)
sw.WriteLine("</tr>");
}
if (nRow % 5 != 0) sw.WriteLine("</tr>");
sw.WriteLine("</table>");
}
示例2: OutputTaggedTable
void OutputTaggedTable(StreamWriter sw, string sTag, Executor exec)
{
sw.WriteLine("<table width='100%'>");
int nRow = 0;
foreach (Function f in exec.GetAllFunctions())
{
if ((sTag.Length == 0 && f.GetRawTags().Length == 0) || (sTag.Length != 0 && f.GetRawTags().Contains(sTag)))
{
if (nRow % 5 == 0)
sw.WriteLine("<tr valign='top'>");
string sName = Util.ToHtml(f.GetName());
string s = "<td><a href='#" + sName + "'>" + sName + "</a></td>";
sw.WriteLine(s);
if (nRow++ % 5 == 4)
sw.WriteLine("</tr>");
}
}
if (nRow % 5 != 0) sw.WriteLine("</tr>");
sw.WriteLine("</table>");
}
示例3: Eval
public override void Eval(Executor exec)
{
string sHelpFile = Config.gsDataFolder + "\\help.html";
StreamWriter sw = new StreamWriter(sHelpFile);
sw.WriteLine("<html><head><title>Cat Help File</title></head><body>");
/*
sw.WriteLine("<h1><a name='level0prims'></a>Level 0 Primitives</h1>");
OutputTable(sw, "level0", exec);
sw.WriteLine("<h1><a name='level1prims'></a>Level 1 Primitives</h1>");
OutputTable(sw, "level1", exec);
sw.WriteLine("<h1><a name='level2prims'></a>Level 2 Primitives</h1>");
OutputTable(sw, "level2", exec);
sw.WriteLine("<h1><a name='otherprims'></a>Other Functions</h1>");
OutputTable(sw, "", exec);
*/
sw.WriteLine("<h1>Instructions</h1>");
OutputAllTable(sw, exec);
sw.WriteLine("<h1>Definitions</h1>");
sw.WriteLine("<pre>");
foreach (Function f in exec.GetAllFunctions())
{
sw.WriteLine(f.GetImplString(true));
}
sw.WriteLine("</pre>");
sw.WriteLine("</body></html>");
sw.Close();
Output.WriteLine("saved help file to " + sHelpFile);
}