Skip to content

Commit

Permalink
empty Do block check
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgerlag committed Apr 28, 2018
1 parent eaae735 commit d0cb88d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ public ParallelStepBuilder(IWorkflowBuilder<TData> workflowBuilder, IStepBuilder

public IParallelStepBuilder<TData, TStepBody> Do(Action<IWorkflowBuilder<TData>> builder)
{
int lastStep = WorkflowBuilder.LastStep;
builder.Invoke(WorkflowBuilder);
var lastStep = WorkflowBuilder.LastStep;
builder.Invoke(WorkflowBuilder);

if (lastStep == WorkflowBuilder.LastStep)
throw new NotSupportedException("Empty Do block not supported");

Step.Children.Add(lastStep + 1); //TODO: make more elegant

return this;
Expand Down
7 changes: 3 additions & 4 deletions src/WorkflowCore/WorkflowCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<AssemblyTitle>Workflow Core</AssemblyTitle>
<VersionPrefix>1.4.0</VersionPrefix>
<Authors>Daniel Gerlag</Authors>
<TargetFramework>netstandard1.3</TargetFramework>
<AssemblyName>WorkflowCore</AssemblyName>
Expand All @@ -16,9 +15,9 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Description>Workflow Core is a light weight workflow engine targeting .NET Standard.</Description>
<Version>1.6.1</Version>
<AssemblyVersion>1.6.1.0</AssemblyVersion>
<FileVersion>1.6.1.0</FileVersion>
<Version>1.6.2</Version>
<AssemblyVersion>1.6.2.0</AssemblyVersion>
<FileVersion>1.6.2.0</FileVersion>
<PackageReleaseNotes></PackageReleaseNotes>
</PropertyGroup>

Expand Down

0 comments on commit d0cb88d

Please sign in to comment.