Class IdentifierTriple
Represents a composite identifier consisting of an agency identifier, item identifier, and item version.
Inherited Members
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
[Serializable]
[Obfuscation(Exclude = true)]
public sealed class IdentifierTriple : Tuple<Guid, long, string>, IStructuralEquatable, IStructuralComparable, IComparable, ITuple
Constructors
IdentifierTriple(Guid, long, string)
Create a composite ISO 11179 identifier.
Declaration
public IdentifierTriple(Guid identifier, long version, string agencyId)
Parameters
Type | Name | Description |
---|---|---|
Guid | identifier | The identifier. |
long | version | The version of the item. |
string | agencyId | The agency identifier. |
Properties
AgencyId
Gets the agency identifier.
Declaration
[IgnoreDataMember]
public string AgencyId { get; }
Property Value
Type | Description |
---|---|
string |
Identifier
Gets the item identifier.
Declaration
[IgnoreDataMember]
public Guid Identifier { get; }
Property Value
Type | Description |
---|---|
Guid |
Version
Gets the item version.
Declaration
[IgnoreDataMember]
public long Version { get; }
Property Value
Type | Description |
---|---|
long |
Methods
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |
Overrides
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 |
---|---|---|
string | str | The string to parse. |
IdentifierTriple | idTriple | The identifier triple. |
Returns
Type | Description |
---|---|
bool |
|
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 |
---|---|
bool |
|
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 |
---|---|
bool |
|
Operators
operator ==(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 |
---|---|
bool | The result of the operator. |
explicit operator IdentifierTriple(string)
Convert a string to an identifier triple
Declaration
public static explicit operator IdentifierTriple(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id |
Returns
Type | Description |
---|---|
IdentifierTriple |
operator !=(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 |
---|---|
bool | The result of the operator. |