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