Table of Contents

Namespace TypedRest.CommandLine.Commands.Reactive

Commands for operating on TypedRest.Endpoints.Reactive.

Note

These commands require the TypedRest.Reactive package.

Just as the reactive endpoints extend their pull-based counterparts, these commands extend the element and collection commands with one extra verb each. Everything else keeps working as before, so the same command can both fetch the current state and follow it live.

myapp jobs 1337        # read the job once
myapp jobs 1337 poll   # keep printing it as it changes
myapp messages stream  # print messages as they are appended
myapp messages stream 5

The trailing argument of stream is the index to start from; a negative value counts back from the end of the collection.

Output goes through a StreamPrinter<TEntity>, which subscribes to the endpoint's observable and prints entities as they arrive, running until the server ends the stream or the user aborts. Override OutputEntitiesAsync() to render the stream differently, e.g. as a continuously updated table.

Classes

PollingCommand<TEntity>

Command operating on an IPollingEndpoint<TEntity>.

StreamingCollectionCommand<TEntity>

Command operating on a IStreamingCollectionEndpoint<TEntity>.

StreamingCollectionCommand<TEntity, TElementEndpoint, TElementCommand>

Command operating on a IStreamingCollectionEndpoint<TEntity, TElementEndpoint>.

StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>

Command operating on a IStreamingCollectionEndpoint<TEntity, TElementEndpoint>.

StreamingCommand<TEntity, TEndpoint>

Command operating on a IStreamingEndpoint<TEntity>.