Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PubSubPageResult.cs
2{
3 using System;
6
10 public sealed class PubSubPageResult
11 {
12 public PubSubPageResult(string nodeId, PubSubItem[] items, ResultPage? page)
13 {
14 this.NodeId = nodeId;
15 this.Items = items ?? Array.Empty<PubSubItem>();
16 this.ResultPage = page;
17 }
18
19 public string NodeId { get; }
20
21 public PubSubItem[] Items { get; }
22
23 public ResultPage? ResultPage { get; }
24
25 public bool HasItems => this.Items.Length > 0;
26
27 public string? FirstItemId => this.ResultPage?.First;
28
29 public string? LastItemId => this.ResultPage?.Last;
30
31 public int? TotalCount => this.ResultPage?.Count;
32
33 public int? FirstIndex => this.ResultPage?.FirstIndex;
34 }
35}
Represents a page of PubSub items along with associated pagination metadata.
Represents a published item.
Definition: PubSubItem.cs:12
Contains information about a result page, as deinfed in XEP-0059: Result Set Management
Definition: ResultPage.cs:11
string Last
Last item/key in response.
Definition: ResultPage.cs:56
string First
First item/key in response.
Definition: ResultPage.cs:51
int? Count
Total number of items in result set.
Definition: ResultPage.cs:61