本文整理汇总了C#中System.Action.ToConsoleOut方法的典型用法代码示例。如果您正苦于以下问题:C# Action.ToConsoleOut方法的具体用法?C# Action.ToConsoleOut怎么用?C# Action.ToConsoleOut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Action
的用法示例。
在下文中一共展示了Action.ToConsoleOut方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: __mysqli_query
public void __mysqli_query(
string sql,
Action<string> __y,
Action<string, string> yield_field,
Action<XElement> yield_resultset
)
{
__y.ToConsoleOut();
Action<string> y = x => Console.WriteLine("__mysqli_query" + x);
Console.WriteLine("hey!");
var h = new History();
h.Insert(
new HistoryQueries.Insert
{
query = sql,
context = "__mysqli_query"
}
);
var m = new mysqli(
"localhost",
"root",
""
);
var flag = m.multi_query(sql);
var sqlindex = 0;
{
var message = new
{
sqlindex,
m.errno,
m.error,
m.insert_id,
};
y(message.ToString());
}
while (flag)
{
var rr = m.store_result();
//Native.Dump(rr);
(rr as mysqli_result).With(
result =>
{
#region mysqli_result
//var f0 = result.fetch_field_direct(0);
//var d0 = Native.DumpToString(f0);
var message = new
{
sqlindex,
m.errno,
m.error,
result.field_count,
result.num_rows,
m.insert_id,
//, d0
};
y(message.ToString());
//Console.WriteLine("before fields");
var resultset = new XElement("table");
var resultset_th = new XElement("th");
resultset.Add(resultset_th);
var fields = Enumerable.Range(0, result.field_count).Select(
// jsc can we have implicit delegates to natives?
x => result.fetch_field_direct(x)
).Select(
(f, i) =>
{
var n = new { f.name, i, f.type };
//Console.WriteLine("field: " + n);
resultset_th.Add(
new XElement("td",
new XAttribute("title", "type " + f.type),
f.name
)
);
//.........这里部分代码省略.........