public static void AddData <T>(this Exception exception, string key, T data) { if (typeof(T).IsValueType) { exception.Data[key] = data; } else { exception.AddToDataCollection(key, data); } }
public static void AddData <T>(this Exception exception, string key, T data) { if (typeof(T).IsValueType) { exception.Data[key] = data; } else { exception.AddToDataCollection(key, data); } }