Table of Contents

Class MessageSchema

Namespace
AnyProtocol.Abstraction
Assembly
AnyProtocol.Abstraction.dll

Describes one immutable, versioned message schema.

public sealed record MessageSchema : IEquatable<MessageSchema>
Inheritance
MessageSchema
Implements
Inherited Members

Constructors

MessageSchema(string, int, string, string, string, DateTimeOffset)

Describes one immutable, versioned message schema.

public MessageSchema(string Subject, int Version, string Format, string Definition, string Fingerprint, DateTimeOffset RegisteredAt)

Parameters

Subject string

The stable contract or event subject.

Version int

The monotonically increasing subject version.

Format string

The schema format understood by a compatibility checker.

Definition string

The provider-neutral schema definition.

Fingerprint string

The SHA-256 fingerprint of the definition.

RegisteredAt DateTimeOffset

The UTC registration timestamp.

Properties

Definition

The provider-neutral schema definition.

public string Definition { get; init; }

Property Value

string

Fingerprint

The SHA-256 fingerprint of the definition.

public string Fingerprint { get; init; }

Property Value

string

Format

The schema format understood by a compatibility checker.

public string Format { get; init; }

Property Value

string

RegisteredAt

The UTC registration timestamp.

public DateTimeOffset RegisteredAt { get; init; }

Property Value

DateTimeOffset

Subject

The stable contract or event subject.

public string Subject { get; init; }

Property Value

string

Version

The monotonically increasing subject version.

public int Version { get; init; }

Property Value

int

Methods

Deconstruct(out string, out int, out string, out string, out string, out DateTimeOffset)

public void Deconstruct(out string Subject, out int Version, out string Format, out string Definition, out string Fingerprint, out DateTimeOffset RegisteredAt)

Parameters

Subject string
Version int
Format string
Definition string
Fingerprint string
RegisteredAt DateTimeOffset

Equals(MessageSchema?)

public bool Equals(MessageSchema? other)

Parameters

other MessageSchema

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(MessageSchema?, MessageSchema?)

public static bool operator ==(MessageSchema? left, MessageSchema? right)

Parameters

left MessageSchema
right MessageSchema

Returns

bool

operator !=(MessageSchema?, MessageSchema?)

public static bool operator !=(MessageSchema? left, MessageSchema? right)

Parameters

left MessageSchema
right MessageSchema

Returns

bool