DurableWorkDefinition<SampleWork, SampleWorkResult> Definition { get; }
Source
Gets the one definition shared by registration and request construction.
Executes the deterministic sample without performing an external side effect.
Input persisted by the starter's application-owned typed Work contract.
Value
Deterministic result stored when the sample executor reaches a successful terminal state.
Value
Source-generated JSON metadata used by the durable input and result codecs.
Defines the immutable name, version, codecs, safety classification, and retry policy for the sample Work.
SystemTextJsonDurablePayloadCodec<SampleWork> CreateWorkCodec()
Creates the bounded, source-generated JSON input codec used by this contract.
A codec with the stable sample input identity and a 1 KiB encoded-payload limit.
SystemTextJsonDurablePayloadCodec<SampleWorkResult> CreateResultCodec()
Creates the bounded, source-generated JSON result codec used by this contract.
A codec with the stable sample result identity and a 1 KiB encoded-payload limit.
DurableWorkDefinition<SampleWork, SampleWorkResult> Definition { get; }
Source
Gets the one definition shared by registration and request construction.
Accepts typed sample Work through the public Durable client without coupling producers to activation HTTP.
ValueTask<DurableOperationResult<DurableWorkAcceptance>> AcceptAsync(SampleWork work, DurableCommandId commandId, string idempotencyKey, CancellationToken cancellationToken = default)
Persists one caller-identified sample request.
work
commandId
idempotencyKey
cancellationToken
The provider's typed acceptance result; acceptance does not mean the Work reached a terminal state.
The producer uses the one registered definition, its captured codecs and retry policy, and the fixed sample scope. Activation remains a separate payload-free HTTP wake. The application owns command identity and idempotency-key lifetime; changing either on retry can create a distinct durable request.
Registers the single sample Work contract and executor with an application service collection.
IServiceCollection AddSampleWork(this IServiceCollection services)
Adds the sample definition and its deterministic executor.
services
The same service collection for further application composition.
ArgumentNullException
services
is null.