a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
2.7 KiB
2.7 KiB
description
| description |
|---|
| Build Conductor workers in C#/.NET with dependency injection, workflow management, and task polling. |
C# SDK
!!! info "Source" GitHub: conductor-oss/csharp-sdk | Report issues and contribute on GitHub.
⭐ Conductor OSS
Show support for the Conductor OSS. Please help spread the awareness by starring Conductor repo.
Setup Conductor C# Package
dotnet add package conductor-csharp
Configurations
Authentication Settings (Optional)
Configure the authentication settings if your Conductor server requires authentication.
- keyId: Key for authentication.
- keySecret: Secret for the key.
authenticationSettings: new OrkesAuthenticationSettings(
KeyId: "key",
KeySecret: "secret"
)
Access Control Setup
See Access Control for more details on role-based access control with Conductor and generating API keys for your environment.
Configure API Client
using Conductor.Api;
using Conductor.Client;
using Conductor.Client.Authentication;
var configuration = new Configuration() {
BasePath = basePath,
AuthenticationSettings = new OrkesAuthenticationSettings("keyId", "keySecret")
};
var workflowClient = configuration.GetClient<WorkflowResourceApi>();
workflowClient.StartWorkflow(
name: "test-sdk-csharp-workflow",
body: new Dictionary<string, object>(),
version: 1
)
Next: Create and run task workers
Examples
Browse all examples on GitHub: conductor-oss/csharp-sdk/csharp-examples
| Example | Type |
|---|---|
| Examples | directory |
| Humantaskexamples | file |
| Program | file |
| Runner | file |
| Testworker | file |
| Utils | directory |
| Workflowexamples | file |