namespace decePubClient.Models { public class ClientLogs { public long Id { get; set; } public string Where { get; set; } public string WarningMessage { get; set; } public ClientLogException Exception { get; set; } public DateTime TimeStamp { get; set; } = DateTime.Now; public string ErrorMessage() { if (Exception.InnerExceptionMessage != null) { return @$"Type: {Exception.Type ?? "N/A"} HelpLink: {Exception.HelpLink ?? "N/A"} HResult: {Exception.HResult ?? "N/A"}
Source: {Exception.Source ?? "N/A"} StackTrace: {Exception.StackTrace ?? "N/A"} MemberName: {Exception.TargetSiteName ?? "N/A"}
Message: {Exception.Message ?? "N/A"}
InnerExceptionMessage:{Exception.InnerExceptionMessage ?? "N/A"}"; } else { return @$"Type: {Exception.Type ?? "N/A"} HelpLink: {Exception.HelpLink ?? "N/A"} HResult: {Exception.HResult ?? "N/A"}
Source: {Exception.Source ?? "N/A"} StackTrace: {Exception.StackTrace ?? "N/A"} MemberName: {Exception.TargetSiteName ?? "N/A"}
Message: {Exception.Message ?? "N/A"}"; } } } public class ClientLogException { public string Type { get; set; } public string HelpLink { get; set; } public string HResult { get; set; } public string Source { get; set; } public string StackTrace { get; set; } public string TargetSiteName { get; set; } public string Message { get; set; } public string InnerExceptionMessage { get; set; } } }