private static IEnumerable<FilterAction> ResolveErrorActions(Pipeline hostPipeline, Pipeline servicePipeline, Pipeline endpointPipeline, Pipeline methodPipeline) { return ServiceResolver.ResolveActions( hostPipeline.ErrorActions, servicePipeline.ExcludeErrorActions, servicePipeline.ErrorActions, endpointPipeline.ExcludeErrorActions, endpointPipeline.ErrorActions, methodPipeline.ExcludeErrorActions, methodPipeline.ErrorActions); }
private static IEnumerable<IFormat> ResolveFormats(Pipeline hostPipeline, Pipeline servicePipeline, Pipeline endpointPipeline, Pipeline methodPipeline) { List<IFormat> formats = new List<IFormat>(hostPipeline.Formats); formats.RemoveAll(f => servicePipeline.ExcludeFormats.Any(ef => f.Equals(ef))); formats.RemoveAll(f => servicePipeline.Formats.Any(sf => f.Equals(sf))); formats.AddRange(servicePipeline.Formats); formats.RemoveAll(f => endpointPipeline.ExcludeFormats.Any(ef => f.Equals(ef))); formats.RemoveAll(f => endpointPipeline.Formats.Any(ef => f.Equals(ef))); formats.AddRange(endpointPipeline.Formats); formats.RemoveAll(f => methodPipeline.ExcludeFormats.Any(ef => f.Equals(ef))); formats.RemoveAll(f => methodPipeline.Formats.Any(mf => f.Equals(mf))); formats.AddRange(methodPipeline.Formats); formats.Reverse(); return formats; }
private static IEnumerable<IEncoding> ResolveEncodings(Pipeline hostPipeline, Pipeline servicePipeline, Pipeline endpointPipeline, Pipeline methodPipeline) { List<IEncoding> encodings = new List<IEncoding>(hostPipeline.Encodings); encodings.RemoveAll(e => servicePipeline.ExcludeEncodings.Any(ee => e.Equals(ee))); encodings.RemoveAll(e => servicePipeline.Encodings.Any(se => e.Equals(se))); encodings.AddRange(servicePipeline.Encodings); encodings.RemoveAll(e => endpointPipeline.ExcludeEncodings.Any(ee => e.Equals(ee))); encodings.RemoveAll(e => endpointPipeline.Encodings.Any(ee => e.Equals(ee))); encodings.AddRange(endpointPipeline.Encodings); encodings.RemoveAll(e => methodPipeline.ExcludeEncodings.Any(ee => e.Equals(ee))); encodings.RemoveAll(e => methodPipeline.Encodings.Any(me => e.Equals(me))); encodings.AddRange(methodPipeline.Encodings); encodings.Reverse(); return encodings; }