How to eliminate the duplication in these 2 interfaces caused by using struct as parameter?
<p>I have 2 C# interfaces like this:</p>

<pre><code>public interface IEvernoteJobListener
{
    void CopyS3File(S3Location src, EvernoteLocation des, Action&lt;Exception&gt; complete);
}

public interface ICopyJobListener
{
    void CopyS3File(S3Location src, S3Location des, Action&lt;Exception&gt; complete);
}
</code></pre>

<p>You can see that they are almost identical besides their second parameter, which makes the implementation nearly identical.  What stops me from merge them into a single interface is that EvernoteLocation and S3Location are structs, so I can't make them inherit from the same parent and thus eliminate the difference between them and only keep one interface and one method.</p>

<p>What are the possible solutions to eliminate the duplication of the interface?</p>

<p>Edit:</p>

<p>The code of implementation might help clarify the question:</p>

<pre><code>    public void CopyS3File (S3Location src, EvernoteLocation des, Action&lt;Exception&gt; complete)
    {
        reader.ReadS3ToFile(src, (file, readExc) =&gt; {
            if(readExc != null)
            {
                complete(readExc);
                return;
            }

           // This is a Evernote writer.
            writer.WriteFromFile(file, des, writeExc =&gt; {
                complete(writeExc);
            });
        });
    }


    public void CopyS3File (S3Location src, S3Location des, Action&lt;Exception&gt; complete)
    {
        reader.ReadS3ToFile(src, (file, readExc) =&gt; {
            if(readExc != null)
            {
                complete(readExc);
                return;
            }

               // This is a S3 writer.
            writer.WriteFromFile(file, des, writeExc =&gt; {
                complete(writeExc);
            });
        });
    }
</code></pre>
