public static Error.IError Create(Error.Level level, string title, System.Exception exception) { System.Reflection.MethodBase method = exception.TargetSite ?? new System.Diagnostics.StackTrace().GetFrame(2).GetMethod(); Type type = method.DeclaringType; System.Reflection.AssemblyName assembly = type.NotNull() ? type.Assembly.GetName() : null; return new Entry() { Time = DateTime.Now, Level = level, Title = title, Message = exception.Message, AssemblyName = assembly.NotNull() ? assembly.Name : "", AssemblyVersion = assembly.NotNull() ? assembly.Version.ToString() : "", Type = type.FullName, Method = method.Name, }; }
public static Error.IError Create(Error.Level level, string title, string message) { System.Diagnostics.StackFrame frame = new System.Diagnostics.StackTrace().GetFrame(2); System.Reflection.MethodBase method = frame.GetMethod(); Type type = method.DeclaringType; System.Reflection.AssemblyName assembly = type.Assembly.GetName(); return new Entry() { Time = DateTime.Now, Level = level, Title = title, Message = message, AssemblyName = assembly.Name, AssemblyVersion = assembly.Version.ToString(), Type = type.FullName, Method = method.Name, Filename = frame.GetFileName(), Line = frame.GetFileLineNumber(), Column = frame.GetFileColumnNumber(), }; }
internal Abstract(System.Exception innerException, Error.Level level, string title, string message, params string[] arguments) : base(innerException, level, title, message, arguments) { }
internal Abstract(Error.Level level, string title, string message, params string[] arguments) : this(null, level, title, message, arguments) { }
internal Exception(Error.Level level, string title, string message, params object[] arguments) : base(level, title, message, arguments) { }
internal static void Check(Target.Level level, string title, string message, params object[] arguments) { new Exception.Test(level, title, message, arguments).Throw(); }
internal Test (Abstract exception, Target.Level level, string title, string message, params object[] arguments) : base(exception, level, title, message, arguments) { }
internal Test (Target.Level level, string title, string message, params object[] arguments) : this(null, level, title, message, arguments) { }