[Mono-dev] A possible implementation for AssemblyName.ReferenceMatchesDefinition
Marek Safar
marek.safar at gmail.com
Wed Aug 28 07:19:28 UTC 2013
Hi,
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
http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work
Marek
On Tue, Aug 27, 2013 at 5:29 PM, mlgo <mlintner at sinenomine.net> wrote:
> According to
>
> http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx
>
> The following is what is expected to be returned from
> ReferenceMatchesDefinition.
>
> Returns a value indicating whether two assembly names are the same. The
> comparison is based on the simple assembly names.
>
> This seems naïve but below is a tentative implementation of that. Any
> ideas?
>
> public static bool ReferenceMatchesDefinition (AssemblyName reference,
> AssemblyName definition)
> {
> if (reference == null)
> throw new ArgumentNullException
> ("reference");
> if (definition == null)
> throw new ArgumentNullException
> ("definition");
> if (reference.Name != definition.Name)
> return false;
>
> return reference.Name.Equals(definition.Name);
> }
>
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130828/e3a71cb5/attachment-0001.html>
More information about the Mono-devel-list
mailing list