コード例 #1
0
ファイル: ConnegInputNode.cs プロジェクト: rmueller/fubumvc
 public bool Equals(ConnegInputNode other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.InputType.Equals(InputType));
 }
コード例 #2
0
        // 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);
            }
        }
コード例 #3
0
ファイル: ConnegInputNode.cs プロジェクト: jemacom/fubumvc
 public bool Equals(ConnegInputNode other)
 {
     if (other == null) return false;
     return other.InputType.Equals(InputType);
 }