Class SemanticTag

Namespace
Kuestenlogik.Bowire.Semantics
Assembly
Kuestenlogik.Bowire.dll

Strongly-typed wrapper around the namespaced kind-string that names the semantic meaning of a schema field ("coordinate.latitude", "image.bytes", …).

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

Remarks

The set of valid values is open — extension authors register their own kinds at runtime — so this type does not constrain to a closed enum. What it does provide is type-safety on the wire (no random string can be confused for a semantic tag) and a single catalogue of the well-known kinds the framework ships with under BuiltInSemanticTags.

The special tag None (kind-string "none") is a real value, not a separate suppression flag: the resolver treats it as "the user explicitly said this is NOT something" and lets it override any auto-detector proposal beneath. IsNone distinguishes the suppression case from any other tag.

Constructors

SemanticTag(string)

Strongly-typed wrapper around the namespaced kind-string that names the semantic meaning of a schema field ("coordinate.latitude", "image.bytes", …).

public SemanticTag(string Kind)

Parameters

Kind string

Namespaced kind-string. Conventionally dotted (family.subkind) but the framework only requires a non-empty case-sensitive identifier; the dot is convention, not syntax.

Remarks

The set of valid values is open — extension authors register their own kinds at runtime — so this type does not constrain to a closed enum. What it does provide is type-safety on the wire (no random string can be confused for a semantic tag) and a single catalogue of the well-known kinds the framework ships with under BuiltInSemanticTags.

The special tag None (kind-string "none") is a real value, not a separate suppression flag: the resolver treats it as "the user explicitly said this is NOT something" and lets it override any auto-detector proposal beneath. IsNone distinguishes the suppression case from any other tag.

Properties

IsNone

True when this tag is the explicit-suppression value None.

public bool IsNone { get; }

Property Value

bool

Kind

Namespaced kind-string. Conventionally dotted (family.subkind) but the framework only requires a non-empty case-sensitive identifier; the dot is convention, not syntax.

public string Kind { get; init; }

Property Value

string

Methods

Deconstruct(out string)

public void Deconstruct(out string Kind)

Parameters

Kind string

Equals(SemanticTag?)

public bool Equals(SemanticTag? other)

Parameters

other SemanticTag

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 ==(SemanticTag?, SemanticTag?)

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

Parameters

left SemanticTag
right SemanticTag

Returns

bool

operator !=(SemanticTag?, SemanticTag?)

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

Parameters

left SemanticTag
right SemanticTag

Returns

bool