Class AssemblyIdentity
A reference to a particular assembly.
Implements
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public sealed class AssemblyIdentity : IEquatable<AssemblyIdentity>
Constructors
| Edit this page View SourceAssemblyIdentity(string)
Creates an assembly identity from a name.
Declaration
public AssemblyIdentity(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the assembly to reference. |
AssemblyIdentity(string, IReadOnlyDictionary<string, string>)
Creates an assembly identity from a name and a set of annotations.
Declaration
public AssemblyIdentity(string name, IReadOnlyDictionary<string, string> annotations)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the assembly to reference. |
| IReadOnlyDictionary<string, string> | annotations | The assembly identity's annotations, expressed as a mapping of keys to values. |
Fields
| Edit this page View SourceIsRetargetableKey
The key for the 'is-retargetable' annotation.
Declaration
public const string IsRetargetableKey = "isRetargetable"
Field Value
| Type | Description |
|---|---|
| string |
VersionAnnotationKey
The key for the 'version' annotation.
Declaration
public const string VersionAnnotationKey = "version"
Field Value
| Type | Description |
|---|---|
| string |
Properties
| Edit this page View SourceAnnotations
Gets a read-only dictionary of additional annotations for the assembly identity. They are used to include additional information on the assembly.
Declaration
public IReadOnlyDictionary<string, string> Annotations { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, string> | Additional annotations. |
IsRetargetable
Gets the value of the 'is-retargetable' annotation
if it is present; otherwise, false.
Declaration
public bool IsRetargetable { get; }
Property Value
| Type | Description |
|---|---|
| bool | The value of the 'is-retargetable' annotation. |
Name
Gets the name of the assembly that is referenced.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string | The name of the assembly. |
VersionOrNull
Gets the value of the 'version' annotation if it
is present; otherwise, null.
Declaration
public Version VersionOrNull { get; }
Property Value
| Type | Description |
|---|---|
| Version | The value of the 'version' annotation. |
Methods
| Edit this page View SourceEquals(AssemblyIdentity)
Checks if two assembly identities are equal.
Declaration
public bool Equals(AssemblyIdentity other)
Parameters
| Type | Name | Description |
|---|---|---|
| AssemblyIdentity | other | The assembly identity to compare with. |
Returns
| Type | Description |
|---|---|
| bool |
|
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Edit this page View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
| Edit this page View SourceHasAnnotation(string)
Tests if this assembly identity includes a particular annotation key.
Declaration
public bool HasAnnotation(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key to look for. |
Returns
| Type | Description |
|---|---|
| bool |
|
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |
Overrides
| Edit this page View SourceTryGetAnnotation(string, out bool)
Tries to get an annotation's value as a Boolean.
Declaration
public bool TryGetAnnotation(string key, out bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key of the annotation to look for. |
| bool | value | The value of the annotation. |
Returns
| Type | Description |
|---|---|
| bool |
|
TryGetAnnotation(string, out string)
Tries to get an annotation's value.
Declaration
public bool TryGetAnnotation(string key, out string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key of the annotation to look for. |
| string | value | The value of the annotation. |
Returns
| Type | Description |
|---|---|
| bool |
|
TryGetAnnotation(string, out Version)
Tries to get an annotation's value as a version.
Declaration
public bool TryGetAnnotation(string key, out Version value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key of the annotation to look for. |
| Version | value | The value of the annotation. |
Returns
| Type | Description |
|---|---|
| bool |
|
WithAnnotation(string, bool)
Creates a derived assembly identity that includes a particular annotation.
Declaration
public AssemblyIdentity WithAnnotation(string key, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The annotation's key. |
| bool | value | The annotation's value. |
Returns
| Type | Description |
|---|---|
| AssemblyIdentity | A derived assembly identity. |
WithAnnotation(string, string)
Creates a derived assembly identity that includes a particular annotation.
Declaration
public AssemblyIdentity WithAnnotation(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The annotation's key. |
| string | value | The annotation's value. |
Returns
| Type | Description |
|---|---|
| AssemblyIdentity | A derived assembly identity. |
WithAnnotation(string, Version)
Creates a derived assembly identity that includes a particular annotation.
Declaration
public AssemblyIdentity WithAnnotation(string key, Version value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The annotation's key. |
| Version | value | The annotation's value. |
Returns
| Type | Description |
|---|---|
| AssemblyIdentity | A derived assembly identity. |