Table of Contents

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
Object
CorrelationId
Implements
IEquatable<ValueObject>
IEquatable<SingleValueObject<String>>
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

value Guid

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

value String

The System.String value to assign the role of CorrelationId.

Exceptions

System.ArgumentNullException

value cannot be null.

System.ArgumentException

value cannot be empty or consist only of white-space characters.

System.ArgumentOutOfRangeException

value contained one or more white-space characters -or- value was less than 32 characters -or- value was greater than 128 characters -or- value consist 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

value Guid

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

value String

The value to convert.

Returns

CorrelationId

A CorrelationId that is equivalent to value.

See Also