title: Interface design and efficiency comparing two List<string>
body: <p>I've been attempting to design a efficient interface that I'm using for some plugins. I thought I had found a decent interface but trying to implement it is not going well. So I was hoping to see if anyone out here has some better suggestions as to how this could be done. It errors out with "does not contain a public definition for 'GetEnumerator'"</p>
  
  <p><strong>Plugin interface:</strong></p>
  
  <pre><code>namespace ALeRT.PluginFramework
  {
      public interface IQueryPlugin
      {
          string PluginCategory { get; }
          string Name { get; }
          string Version { get; }
          string Author { get; }
          System.Collections.Generic.List TypesAccepted { get; }
      }
  
      interface IQueryPluginRBool : IQueryPlugin
      {
          bool Result(string input, bool sensitive);
      }
  
      interface IQueryPluginRString : IQueryPlugin
      {
          string Result(string input, bool sensitive);
      }
  }
  </code></pre>
  
  <p>In essence I am attempting to take a list of types that should be used (types could be URL, Name, Email, IP, etc.) and compare them to the value in the query plugin. Each query plugin can possibly have multiple types it accepts. When they match, it performs the actions that are in the query plugin.</p>
  
  <pre><code>    [ImportMany]
      public IEnumerable&lt;IQueryPlugin&gt; QPlugins { get; set; }
  
      private void QueryPlugins(List&lt;string&gt; val, bool sensitive)
      {
          foreach (string tType in val) //Cycle through a List&lt;string&gt;
          {
              foreach (var qPlugins in this.QPlugins) //Cycle through all query plugins
              {
                  foreach (string qType in qPlugins) //Cycle though a List&lt;string&gt; within the IQueryPlugin interface AcceptedTypes
                  {
                      if (qType == tType) //Match the two List&lt;strings&gt;, one is the AcceptedTypes and the other is the one returned from ITypeQuery
                      {
                            //Do stuff here
                      }
                  }
              }
          }
      }
  </code></pre>