/// <summary>
        /// Sets the DistributorCredentials values
        /// </summary>
        private void SetDistributorCredentials()
        {
            if (this.Request.DistributorCode != null || this.Request.DistributorPassword != null)
            {
                DistributorCredentials distCreds = new DistributorCredentials();
                distCreds.DistributorCode = this.Request.DistributorCode;
                distCreds.Password        = this.Request.DistributorPassword;

                using (MemoryStream ms = new MemoryStream())
                {
                    if (this.AuthorizationFormat == AuthFormat.Json)
                    {
                        DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DistributorCredentials));
                        ser.WriteObject(ms, distCreds);
                    }
                    else
                    {
                        DataContractSerializer ser = new DataContractSerializer(typeof(DistributorCredentials));
                        ser.WriteObject(ms, distCreds);
                    }

                    this.webRequest.Headers["X-DocuSign-Distributor"] = Encoding.UTF8.GetString(ms.ToArray());
                }
            }
        }
        /// <summary>
        /// Sets the DistributorCredentials values
        /// </summary>
        private void SetDistributorCredentials()
        {
            if (this.Request.DistributorCode != null || this.Request.DistributorPassword != null)
            {
                DistributorCredentials distCreds = new DistributorCredentials();
                distCreds.DistributorCode = this.Request.DistributorCode;
                distCreds.Password = this.Request.DistributorPassword;

                using (MemoryStream ms = new MemoryStream())
                {
                    if (this.AuthorizationFormat == AuthFormat.Json)
                    {
                        DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DistributorCredentials));
                        ser.WriteObject(ms, distCreds);
                    }
                    else
                    {
                        DataContractSerializer ser = new DataContractSerializer(typeof(DistributorCredentials));
                        ser.WriteObject(ms, distCreds);
                    }

                    this.webRequest.Headers["X-DocuSign-Distributor"] = Encoding.UTF8.GetString(ms.ToArray());
                }
            }
        }