title: Defining interface dependency that implements generics
body: <p>This will be generics 101 for many but below is sample code so I can understand better.</p>
  
  <pre><code>public interface IRecordedItemsProcessor&lt;T&gt;
  {
      ObservableCollection&lt;RecordedItem&gt; Load(string name);
      void Save();
      RecordedItem Parse(T itemToParse);
  }
  
  public class FileLoadingProcessor : IRecordedItemsProcessor&lt;string&gt;
  {
      public ObservableCollection&lt;RecordedItem&gt; Load(string name)
      {
      }
  
      public void Save()
      {
      }
  
      public RecordedItem Parse(string itemToParse)
      {
      }
  }
  
  public class MyClass
  {
      public MyClass(IRecordedItemsProcessor&lt;T&gt; processor)
      {
  
      }
  
  }
  </code></pre>
  
  <p>The issue is that <code>MyClass</code> needs a dependency on <code>IRecordedItemsProcessor&lt;T&gt;</code> but will not compile as it does not know what <code>T</code> is. How can this be resolved? Making MyClass implement a  seems odd as all it needs to do is call Load/Save</p>
  
  <p>Thanks</p>