internal ModelException(JsonSerializable target, String message, Action fix, String fixDesc) : base(message) { _Target = target; _ProposedFix = fix; _ProposedFixDescription = fixDesc; }
private static string _CreateBaseMessage(JsonSerializable target, String message) { if (target == null) { return(message); } var targetTypeInfo = target.GetType().GetTypeInfo(); var logicalIndexProp = targetTypeInfo.GetProperty("LogicalIndex"); var logicalIndex = logicalIndexProp != null ? (int)logicalIndexProp.GetValue(target) : -1; if (logicalIndex >= 0) { return($"{targetTypeInfo.Name}[{logicalIndex}] {message}"); } return($"{targetTypeInfo.Name} {message}"); }
internal UnsupportedExtensionException(JsonSerializable target, String message, Action fix, String fixDesc) : base(target, message, fix, fixDesc) { }
internal UnsupportedExtensionException(JsonSerializable target, String message) : base(target, message) { }
internal ModelException(JsonSerializable target, String message) : base(_CreateBaseMessage(target, message)) { _Target = target; }