|
using System;
using System.Collections.Generic;
using System.Text;
namespace SqlClrLib.Model
{
/// <summary>
/// Holds thread execution result
/// </summary>
[Serializable]
class ResultItem
{
public ResultItem(ThreadSql sql)
{
Key = sql.Key;
Success = sql.Exception == null;
RunTime = Convert.ToInt32(sql.RunTime);
if (sql.Exception != null)
{
ErrorMessage = sql.Exception.Message;
ErrorStack = string.Format("{0}:\n{1}", sql.Exception.GetType().FullName, sql.Exception.StackTrace);
}
else
{
ErrorMessage = string.Empty;
ErrorStack = string.Empty;
}
}
public string Key;
public bool Success;
public int RunTime;
public string ErrorMessage;
public string ErrorStack;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
writing code for the past 20 years, and now decided to share some thoughts.
Also known as Oleg Vorkunov.