Class ContentId
Canonical ASCII lowercase owner:local identity. Never use a hash as a saved identity.
public sealed class ContentId : IEquatable<ContentId>
- Inheritance
-
ContentId
- Implements
- Inherited Members
Properties
LocalName
public string LocalName { get; }
Property Value
Namespace
public string Namespace { get; }
Property Value
Methods
Equals(ContentId?)
public bool Equals(ContentId? other)
Parameters
otherContentId
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
IsOwnedBy(string)
public bool IsOwnedBy(string owner)
Parameters
ownerstring
Returns
Parse(string)
Parses a canonical owner-qualified content ID.
public static ContentId Parse(string text)
Parameters
textstringAn ID such as
author.mod:flame_cleave.
Returns
- ContentId
The normalized lowercase content ID.
Exceptions
- FormatException
The value does not satisfy the content-ID grammar.
ToString()
public override string ToString()
Returns
TryParse(string?, out ContentId?, out string?)
Attempts to parse and normalize an owner-qualified content ID without throwing for invalid syntax.
public static bool TryParse(string? text, out ContentId? id, out string? error)
Parameters
textstringCandidate owner-qualified ID.
idContentIdThe parsed ID when successful.
errorstringA validation explanation when unsuccessful.
Returns
Operators
operator ==(ContentId?, ContentId?)
public static bool operator ==(ContentId? left, ContentId? right)
Parameters
Returns
operator !=(ContentId?, ContentId?)
public static bool operator !=(ContentId? left, ContentId? right)