Smrf.NodeXL.ExcelTemplate.NodeXLGraphGalleryExporter.GetWcfServiceBinding C# (CSharp) Method

GetWcfServiceBinding() protected method

protected GetWcfServiceBinding ( ) : System.ServiceModel.BasicHttpBinding
return System.ServiceModel.BasicHttpBinding
    GetWcfServiceBinding()
    {
        // Communicate over SSL.

        BasicHttpBinding oBasicHttpBinding =
            new BasicHttpBinding(BasicHttpSecurityMode.Transport);

        // These settings were determined by running the svcutil.exe utility
        // on the NodeXLGraphGalleryService.svc file and looking at the config
        // file generated by the utility.

        oBasicHttpBinding.Name = "BasicHttpBinding_INodeXLGraphGalleryService";
        oBasicHttpBinding.ReceiveTimeout = new TimeSpan(0, 1, 0);
        oBasicHttpBinding.MaxBufferSize = MaximumBytes;
        oBasicHttpBinding.MaxReceivedMessageSize = MaximumBytes;
        oBasicHttpBinding.TransferMode = TransferMode.Buffered;

        XmlDictionaryReaderQuotas oReaderQuotas =
            new XmlDictionaryReaderQuotas();

        oReaderQuotas.MaxArrayLength = MaximumBytes;
        oBasicHttpBinding.ReaderQuotas = oReaderQuotas;

        return (oBasicHttpBinding);
    }