Interface IFetchResult
The results from a fetch operation issued to the server.
Namespace: PushTechnology.ClientInterface.Client.Features
Assembly: Diffusion.Client.dll
Syntax
public interface IFetchResult
Remarks
A fetch operation is issued using FetchAsync(String) which will return a result of
this type via a Task
.
Properties
Count
Gets the number of elements contained in Results.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
Int32 | The number of results. |
HasMore
Indicates whether the fetch could have returned more results.
Declaration
bool HasMore { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
The fetch could have returned more results if it had not been constrained by the First(Int32), Last(Int32) or MaximumResultSize(Int32) limits.
Examples
A fetch that requests no results can be used together with this method to query whether there are topics that match the selector details of any of the topics.
var fetchResult = await topics.FetchRequest.First( 0 ).FetchAsync( "?x//" );
if (fetchResult.HasMore) {
Console.WriteLine("There are topics in branch 'x'.");
}
IsEmpty
Returns true
if Results contains zero elements.
Declaration
bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Results
Gets the results from the fetch operation.
Declaration
IReadOnlyCollection<ITopicResult> Results { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<ITopicResult> | The read-only list of topic results, each representing a single topic selected by the fetch operation. |
Remarks
Results are always returned in path order.