Generic Method Error
<p>I am trying to do something like:</p>

<pre><code>public DataObjectBase GetCurrentSettings&lt;T&gt;(string path) where T : DataObjectBase
    {
        if (string.IsNullOrEmpty(path))
        {
            throw new ArgumentException("Path cannot be empty.");
        }

        return _currentSettings[T].Invoke(path);
    }
</code></pre>

<p>but it won't compile. How can I achieve this? I basically import an IEnumerable of classes that can manipulate my DataObjects using MEF and the importmany attribute. Then in the constructor I turn each operation into a keyed dictionary just so I don't have to run the query every single call.</p>

<p>_currentSettings is a <code>Dictionary&lt;Type, Func&lt;string, DataObject&gt;&gt;</code></p>
