Exemplo n.º 1
0
 public bool Equals(ConnegInputNode other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.InputType.Equals(InputType));
 }
        // This should not do anything if there are conneg nodes
        public static void ApplyConneg(this BehaviorChain chain)
        {
            var inputType = chain.InputType();

            if (chain.ConnegInputNode() == null && inputType != null)
            {
                var inputNode = new ConnegInputNode(inputType);
                var action    = chain.FirstCall();
                action.AddBefore(inputNode);
            }

            var actionOutputType = chain.ActionOutputType();

            if (chain.ConnegOutputNode() == null && actionOutputType != null && actionOutputType != typeof(void) && actionOutputType != typeof(HttpStatusCode))
            {
                var outputNode = new ConnegOutputNode(actionOutputType);
                var action     = chain.Last(x => x is ActionCall);
                action.AddAfter(outputNode);
            }
        }
Exemplo n.º 3
0
 public bool Equals(ConnegInputNode other)
 {
     if (other == null) return false;
     return other.InputType.Equals(InputType);
 }