Udostępnij za pośrednictwem


AssemblyIdentity Constructor

Definition

Constructs an AssemblyIdentity from its constituent parts.

public AssemblyIdentity (string name, Version version = default, string cultureName = default, System.Collections.Immutable.ImmutableArray<byte> publicKeyOrToken = default, bool hasPublicKey = false, bool isRetargetable = false, System.Reflection.AssemblyContentType contentType = System.Reflection.AssemblyContentType.Default);
public AssemblyIdentity (string? name, Version? version = default, string? cultureName = default, System.Collections.Immutable.ImmutableArray<byte> publicKeyOrToken = default, bool hasPublicKey = false, bool isRetargetable = false, System.Reflection.AssemblyContentType contentType = System.Reflection.AssemblyContentType.Default);
new Microsoft.CodeAnalysis.AssemblyIdentity : string * Version * string * System.Collections.Immutable.ImmutableArray<byte> * bool * bool * System.Reflection.AssemblyContentType -> Microsoft.CodeAnalysis.AssemblyIdentity
Public Sub New (name As String, Optional version As Version = Nothing, Optional cultureName As String = Nothing, Optional publicKeyOrToken As ImmutableArray(Of Byte) = Nothing, Optional hasPublicKey As Boolean = false, Optional isRetargetable As Boolean = false, Optional contentType As AssemblyContentType = System.Reflection.AssemblyContentType.Default)

Parameters

name
String

The simple name of the assembly.

version
Version

The version of the assembly.

cultureName
String

The name of the culture to associate with the assembly. Specify null, Empty, or "neutral" (any casing) to represent InvariantCulture. The name can be an arbitrary string that doesn't contain NUL character, the legality of the culture name is not validated.

publicKeyOrToken
ImmutableArray<Byte>

The public key or public key token of the assembly.

hasPublicKey
Boolean

Indicates whether publicKeyOrToken represents a public key.

isRetargetable
Boolean

Indicates whether the assembly is retargetable.

contentType
AssemblyContentType

Specifies the binding model for how this object will be treated in comparisons.

Exceptions

hasPublicKey is false and publicKeyOrToken contains a value that is not the size of a public key token, 8 bytes.

contentType is not a value of the AssemblyContentType enumeration.

Applies to