本文整理汇总了C#中IOutput.Out方法的典型用法代码示例。如果您正苦于以下问题:C# IOutput.Out方法的具体用法?C# IOutput.Out怎么用?C# IOutput.Out使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOutput
的用法示例。
在下文中一共展示了IOutput.Out方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Report
public void Report(IOutput output)
{
foreach (var q in _qs)
{
output.Out(q.ToString());
}
}
示例2: Report
public void Report(IOutput output)
{
JavaScriptSerializer s = new JavaScriptSerializer();
string serialize = s.Serialize(_qs);
output.Out(serialize);
}
示例3: Execute
public bool Execute(string subject, IQueueTools tools, IOutput log)
{
foreach(var m in tools.Tail(subject))
{
log.Out(m.ToString());
}
return true;
}
示例4: Execute
public bool Execute(string subject, IQueueTools tools, IOutput log)
{
try
{
int copied = tools.Transfer(subject, _opts.Destination, null, false, false);
log.Out(subject + " copied to " + _opts.Destination + " ("+ copied +" messages)");
return true;
}
catch (Exception ex)
{
log.Error(ex.Message);
return false;
}
}
示例5: Execute
public bool Execute(string subject, IQueueTools tools, IOutput log)
{
bool alreadyExists = tools.Exists(subject);
if (!alreadyExists)
{
log.Warn(subject, "Doesn't exist. Skipping.");
return false;
}
log.Info(subject, "Listing results.");
foreach(var res in tools.Grep(subject, _opts.Expression, _opts.CaseInsensitive))
{
log.Out(res.ToString());
}
return true;
}