[Mono-dev] A possible implementation for AssemblyName.ReferenceMatchesDefinition

mlgo mlintner at sinenomine.net
Tue Aug 27 15:29:45 UTC 2013


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.


More information about the Mono-devel-list mailing list