本文整理匯總了C#中ErrorList.ErrorRuntimeError方法的典型用法代碼示例。如果您正苦於以下問題:C# ErrorList.ErrorRuntimeError方法的具體用法?C# ErrorList.ErrorRuntimeError怎麽用?C# ErrorList.ErrorRuntimeError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ErrorList
的用法示例。
在下文中一共展示了ErrorList.ErrorRuntimeError方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ApplyBinary
public static ITemplateType ApplyBinary(ITemplateType lhs, ITemplateType rhs, int id, ErrorList errors)
{
if (rhs == null || lhs == null)
return null;
var op = (Operator) id;
try
{
var rt = lhs.ApplyBinary(op, rhs);
return PrimitiveType.Create(rt);
}
catch (Exception e)
{
errors.ErrorRuntimeError(e);
}
return null;
}
示例2: WarmUp
public ErrorList WarmUp(TemplateDictionary state)
{
_buffer = null;
_errors = new ErrorList();
_state = state;
try
{
_image(this);
}
catch (Exception e)
{
_errors.ErrorRuntimeError(e);
}
return _errors;
}
示例3: ApplyUnary
public static ITemplateType ApplyUnary(ITemplateType lhs, int id, ErrorList errors)
{
if (lhs == null)
return null;
var op = (Operator) id;
try
{
return PrimitiveType.Create(lhs.ApplyUnary(op));
}
catch (Exception e)
{
errors.ErrorRuntimeError(e);
}
return null;
}
示例4: Execute
public TemplateExecutionResult Execute(TemplateDictionary state)
{
var result = new TemplateExecutionResult {Template = this};
_buffer = new StringBuilder();
_errors = new ErrorList();
_state = state;
try
{
_image(this);
result.Output = _buffer.ToString();
}
catch (Exception e)
{
result.Output = string.Empty;
_errors.ErrorRuntimeError(e);
}
result.Errors.AddRange(_errors);
return result;
}