Ejemplo n.º 1
0
        private void GetNextPage()
        {
            string response;

            if (this.exporting)
            {
                response = this.webService.ExportConnectorSpaceGetNext(this.token, (ulong)this.csParts, this.entryParts, this.pageSize);
                SyncServer.ThrowExceptionOnReturnError(response);
            }
            else
            {
                response = this.webService.GetCSResults(this.token, this.pageSize, (ulong)this.csParts, this.entryParts, 0, null);
                SyncServer.ThrowExceptionOnReturnError(response);
            }

            XmlDocument d = new XmlDocument();

            d.LoadXml(response);

            if (d.SelectSingleNode("error") != null)
            {
                this.currentResultSet = new CSObjectSearchResultBatch(d);
            }
            else
            {
                this.currentResultSet = new CSObjectSearchResultBatch(d.SelectSingleNode("batch"));
            }
        }
Ejemplo n.º 2
0
        internal CSObjectEnumerator(MMSWebService ws, string token, bool exporting, int pageSize, CSObjectParts csParts, uint entryParts)
        {
            this.token      = token;
            this.webService = ws;
            this.exporting  = exporting;
            this.csParts    = csParts;
            this.entryParts = entryParts;
            this.pageSize   = (uint)pageSize;

            if (token == null)
            {
                this.currentResultSet = new CSObjectSearchResultBatch(new XmlDocument());
            }
            else
            {
                this.GetNextPage();
            }
        }