private static void SplitInterceptors(IInterceptor[] interceptors, MethodInfo method,
out List<IInterceptor> infrastructureInterceptors,
out List<IInterceptor> userInterceptors)
{
userInterceptors = new List<IInterceptor>(interceptors.Length);
infrastructureInterceptors = new List<IInterceptor>(interceptors.Length);
foreach (var interceptor in interceptors)
{
if (interceptor is IWcfInterceptor)
{
var infrastructureInterceptor = (IWcfInterceptor)interceptor;
if (infrastructureInterceptor.Handles(method))
{
infrastructureInterceptors.Add(infrastructureInterceptor);
}
continue;
}
userInterceptors.Add(interceptor);
}
}