Class LinksOperation
The established uint operation facade over selected-address protocol algorithms.
public abstract record LinksOperation : IEquatable<LinksOperation>
- Inheritance
-
LinksOperation
- Implements
- Derived
- Inherited Members
Methods
ChangesDocument(IEnumerable<(Link<uint> Before, Link<uint> After)>)
public static IReadOnlyList<Link<string>> ChangesDocument(IEnumerable<(Link<uint> Before, Link<uint> After)> changes)
Parameters
changesIEnumerable<(Link<uint> Before, Link<uint> After)>
Returns
- IReadOnlyList<Link<string>>
Execute(INamedTypesLinks<uint>)
public IReadOnlyList<Link<string>> Execute(INamedTypesLinks<uint> links)
Parameters
linksINamedTypesLinks<uint>
Returns
- IReadOnlyList<Link<string>>
FromDocument(IReadOnlyList<Link<string>>)
public static LinksOperation? FromDocument(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
IsNotification(IReadOnlyList<Link<string>>)
Whether document is a push rather than a reply: its first link is (notify: N).
public static bool IsNotification(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
Remarks
No reply starts that way: the replies to operations name their first link after the operation's result or
leave it unnamed, and the links a server lists are (index: source target), with two values.
LinkLino(Link<uint>)
public static Link<string> LinkLino(Link<uint> link)
Parameters
linkLink<uint>
Returns
- Link<string>
NotificationDocument(uint, IEnumerable<(Link<uint> Before, Link<uint> After)>)
A push: (notify: N) followed by one (before) (after) line per change, with plain numbers.
public static IReadOnlyList<Link<string>> NotificationDocument(uint subscription, IEnumerable<(Link<uint> Before, Link<uint> After)> changes)
Parameters
Returns
- IReadOnlyList<Link<string>>
ParseChanges(IReadOnlyList<Link<string>>)
public static IReadOnlyList<(Link<uint> Before, Link<uint> After)> ParseChanges(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
- IReadOnlyList<(Link<uint> Before, Link<uint> After)>
ParseCount(IReadOnlyList<Link<string>>)
public static uint ParseCount(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
ParseLinkReply(IReadOnlyList<Link<string>>)
public static uint? ParseLinkReply(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
- uint?
ParseLinks(IReadOnlyList<Link<string>>)
public static IReadOnlyList<Link<uint>> ParseLinks(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
- IReadOnlyList<Link<uint>>
ParseName(IReadOnlyList<Link<string>>)
public static string? ParseName(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
ParseNotification(IReadOnlyList<Link<string>>)
The subscription and the changes of a NotificationDocument(uint, IEnumerable<(Link<uint> Before, Link<uint> After)>).
public static LinksNotification ParseNotification(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
ParseSubscription(IReadOnlyList<Link<string>>)
The number of a (subscription: N) reply.
public static uint ParseSubscription(IReadOnlyList<Link<string>> document)
Parameters
documentIReadOnlyList<Link<string>>
Returns
SubscriptionDocument(uint)
The reply to a LinksOperation.Subscribe: (subscription: N).
public static IReadOnlyList<Link<string>> SubscriptionDocument(uint subscription)
Parameters
subscriptionuint
Returns
- IReadOnlyList<Link<string>>
ToDocument()
public IReadOnlyList<Link<string>> ToDocument()
Returns
- IReadOnlyList<Link<string>>