Skip to main content

Example catalogue

Every file in the Examples folder is runnable. Use them as living documentation and copy the patterns that match your scenario.

ExampleWhat it demonstrates
Program.csEntry point that chains multiple demos together. Inspect it to see how each scenario is executed.
FunctionCallStateExampleClassic activity chaining pattern with retry-friendly context.CallAsync calls and replay-safe logging.
AutoRegistrationExampleAttribute-based discovery with [Function], [OrchestrationTrigger], and [FunctionTrigger] so you can register entire assemblies via reflection.
SimpleTypedOrchestratorDemoTyped orchestrators, typed inputs, and replay-safe logging via context.GetLogger().
ExternalEventsExampleHuman approval workflow that waits for external events and demonstrates event queuing.
TimerOrchestrationExampleDurable timers for reminders and long sleeps.
SubOrchestratorExampleParent orchestrator delegating work to sub-orchestrators and aggregating results.
SqliteExampleParallel activity execution, activity result tracking, and querying state directly from the store.
ConcurrentExampleMulti-host execution against a shared SQLite database, showcasing lease acquisition and renewal.
MetricsExampleWiring the OpenTelemetry meter to Prometheus and emitting orchestration metrics.
OpenTelemetryCollectorExampleShipping traces to an OpenTelemetry Collector and exporting them to Jaeger/OTLP.
AzureCompatibilityExampleRunning the Azure adapter side-by-side with the core runtime so existing tooling continues to work.
OrchestrationClientExampleUsing IOrchestrationClient and the Azure-compatible adapter via dependency injection.
DisposableLeaseExampleImplementing temporary exclusive access to resources from within orchestrations using the lease helpers.
ChaosEngineeringExample(Conditional build) Fault injection and recovery patterns to test resilience.
WebApiExample and FullFeaturedWebAppExampleEnd-to-end ASP.NET Core hosting, management API routing, and dependency injection setup.

Clone the Asynkron.DurableFunctions.Public repository and run dotnet run --project Examples to explore these scenarios locally.