Exemple #1
0
        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));
            }
        }
Exemple #3
0
 public static bool AnyActionHasAttribute <T>(this BehaviorChain chain) where T : Attribute
 {
     return(chain.OfType <ActionCall>().Any(x => x.HasAttribute <T>()));
 }