NetTemporal.Client.Core
1.0.0
dotnet add package NetTemporal.Client.Core --version 1.0.0
NuGet\Install-Package NetTemporal.Client.Core -Version 1.0.0
<PackageReference Include="NetTemporal.Client.Core" Version="1.0.0" />
<PackageVersion Include="NetTemporal.Client.Core" Version="1.0.0" />
<PackageReference Include="NetTemporal.Client.Core" />
paket add NetTemporal.Client.Core --version 1.0.0
#r "nuget: NetTemporal.Client.Core, 1.0.0"
#:package NetTemporal.Client.Core@1.0.0
#addin nuget:?package=NetTemporal.Client.Core&version=1.0.0
#tool nuget:?package=NetTemporal.Client.Core&version=1.0.0
Temporal.Client.Core
A .NET 8 wrapper around the Temporal.io SDK that provides a clean, DI-friendly abstraction for managing workflows — starting them, sending signals, executing updates, and querying state — with minimal boilerplate.
Installation
dotnet add package NetTemporal.Client.Core
Configuration
Add your Temporal connection settings to appsettings.json:
{
"TemporalConfig": {
"ServerAddress": "localhost:7233",
"Namespace": "default",
"ApiKey": ""
}
}
| Property | Description | Required |
|---|---|---|
ServerAddress |
Temporal server host and port | Yes |
Namespace |
Temporal namespace (defaults to "default") |
No |
ApiKey |
API key for Temporal Cloud or secured deployments | No |
Registration
Call AddTemporalClientCore in your Program.cs or Startup.cs:
builder.Services.AddTemporalClientCore(builder.Configuration);
This registers:
ITemporalClientas a singleton (connected on startup)ITemporalClientServiceas a scoped service
Usage
Inject ITemporalClientService wherever you need it:
public class OrderService(ITemporalClientService temporal)
{
// ...
}
Start a workflow with an initial signal
await temporal.StartWorkflowAsync(new TemporalSignalRequest
{
WorkflowId = "order-123",
WorkflowName = "OrderWorkflow",
TaskQueue = "order-queue",
SignalName = "OrderReceived",
Data = new { OrderId = "123", Amount = 99.99 },
MetaData = null // optional workflow constructor args
});
Send a signal to a running workflow
await temporal.SendSignalAsync(new TemporalSignalRequest
{
WorkflowId = "order-123",
WorkflowName = "OrderWorkflow",
TaskQueue = "order-queue",
SignalName = "PaymentConfirmed",
Data = new { TransactionId = "txn-456" }
});
Execute a workflow update
var result = await temporal.UpdateWorkflowStateAsync<UpdateInput, UpdateResult>(
workflowId: "order-123",
updateName: "ApplyDiscount",
data: new UpdateInput { DiscountPercent = 10 }
);
Query workflow execution history
var history = await temporal.GetWorkflowStateAsync("order-123");
Returns a GetWorkflowExecutionHistoryResponse? (from the Temporal gRPC API), or null if the workflow is not found.
Check and resume a failed workflow
bool isFailed = await temporal.IsWorkflowFailedAsync("order-123");
if (isFailed)
{
await temporal.ResumeFailedWorkflowAsync("order-123");
}
ResumeFailedWorkflowAsync sends a ResumeWorkflow signal only if the workflow is currently in a failed state.
RemoveWorkflowFromFailedStateAsync sends the same signal unconditionally (no state check).
API Reference
TemporalSignalRequest
| Property | Type | Required | Description |
|---|---|---|---|
WorkflowId |
string |
Yes | Unique identifier of the workflow |
WorkflowName |
string |
Yes | Registered workflow type name |
TaskQueue |
string |
Yes | Task queue the worker is polling on |
SignalName |
string |
Yes | Name of the signal or start signal |
Data |
object? |
No | Signal or update payload |
MetaData |
IReadOnlyCollection<object?>? |
No | Workflow constructor arguments |
ITemporalClientService
| Method | Description |
|---|---|
StartWorkflowAsync(request) |
Starts a new workflow execution with an initial signal |
SendSignalAsync(request) |
Sends a signal to an existing running workflow |
UpdateWorkflowStateAsync<TInput, TResult>(workflowId, updateName, data) |
Executes a synchronous update on a running workflow |
GetWorkflowStateAsync(workflowId) |
Returns the full execution history of a workflow |
IsWorkflowFailedAsync(workflowId) |
Returns true if the workflow has a failed execution event |
ResumeFailedWorkflowAsync(workflowId) |
Sends ResumeWorkflow signal only when workflow is in failed state |
RemoveWorkflowFromFailedStateAsync(workflowId) |
Sends ResumeWorkflow signal unconditionally |
Requirements
- .NET 8.0+
- A running Temporal server or Temporal Cloud account
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.4)
- Temporalio (>= 1.11.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 108 | 5/8/2026 |