<div dir="ltr">Hi,<div><br></div><div>This API is broken by design and it's not clear what it should really do. It'd probably be better to check with EF devs whether they really intended to use it and for what purposes. Even for naive implementation please write unit test and check whether it passes on .net</div>
<div><br></div><div><span style="color:rgb(0,0,0);font-family:'Segoe UI','Segoe UI Web Regular','Helvetica Neue',Tahoma,Verdana,Arial;font-size:13px"><a href="http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work">http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work</a></span></div>
<div><br></div><div>Marek</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 5:29 PM, mlgo <span dir="ltr"><<a href="mailto:mlintner@sinenomine.net" target="_blank">mlintner@sinenomine.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to<br>
<a href="http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx</a><br>

<br>
The following is what is expected to be returned from<br>
ReferenceMatchesDefinition.<br>
<br>
Returns a value indicating whether two assembly names are the same. The<br>
comparison is based on the simple assembly names.<br>
<br>
This seems nave but below is a tentative implementation of that. Any ideas?<br>
<br>
public static bool ReferenceMatchesDefinition (AssemblyName reference,<br>
AssemblyName definition)<br>
        {<br>
            if (reference == null)<br>
                throw new ArgumentNullException ("reference");<br>
            if (definition == null)<br>
                throw new ArgumentNullException ("definition");<br>
            if (reference.Name != definition.Name)<br>
                return false;<br>
<br>
            return reference.Name.Equals(definition.Name);<br>
        }<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html" target="_blank">http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html</a><br>

Sent from the Mono - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
</blockquote></div><br></div>