public PipelineException(PipelineErrorType errorType, string serviceName, string route, Uri requestUri, MethodType methodType, Exception innerException)
     : base(PipelineException.DefaultMessage, innerException)
 {
     this.errorType = errorType;
     this.serviceName = serviceName;
     this.route = route;
     this.requestUri = requestUri;
     this.methodType = methodType;
 }
 /// <summary>
 /// Initializes a new instance of the PipelineException class with serialized data.
 /// </summary>
 /// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
 private PipelineException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (info != null)
     {
         this.errorType = (PipelineErrorType)Enum.ToObject(typeof(PipelineErrorType), info.GetInt32("errorType"));
         this.serviceName = info.GetString("serviceName");
         this.route = info.GetString("route");
         this.requestUri = (Uri)info.GetValue("requestUri", typeof(Uri));
         this.methodType = (MethodType)Enum.ToObject(typeof(MethodType), info.GetInt32("methodType"));
     }
 }