Пример #1
0
 public IAsyncResult BeginGetAdspaces(GetAdspacesRequest GetAdspacesRequest, AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetAdspaces", new object[1]
       {
     (object) GetAdspacesRequest
       }, callback, asyncState);
 }
Пример #2
0
 public List<adspaceItem> GetAdspaces(sessionType session, int items, int page, out int total)
 {
     GetAdspacesRequest GetAdspacesRequest = new GetAdspacesRequest();
       DateTime utcNow = DateTime.UtcNow;
       GetAdspacesRequest.nonce = Signature.GetNonce();
       GetAdspacesRequest.connectId = session.connectId;
       GetAdspacesRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "getadspaces", GetAdspacesRequest.nonce);
       GetAdspacesRequest.timestamp = Signature.GetZDateTime(utcNow);
       GetAdspacesRequest.items = items;
       GetAdspacesRequest.itemsSpecified = true;
       GetAdspacesRequest.page = page;
       GetAdspacesRequest.pageSpecified = true;
       GetAdspacesResponse adspaces = this.publisherService.GetAdspaces(GetAdspacesRequest);
       if (adspaces == null)
       {
     total = 0;
     return (List<adspaceItem>) null;
       }
       else if (adspaces.adspaceItems == null)
       {
     total = 0;
     return (List<adspaceItem>) null;
       }
       else
       {
     total = (int) adspaces.total;
     return Enumerable.ToList<adspaceItem>((IEnumerable<adspaceItem>) adspaces.adspaceItems);
       }
 }