Click or drag to resize

AssemblyIdentityMatch Method

[This is preliminary documentation and is subject to change.]

Compares the specified Assembly to the current AssemblyIdentity, and returns an integer value that specifies if the assembly matches the identity, and how strong that match is.

Namespace:  NerdyDuck.CodedExceptions.Configuration
Assembly:  NerdyDuck.CodedExceptions (in NerdyDuck.CodedExceptions.dll) Version: 2.0.0+2040dad
Syntax
public int Match(
	Assembly assembly
)
View Source

Parameters

assembly
Type: System.ReflectionAssembly
The Assembly to compare to.

Return Value

Type: Int32
A signed number indicating the relative matching strength of the assembly to the identity.
ValueDescription
Less than zeroThe assembly does not match the identity, or assembly is .
ZeroThe current AssemblyIdentity is a "catch-all" where all property values are set to , so every Assembly matches.
More than zeroThe assembly matches the identity. The higher the value, the stronger the match.

Return Value

Type: Int32
This table details the specific values of the return value.
ValueDescription
-4The assembly's public key does not match the identity.
-3The assembly culture does not match the identity.
-2The assembly version does not match the identity.
-1The assembly name does not match the identity, or assembly is .
0The current AssemblyIdentity is a "catch-all" where all property values are set to , so every Assembly matches.
1The assembly's public key matches the identity.
2The assembly culture matches the identity.
4The assembly version matches the identity.
8The assembly name matches the identity.

Positive values are combined if multiple properties match, to detect the strongest match when comparing multiple AssemblyIdentitys to an Assembly, while a single mismatch results in the negative return value according to the mismatched property. The different properties of the AssemblyIdentity have different weights, so that a match via e.g. the assembly name will always be higher ranked than the match via the assembly version. Only properties of the AssemblyIdentity that are not are compared to the assembly.

See Also