Table of Contents

Interface IFetchResult

Namespace
PushTechnology.ClientInterface.Client.Features
Assembly
Diffusion.Client.dll

The results from a fetch operation issued to the server.

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.

int Count { get; }

Property Value

int

The number of results.

HasMore

Indicates whether the fetch could have returned more results.

bool HasMore { get; }

Property Value

bool

true if more results could have been returned, otherwise false.

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'.");
}

Remarks

The fetch could have returned more results if it had not been constrained by the First(int), Last(int) or MaximumResultSize(int) limits.

IsEmpty

Returns true if Results contains zero elements.

bool IsEmpty { get; }

Property Value

bool

true if the IFetchRequest did not produce results.

Results

Gets the results from the fetch operation.

IReadOnlyCollection<ITopicResult> Results { get; }

Property Value

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.