conductor-csharp
conductor-csharp copied to clipboard
Using the SDK should not require configuration values (CONDUCTOR_SERVER_URL etc) to be predefined in environment variables
Currently the SDK requires configuration values CONDUCTOR_SERVER_URL, KEY and SECRET to be predefined in environment variables, even though I use other means like my own configuration or code to specify those values in code.
To reproduce just create new .net console project, add conductor sdk package to it, and try to connect to local conductor server like this:
var conf = new Configuration
{
BasePath = "http://localhost:5000/api",
};
var host = WorkflowTaskHost.CreateWorkerHost(conf, LogLevel.Information);
await host.StartAsync();
You get an error "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Conductor.Client.Extensions.ApiExtensions' threw an exception."