Struct KeyringReference

Namespace
Kuestenlogik.Bowire.Keyring
Assembly
Kuestenlogik.Bowire.Keyring.dll

A parsed {{keyring.service/account}} reference. The text after the keyring. prefix is split on the first slash into a mandatory Service and an optional Account; a bare {{keyring.service}} leaves Account null, which each backend maps to "any account under this service".

public readonly struct KeyringReference : IEquatable<KeyringReference>
Implements
Inherited Members

Remarks

Splitting on the first slash (rather than the last) keeps the common service/account shape unambiguous while still allowing a service name that itself contains slashes — e.g. {{keyring.https://api.example.com/deploy-bot}} parses to service https://api.example.com, account deploy-bot. Callers that need a slash in the account can percent-encode it; the store lookups treat the decoded strings opaquely.

Constructors

KeyringReference(string, string?)

A parsed {{keyring.service/account}} reference. The text after the keyring. prefix is split on the first slash into a mandatory Service and an optional Account; a bare {{keyring.service}} leaves Account null, which each backend maps to "any account under this service".

public KeyringReference(string Service, string? Account)

Parameters

Service string
Account string

Remarks

Splitting on the first slash (rather than the last) keeps the common service/account shape unambiguous while still allowing a service name that itself contains slashes — e.g. {{keyring.https://api.example.com/deploy-bot}} parses to service https://api.example.com, account deploy-bot. Callers that need a slash in the account can percent-encode it; the store lookups treat the decoded strings opaquely.

Properties

Account

public string? Account { get; init; }

Property Value

string

Service

public string Service { get; init; }

Property Value

string

Methods

Deconstruct(out string, out string?)

public void Deconstruct(out string Service, out string? Account)

Parameters

Service string
Account string

Equals(KeyringReference)

public bool Equals(KeyringReference other)

Parameters

other KeyringReference

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

TryParse(string, out KeyringReference)

Parse the portion of a placeholder key that follows the keyring. prefix. Returns false for an empty or whitespace-only reference so the caller leaves the placeholder intact instead of issuing a meaningless empty-service lookup.

public static bool TryParse(string reference, out KeyringReference parsed)

Parameters

reference string
parsed KeyringReference

Returns

bool

Operators

operator ==(KeyringReference, KeyringReference)

public static bool operator ==(KeyringReference left, KeyringReference right)

Parameters

left KeyringReference
right KeyringReference

Returns

bool

operator !=(KeyringReference, KeyringReference)

public static bool operator !=(KeyringReference left, KeyringReference right)

Parameters

left KeyringReference
right KeyringReference

Returns

bool