Exemple #1
0
 public CamundaWorkersBuilder SetProperties(Func <IConfiguration> configuration)
 {
     Properties    = PropertiesUtils.Create <TProperties>(configuration()) ?? throw CamundaWorkersBuilderException.PropertiesAreEmpty();
     CamundaClient = new SyrinxCamundaClientService(Properties.SyrinxProperties);
     ServiceCollection.AddScoped(factory => CamundaClient);
     return(this);
 }
Exemple #2
0
        static void Main(string[] args)
        {
            var environment   = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
            var configuration = ConfigurationUtils.GetEnvironmentConfiguration(environment);
            var properties    = PropertiesUtils.Create <ProjectProperties>(configuration);

            ConsoleApplicationUtils.Launch(() => DatabaseMigrationUtils.Perform(args, properties.DatabaseConnectionProperties, typeof(Program).Assembly));
        }
 public static void SetupProperties <TProperties>(this IServiceCollection services, IConfiguration configuration) where TProperties : class, IPropertiesMarker, new()
 {
     services.AddSingleton(factory => PropertiesUtils.Create <TProperties>(configuration));
 }