Skip to content

PersistentStreamProvider Methods

Persistent stream provider that uses an adapter for persistence

Create(IServiceProvider, string)

static
View source
public static IStreamProvider Create(IServiceProvider services, string name)
Creates a persistent stream provider.

Parameters

servicesIServiceProvider
The service provider.
namestring
The stream provider name.

Returns

The persistent stream provider.

ExecuteCommand(int, object?)

View source
public Task<object?> ExecuteCommand(int command, object? arg)
A function to execute a control command.

Parameters

commandint
A serial number of the command.
argobject?
An opaque command argument.

Returns

The value returned from the command handler.

GetStream(StreamId)

View source
public IAsyncStream<T> GetStream<T>(StreamId streamId)
Gets the stream with the specified identity.

Parameters

streamIdStreamId
The stream identifier.

Returns

The stream.

ParticipateIn(IServiceProvider, string)

static
View source
public static ILifecycleParticipant<TLifecycle> ParticipateIn<TLifecycle>(IServiceProvider serviceProvider, string name)
Gets the named persistent stream provider as a participant in the specified lifecycle.

Parameters

serviceProviderIServiceProvider
The service provider.
namestring
The stream provider name.

Returns

The lifecycle participant for the named stream provider.