Esempio n. 1
0
        public void Modify(BehaviorChain chain)
        {
            var outputType = OutputType();


            if (outputType == null)
            {
                return;
            }

            if (outputType.CanBeCastTo <FubuContinuation>() || outputType.CanBeCastTo <IRedirectable>())
            {
                AddAfter(new ContinuationNode());
            }
        }
Esempio n. 2
0
        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));
            }
        }
Esempio n. 3
0
 public static bool AnyActionHasAttribute <T>(this BehaviorChain chain) where T : Attribute
 {
     return(chain.OfType <ActionCall>().Any(x => x.HasAttribute <T>()));
 }