文字列に値をIDictionary書き込む拡張機能を作成しました。IDictionary Exception.Data
拡張コード:
public static class DictionaryExtension
{
    public static string ToString<TKey, TValue>(this IDictionary<TKey, TValue> source, string keyValueSeparator, string sequenceSeparator)
    {
        if (source == null)
            throw new ArgumentException("Parameter source can not be null.");
        return source.Aggregate(new StringBuilder(), (sb, x) => sb.Append(x.Key + keyValueSeparator + x.Value + sequenceSeparator), sb => sb.ToString(0, sb.Length - 1));           
    }
}
この拡張機能を使用するException.Data.ToString("=", "|")と、エラーが発生します
The type arguments cannot be inferred from the usage.
これを解決する方法はありますか?