public static object FromJson(this string json, Type type, bool errorHandling = true, LogWithOptionalParameterList _ = default, [CallerMemberName] string memberName = null, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = 0) { return(ConfigHelper.ReadConfig(json, type, errorHandling, context: $"{filePath}:{lineNumber} {memberName}")); }
public static string ToJson(this object obj, bool inline = false, bool ignoreNull = true, bool errorHandling = true, LogWithOptionalParameterList _ = default, [CallerMemberName] string memberName = null, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = 0) { string result = ConfigHelper.WriteConfig(stuff: obj, inline: inline, ignoreNull: ignoreNull, errorHandling: errorHandling, context: $"{filePath}:{lineNumber} {memberName}"); if (inline) { result = result.TrimEnd('\r', '\n'); } return(result); }
public static T FromJson <T> (this string json, bool errorHandling = true, LogWithOptionalParameterList _ = default, [CallerMemberName] string memberName = null, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = 0) where T : class, new() { return(ConfigHelper.ReadConfig <T> (json, errorHandling: errorHandling, context: $"{filePath}:{lineNumber} {memberName}")); }
public static void Fatal <T1, T2, T3, T4>(string format, T1 arg0, T2 arg1, T3 arg2, T4 arg3 , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Fatal(String.Format(format, new object[] { arg0, arg1, arg2, arg3 }), _, callerMemberName, callerFilePath);
public static void Fatal <T1, T2, T3, T4, T5, T6, T7, T8, T9>(string format, T1 arg0, T2 arg1, T3 arg2, T4 arg3, T5 arg4, T6 arg5, T7 arg6, T8 arg7, T9 arg8 , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Fatal(String.Format(format, new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 }), _, callerMemberName, callerFilePath);
public static void Fatal(Exception exception, string message , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Fatal(message, exception, _, callerFilePath, callerMemberName);
public static void Fatal <T>(T value , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Fatal(value?.ToString(), _, callerMemberName, callerFilePath);
//================================================================================================================================ // Fatal //================================================================================================================================ public static void Fatal(string message , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => GetLogger(callerFilePath)?.Fatal(GetIdentifier(callerMemberName) + "[FATAL] " + message);
public static void Error <T1, T2, T3, T4, T5, T6>(string format, T1 arg0, T2 arg1, T3 arg2, T4 arg3, T5 arg4, T6 arg5 , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Error(String.Format(format, new object[] { arg0, arg1, arg2, arg3, arg4, arg5 }), _, callerMemberName, callerFilePath);
public static void Error <T1>(string format, T1 arg0 , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Error(String.Format(format, new object[] { arg0 }), _, callerMemberName, callerFilePath);
public static void Error(string message, Exception exception , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Error(message + " | " + exception.ToString(), callerFilePath, callerMemberName);
public static void Warn <T1, T2>(string format, T1 arg0, T2 arg1 , LogWithOptionalParameterList _ = default(LogWithOptionalParameterList) , [CallerMemberName] string callerMemberName = null, [CallerFilePath] string callerFilePath = null) => Warn(String.Format(format, new object[] { arg0, arg1 }), _, callerMemberName, callerFilePath);