Ejemplo n.º 1
0
        private XmlDocument getPublicAccountInformationXML()
        {
            if (!HasCDN())
                return null;

            var request = new GetPublicContainersInformationSerialized(CdnManagementUrl, Format.XML);
            var getSerializedResponse = _requestfactory.Submit(request, AuthToken);
            var xmlResponse = String.Join("", getSerializedResponse.ContentBody.ToArray());
            getSerializedResponse.Dispose();

            var xmlDocument = new XmlDocument();
            try
            {
                xmlDocument.LoadXml(xmlResponse);
            }
            catch (XmlException)
            {
                return xmlDocument;
            }

            return xmlDocument;
        }
Ejemplo n.º 2
0
        private string getPublicAccountInformationJson()
        {
            if (!HasCDN())
                return null;

            var request = new GetPublicContainersInformationSerialized(CdnManagementUrl, Format.JSON);
            var getSerializedResponse = _requestfactory.Submit(request, AuthToken);
            return string.Join("", getSerializedResponse.ContentBody.ToArray());
        }