Table of Contents

Class ShelfOrigin<T>

Namespace
XENBIT.ResQueServe.Abstractions.Models
Assembly
RQS.Abstractions.dll

Represents a typed origin definition for a Shelf entity. Provides identifying information about the source and an optional version.

public record ShelfOrigin<T> : ShelfOriginBase, IEquatable<ShelfOriginBase>, IEquatable<ShelfOrigin<T>> where T : IComparable<T>

Type Parameters

T

The data type used for versioning (e.g., int, long, Guid, DateTimeOffset). Must implement IComparable<T>.

Inheritance
ShelfOrigin<T>
Implements
Inherited Members
Extension Methods

Constructors

ShelfOrigin(string, string, ShelfVersion<T>?)

Represents a typed origin definition for a Shelf entity. Provides identifying information about the source and an optional version.

public ShelfOrigin(string Namespace, string Id, ShelfVersion<T>? Version)

Parameters

Namespace string
Id string
Version ShelfVersion<T>

ShelfOrigin(ShelfOrigin<T>)

protected ShelfOrigin(ShelfOrigin<T> original)

Parameters

original ShelfOrigin<T>

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Id

public string Id { get; init; }

Property Value

string

Namespace

public string Namespace { get; init; }

Property Value

string

Version

public ShelfVersion<T>? Version { get; init; }

Property Value

ShelfVersion<T>

Methods

Deconstruct(out string, out string, out ShelfVersion<T>?)

public void Deconstruct(out string Namespace, out string Id, out ShelfVersion<T>? Version)

Parameters

Namespace string
Id string
Version ShelfVersion<T>

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(ShelfOriginBase?)

public override sealed bool Equals(ShelfOriginBase? other)

Parameters

other ShelfOriginBase

Returns

bool

Equals(ShelfOrigin<T>?)

public virtual bool Equals(ShelfOrigin<T>? other)

Parameters

other ShelfOrigin<T>

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

Returns a string representation in the format: {Namespace}:{Id} (v{Version}) if a version is available.

public override string ToString()

Returns

string

Operators

operator ==(ShelfOrigin<T>?, ShelfOrigin<T>?)

public static bool operator ==(ShelfOrigin<T>? left, ShelfOrigin<T>? right)

Parameters

left ShelfOrigin<T>
right ShelfOrigin<T>

Returns

bool

operator !=(ShelfOrigin<T>?, ShelfOrigin<T>?)

public static bool operator !=(ShelfOrigin<T>? left, ShelfOrigin<T>? right)

Parameters

left ShelfOrigin<T>
right ShelfOrigin<T>

Returns

bool