Class IdentifierTriple
Represents a composite identifier consisting of an agency identifier, item identifier, and item version.
Inheritance
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public sealed class IdentifierTriple : Tuple<Guid, long, string>
Constructors
IdentifierTriple(Guid, Int64, String)
Create a composite ISO 11179 identifier.
Declaration
public IdentifierTriple(Guid identifier, long version, string agencyId)
Parameters
Type | Name | Description |
---|---|---|
Guid | identifier | The identifier. |
System.Int64 | version | The version of the item. |
System.String | agencyId | The agency identifier. |
Properties
AgencyId
Gets the agency identifier.
Declaration
public string AgencyId { get; }
Property Value
Type | Description |
---|---|
System.String |
Identifier
Gets the item identifier.
Declaration
public Guid Identifier { get; }
Property Value
Type | Description |
---|---|
Guid |
Version
Gets the item version.
Declaration
public long Version { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Equals(Object)
Determines whether the specified
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
ToString()
Returns a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A |
TryParse(String, out IdentifierTriple)
Tries to parse an IdentifierTriple from the provided string.
Declaration
public static bool TryParse(string str, out IdentifierTriple idTriple)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | The string to parse. |
IdentifierTriple | idTriple | The identifier triple. |
Returns
Type | Description |
---|---|
System.Boolean |
|
VersionOf(IIdentifiable)
Returns true if the specified IIdentifiable's agency identifier and item identifier are the same as the ones in this instance.
Declaration
public bool VersionOf(IIdentifiable b)
Parameters
Type | Name | Description |
---|---|---|
IIdentifiable | b | The IIdentifiable to compare. |
Returns
Type | Description |
---|---|
System.Boolean |
|
VersionOf(IdentifierTriple)
Returns true if the specified agency identifier and item identifier are the same as the ones in this instance.
Declaration
public bool VersionOf(IdentifierTriple b)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | b | The identifier to compare. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Operators
Equality(IdentifierTriple, IdentifierTriple)
Implements the operator ==.
Declaration
public static bool operator ==(IdentifierTriple a, IdentifierTriple b)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | a | The left side. |
IdentifierTriple | b | The right side. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
Inequality(IdentifierTriple, IdentifierTriple)
Implements the operator !=.
Declaration
public static bool operator !=(IdentifierTriple a, IdentifierTriple b)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | a | The left side. |
IdentifierTriple | b | The right side. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |