* Restructuring (WIP) * Fix warnings * Move DSL to modules * Update namespaces * Make design factory base reusable * Update service registrations * Remove unused namespaces and rename ElsaDbContext * Incremental work on migrations * Generate WorkflowsDbContext SQLite migrations * Rename ServiceCollectionExtensions * Update DbContextOptionsBuilderExtensions.cs * Restructure * Configuration refactorings (WIP) * Incremental work on configurator API * Incremental work on configuration API * Incremental work on configuration API * Fix workflow runtime options * Move standard stream providers * Implement configurator dependencies * Cleanup configurator API * Update configurator dependencies * Cleanup * Update Label API endpoints * Fix eager configuration issue
24 lines
562 B
C#
24 lines
562 B
C#
using System;
|
|
using Elsa.Workflows.Core.Activities;
|
|
using Elsa.Workflows.Core.Services;
|
|
|
|
namespace Elsa.IntegrationTests.Activities;
|
|
|
|
public class IfThenWorkflow : WorkflowBase
|
|
{
|
|
private readonly Func<bool> _condition;
|
|
|
|
public IfThenWorkflow(Func<bool> condition)
|
|
{
|
|
_condition = condition;
|
|
}
|
|
|
|
protected override void Build(IWorkflowDefinitionBuilder workflow)
|
|
{
|
|
workflow.WithRoot(new If(_condition)
|
|
{
|
|
Then = new WriteLine("True!"),
|
|
Else = new WriteLine("False!")
|
|
});
|
|
}
|
|
} |