示例#1
0
 public RawMessage OnProduce(RawMessage rawMessage)
 {
     return(interceptors.AsEnumerable()
            .Aggregate(rawMessage, (x, y) => y.OnProduce(x)));
 }
示例#2
0
 public RawMessage OnConsume(RawMessage rawMessage)
 {
     return(interceptors.AsEnumerable()
            .Reverse()
            .Aggregate(rawMessage, (x, y) => y.OnConsume(x)));
 }