public BlockResult <T> Complete(object overrideResult) { return(new BlockResult <T> { Target = new BlockResultTarget { FlowTarget = BlockFlowTarget.Complete, OverrideResult = Emptyable.Create(overrideResult) } }); }
public BlockResult <T> Retry(object overrideInput) { return(new BlockResult <T> { Target = new BlockResultTarget { FlowTarget = BlockFlowTarget.Retry, OverrideInput = Emptyable.Create(overrideInput) } }); }
public BlockResult <T> Goto(int index, object overrideInput) { return(new BlockResult <T> { Target = new BlockResultTarget { FlowTarget = BlockFlowTarget.Goto, TargetIndex = index, OverrideInput = Emptyable.Create(overrideInput) } }); }
public BlockResult <T> Goto(string tag, object overrideInput) { return(new BlockResult <T> { Target = new BlockResultTarget { FlowTarget = BlockFlowTarget.Goto, TargetTag = tag, OverrideInput = Emptyable.Create(overrideInput) } }); }
public BlockResult <T> Skip(int i, object overrideInput) { return(new BlockResult <T> { Target = new BlockResultTarget { FlowTarget = BlockFlowTarget.Skip, TargetIndex = i, OverrideInput = Emptyable.Create(overrideInput) } }); }
public IEmptyable ConvertTo(Type type) { if (!IsEmpty) { if (typeof(T) == type) { return(Emptyable.Create(value)); } else { return(Emptyable.Create(Convert.ChangeType(value, type))); } } else { return(Emptyable.Create(type)); } }