本文整理汇总了C#中ErrorLevel类的典型用法代码示例。如果您正苦于以下问题:C# ErrorLevel类的具体用法?C# ErrorLevel怎么用?C# ErrorLevel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ErrorLevel类属于命名空间,在下文中一共展示了ErrorLevel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CodeError
public CodeError(ErrorType Type, ErrorLevel Level, CodeLine Line, string Remarks = "")
{
this.Type = Type;
this.Level = Level;
this.Line = Line;
this.Remarks = Remarks;
}
示例2: XmlValidationError
public XmlValidationError(ErrorLevel errorLevel, XmlErrorType errorType, string message, int? lineNumber = null)
{
ErrorLevel = errorLevel;
ErrorType = errorType;
Message = message;
LineNumber = lineNumber;
}
示例3: DataReturnUploadError
public DataReturnUploadError(ErrorLevel errorLevel, UploadErrorType errorType, string description, int lineNumber = 0)
{
ErrorType = errorType;
ErrorLevel = errorLevel;
Description = description;
LineNumber = lineNumber;
}
示例4: DaqException
internal DaqException(string errorMessage, ErrorCodes errorCode)
: base(errorMessage)
{
m_errorCode = errorCode;
m_level = ErrorLevel.Error;
m_lastResponse = null;
}
示例5: LogEntry
/// <summary>
/// Запись в лог
/// </summary>
/// <param name="logLevel">Уровень</param>
/// <param name="message">Текст записи</param>
/// <param name="exception">Исключение</param>
public LogEntry(ErrorLevel logLevel, string message, Exception exception)
: this()
{
Level = logLevel;
Message = message;
Exception = exception;
}
示例6: LogEntry
public LogEntry(DateTime errorDateTime, ErrorLevel errorLevel, string tag,string message)
{
this.errorDateTime = errorDateTime;
this.errorLevel = errorLevel;
this.tag = tag;
this.message = message;
}
示例7: Handle
public void Handle(Exception exception, ErrorLevel errorLevel) {
if (exception is WrappedException)
_reportAnyManagedExceptions(exception.Message, ((WrappedException) exception).Exception, errorLevel);
else
_reportAnyManagedExceptions(exception.Message, exception, errorLevel);
if (errorLevel < SdeAppConfiguration.WarningLevel) return;
if (_exceptionAlreadyShown(exception.Message)) return;
if (Application.Current != null) {
_checkMainWindow();
if (IgnoreNoMainWindow) {
WindowProvider.ShowWindow(new ErrorDialog("Information", _getHeader(errorLevel) + exception.Message, errorLevel), WpfUtilities.TopWindow);
}
else {
if (!Application.Current.Dispatch(() => Application.Current.MainWindow != null && Application.Current.MainWindow.IsLoaded)) {
_showBasicError(_getHeader(errorLevel) + exception.Message, "Information");
return;
}
Application.Current.Dispatch(() => WindowProvider.ShowWindow(new ErrorDialog("Information", _getHeader(errorLevel) + exception.Message, errorLevel), Application.Current.MainWindow));
}
}
}
示例8: FbxAsciiReader
/// <summary>
/// Creates a new reader
/// </summary>
/// <param name="stream"></param>
/// <param name="errorLevel"></param>
public FbxAsciiReader(Stream stream, ErrorLevel errorLevel = ErrorLevel.Checked)
{
if(stream == null)
throw new ArgumentNullException(nameof(stream));
this.stream = stream;
this.errorLevel = errorLevel;
}
示例9: LanguageError
public LanguageError(string file, string key, string message, ErrorLevel level = ErrorLevel.MissingString)
{
File = file;
Key = key;
Message = message;
Level = level;
}
示例10: Output
public static void Output(string Message, ErrorLevel Level)
{
if (Level >= ErrorLevel.Error)
ErrorStream.WriteLine("{0}: {1}", Level.ToString(), Message);
else
Console.WriteLine("{0}: {1}", Level.ToString(), Message);
}
示例11: Log
public void Log(object message, ErrorLevel level, SocketKey key = null)
{
lock (_logLock)
{
entries.Add(new LogEntry()
{
timestamp = DateTime.Now,
level = level,
key = key,
message = MsgFmt(message)
});
}
switch (level)
{
case ErrorLevel.Info:
Debug.Log(KeyFmt(key) + message);
break;
case ErrorLevel.Warning:
Debug.LogWarning(KeyFmt(key) + message);
break;
case ErrorLevel.Error:
Debug.LogError(KeyFmt(key) + message);
break;
}
}
示例12: Error
public static void Error(this IEventRegistry registry, IEventSource source, int errorClass, int errorCode, ErrorLevel level, string message, string stackTrace, string errorSource)
{
var errorEvent = new ErrorEvent(source, errorClass, errorCode, message);
errorEvent.ErrorLevel(level);
errorEvent.StackTrace(stackTrace);
errorEvent.ErrorSource(errorSource);
registry.RegisterEvent(errorEvent);
}
示例13: Log
public static void Log(string message, ErrorLevel x, params string[] args)
{
string msg = Build (string.Format (message, args), x);
Console.WriteLine (msg);
if (autoFlush)
Flush ();
}
示例14: CompilerException
public CompilerException(string fileName, int lineNumber, ErrorLevel level, int errorCode, string message)
{
_fileName = fileName;
_lineNumber = lineNumber;
_level = level;
_errorCode = errorCode;
_message = message;
}
示例15: Error
public Error(IErrorSource source, string message, ErrorLevel errorLevel)
{
if (source == null) throw new ArgumentNullException(nameof(source));
_source = source;
_message = message;
_errorLevel = errorLevel;
}