public static void MakeSymmetricJson(this BehaviorChain chain)
        {
            chain.RemoveConneg();
            chain.ApplyConneg();

            chain.AlterConnegInput(x => x.JsonOnly());
            chain.AlterConnegOutput(x => x.JsonOnly());
        }
Example #2
0
        public static void MakeAsymmetricJson(this BehaviorChain chain)
        {
            chain.RemoveConneg();
            chain.ApplyConneg();

            chain.ConnegInputNode().UseFormatter <JsonFormatter>();

            chain.AlterConnegOutput(x => x.JsonOnly());
        }
 public static void UseFormatter <T>(this BehaviorChain chain) where T : IFormatter
 {
     chain.AlterConnegInput(node => node.UseFormatter <T>());
     chain.AlterConnegOutput(node => node.UseFormatter <T>());
 }