/// <summary> /// Constructs a new DefaultRequest with the specified service name and the /// original, user facing request object. /// </summary> /// <param name="request">The orignal request that is being wrapped</param> /// <param name="serviceName">The service name</param> public DefaultRequest(WebServiceRequest request, String serviceName) { if (request == null) throw new ArgumentNullException("request"); if (string.IsNullOrEmpty(serviceName)) throw new ArgumentNullException("serviceName"); this.serviceName = serviceName; this.originalRequest = request; this.requestName = this.originalRequest.GetType().Name; foreach (var header in request.Headers) this.Headers.Add(header.Key, header.Value); foreach (var param in request.Parameters) this.Parameters.Add(param.Key, param.Value); }
/// <summary> /// Constructs a new DefaultRequest with the specified service name and the /// original, user facing request object. /// </summary> /// <param name="request">The orignal request that is being wrapped</param> /// <param name="serviceName">The service name</param> public DefaultRequest(WebServiceRequest request, String serviceName) { if (request == null) { throw new ArgumentNullException("request"); } if (string.IsNullOrEmpty(serviceName)) { throw new ArgumentNullException("serviceName"); } this.serviceName = serviceName; this.originalRequest = request; this.requestName = this.originalRequest.GetType().Name; foreach (var header in request.Headers) { this.Headers.Add(header.Key, header.Value); } foreach (var param in request.Parameters) { this.Parameters.Add(param.Key, param.Value); } }