public void Modify(BehaviorChain chain) { var outputType = OutputType(); if (outputType == null) { return; } if (outputType.CanBeCastTo <FubuContinuation>() || outputType.CanBeCastTo <IRedirectable>()) { AddAfter(new ContinuationNode()); } }
public void Modify(BehaviorChain chain) { var outputType = OutputType(); if (outputType == null) { return; } if (outputType.CanBeCastTo <FubuContinuation>() || outputType.CanBeCastTo <IRedirectable>()) { AddAfter(new ContinuationNode()); } if (IsAsync) { AddAfter(outputType == typeof(Task) ? new AsyncContinueWithNode() : new AsyncContinueWithNode(outputType)); } }
public static bool AnyActionHasAttribute <T>(this BehaviorChain chain) where T : Attribute { return(chain.OfType <ActionCall>().Any(x => x.HasAttribute <T>())); }