/// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 /// <returns></returns>
 internal static int CompareByOrder(RpcInterceptorConfigBase a, RpcInterceptorConfigBase b)
 {
     if (a != null && b != null)
     {
         return(a.Order.CompareTo(b.Order));
     }
     else if (a != null)
     {
         return(1);
     }
     else if (b != null)
     {
         return(-1);
     }
     else
     {
         return(0);
     }
 }
 /// <summary>
 /// Create a new interceptor.
 /// </summary>
 /// <param name="config">The interceptor config.</param>
 /// <param name="context">The context.</param>
 /// <returns></returns>
 /// <exception cref="ObjectDisposedException">
 /// This instance has already been disposed.
 /// </exception>
 protected virtual Interceptor CreateInterceptor(RpcInterceptorConfigBase config, RpcConfigurationContext context)
 {
     ThrowExceptionIfDisposed();
     return(config.CreateInterceptor(context));
 }