Skip to main content

Orkes Conductor CSharp SDK

Orkes Conductor CSharp SDK is maintained here: https://github.com/conductor-sdk/conductor-csharp

Setup Conductor C# Package

dotnet add package conductor-csharp

Initialization

Everything related to server settings should be done within the Configuration class by setting the required parameter (when initializing an object) like this:

using Conductor.Api;
using Conductor.Client;
using Conductor.Client.Authentication;

var configuration = new Configuration() {
BasePath = basePath,
AuthenticationSettings = null
};

var workflowClient = configuration.GetClient<WorkflowResourceApi>();

Authentication Settings (optional)

See Security via Applications or this video for details on how to get an access key and secret.

Once we have a key and secret, we can configure the app from properties or environment variables, as shown in this example:

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>();

Remember to protect your app secrets like any other secrets or passwords.