Class CorrelationId
- Namespace
- Codebelt.SharedKernel
- Assembly
- Codebelt.SharedKernel.dll
Represents a CorrelationId object that can be used as unique identifier that help you trace requests across multiple services in a distributed system.
public class CorrelationId : Token, IEquatable<ValueObject>, IEquatable<SingleValueObject<string>>, IEquatable<Token>, IEquatable<CorrelationId>- Inheritance
- 
      ObjectSingleValueObject<String>CorrelationId
- Implements
- 
      IEquatable<ValueObject>IEquatable<Token>IEquatable<CorrelationId>
- Inherited Members
- 
    
    SingleValueObject<String>.ToString()SingleValueObject<String>.PrintMembers(StringBuilder)SingleValueObject<String>.GetHashCode()SingleValueObject<String>.Equals(Object)SingleValueObject<String>.Equals(ValueObject)SingleValueObject<String>.Equals(SingleValueObject<String>)SingleValueObject<String>.<Clone>$()SingleValueObject<String>.EqualityContract
Remarks
Constructors
CorrelationId(Guid)
Initializes a new instance of the CorrelationId class.
public CorrelationId(Guid value)Parameters
- valueGuid
- The System.Guid value to assign the role of CorrelationId. 
CorrelationId(String)
Initializes a new instance of the CorrelationId class.
public CorrelationId(string value)Parameters
- valueString
- The System.String value to assign the role of CorrelationId. 
Exceptions
- System.ArgumentNullException
- valuecannot be null.
- System.ArgumentException
- valuecannot be empty or consist only of white-space characters.
- System.ArgumentOutOfRangeException
- valuecontained one or more white-space characters -or-- valuewas less than 32 characters -or-- valuewas greater than 128 characters -or-- valueconsist only of same repeated character.
Operators
Implicit(Guid to CorrelationId)
Performs an implicit conversion from System.Guid to CorrelationId.
public static implicit operator CorrelationId(Guid value)Parameters
- valueGuid
- The value to convert. 
Returns
- CorrelationId
- A CorrelationId that is equivalent to - value.
Implicit(String to CorrelationId)
Performs an implicit conversion from System.String to CorrelationId.
public static implicit operator CorrelationId(string value)Parameters
- valueString
- The value to convert. 
Returns
- CorrelationId
- A CorrelationId that is equivalent to - value.