<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">



<div style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; COLOR: #000000; DIRECTION: ltr">
<p>Right. Thanks. I hadn't thought about that. I keep suspecting that the documentation is not right though. That in fact what needs to be done is determine if the names actually refer to the same dll. Hopefully someone can reply to this who knows more about
 the internals of this. Otherwise I need to find some more real world uses of it in dotnet source code so I can better understand if this is the right way to go.
</p>
<hr tabindex="-1">
<p></p>
<div style="FONT-SIZE: 16px; FONT-FAMILY: Times New Roman; COLOR: #000000">
<div id="divRpF270827" style="DIRECTION: ltr"><font color="#000000" size="2" face="Tahoma"><b>From:</b> Daniel Lo Nigro [via Mono] [ml-node+<a href="/user/SendEmail.jtp?type=node&node=4660692&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>]<br>
<b>Sent:</b> Tuesday, August 27, 2013 7:20 PM<br>
<b>To:</b> Mark Lintner<br>
<b>Subject:</b> Re: A possible implementation for AssemblyName.ReferenceMatchesDefinition<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">You may want to ignore culture and case in your comparison:
<div><br>
</div>
<div><font face="courier new, monospace">return reference.Name.Equals(definition.Name, StringComparison.InvariantCultureIgnoreCase)</font></div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Aug 28, 2013 at 1:29 AM, mlgo <span dir="ltr"><<a href="https://connect.emailsrvr.com/owa/UrlBlockedError.aspx" rel="nofollow" target="_blank" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid; PADDING-RIGHT: 1em">
According to<br>
<a href="http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx" rel="nofollow" target="_blank" link="external">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 na├»ve 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" rel="nofollow" target="_blank" link="external">
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="https://connect.emailsrvr.com/owa/UrlBlockedError.aspx" rel="nofollow" target="_blank" link="external">[hidden email]</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" rel="nofollow" target="_blank" link="external">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
</blockquote>
</div>
<br>
</div>
<br>
_______________________________________________ <br>
Mono-devel-list mailing list <br>
<a href="https://connect.emailsrvr.com/owa/UrlBlockedError.aspx" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" rel="nofollow" target="_blank" link="external">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br>
<br>
<hr color="#cccccc" size="1" noshade="">
<div style="COLOR: #444; FONT: 12px tahoma,geneva,helvetica,arial,sans-serif">
<div style="FONT-WEIGHT: bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683p4660691.html" target="_blank" rel="nofollow" link="external">http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683p4660691.html</a>
</div>
<div style="COLOR: #666; FONT: 11px/1.5em tahoma,geneva,helvetica,arial,sans-serif; MARGIN-TOP: 0.4em">
To unsubscribe from A possible implementation for AssemblyName.ReferenceMatchesDefinition,
<a href="" target="_blank" rel="nofollow" link="external">
click here</a>.<br>
<a style="FONT: 9px serif" href="http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" target="_blank" link="external">NAML</a>
</div>
</div>
</div>
</div>




        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683p4660692.html">RE: A possible implementation for AssemblyName.ReferenceMatchesDefinition</a><br/>
Sent from the <a href="http://mono.1490590.n4.nabble.com/Mono-Dev-f1517221.html">Mono - Dev mailing list archive</a> at Nabble.com.<br/>