Class AssemblyIdentity
A reference to a particular assembly.
Inheritance
Implements
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public sealed class AssemblyIdentity : IEquatable<AssemblyIdentity>
Constructors
| Improve this Doc View SourceAssemblyIdentity(String)
Creates an assembly identity from a name.
Declaration
public AssemblyIdentity(string name)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.String | name | The name of the assembly to reference. |
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String> | annotations | The assembly identity's annotations, expressed as a mapping of keys to values. |
Fields
| Improve this Doc View SourceIsRetargetableKey
The key for the 'is-retargetable' annotation.
Declaration
public const string IsRetargetableKey = "isRetargetable"
Field Value
Type | Description |
---|---|
System.String |
VersionAnnotationKey
The key for the 'version' annotation.
Declaration
public const string VersionAnnotationKey = "version"
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc 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 |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.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 |
---|---|
System.Boolean | 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 |
---|---|
System.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 |
---|---|
System.Version | The value of the 'version' annotation. |
Methods
| Improve this Doc 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 |
---|---|
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
HasAnnotation(String)
Tests if this assembly identity includes a particular annotation key.
Declaration
public bool HasAnnotation(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to look for. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
TryGetAnnotation(String, out Boolean)
Tries to get an annotation's value as a Boolean.
Declaration
public bool TryGetAnnotation(string key, out bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the annotation to look for. |
System.Boolean | value | The value of the annotation. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryGetAnnotation(String, out String)
Tries to get an annotation's value.
Declaration
public bool TryGetAnnotation(string key, out string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the annotation to look for. |
System.String | value | The value of the annotation. |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 |
---|---|---|
System.String | key | The key of the annotation to look for. |
System.Version | value | The value of the annotation. |
Returns
Type | Description |
---|---|
System.Boolean |
|
WithAnnotation(String, Boolean)
Creates a derived assembly identity that includes a particular annotation.
Declaration
public AssemblyIdentity WithAnnotation(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The annotation's key. |
System.Boolean | 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 |
---|---|---|
System.String | key | The annotation's key. |
System.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 |
---|---|---|
System.String | key | The annotation's key. |
System.Version | value | The annotation's value. |
Returns
Type | Description |
---|---|
AssemblyIdentity | A derived assembly identity. |