Exemple #1
0
 public ZohoDocument GetDocuments()
 {
     if (_doc == null)
     {
         _doc = new ZohoDocument();
         _doc.Childs.AddRange(DownloadDocumentInfo());
         _doc.Childs.AddRange(DownloadSheetsInfo());
     }
     return(_doc);
 }
Exemple #2
0
        public MemoryStream GetDocumentStream(ZohoDocument document, string ext)
        {
            if (document == null)
            {
                throw new ArgumentNullException("document");
            }
            if (ext == null)
            {
                ext = _defFormats[document.Kind];
            }
            var urlPattern = ZohoDocumentDownloadUrl;

            if (document.Kind == ZohoDocumentKind.Sheet)
            {
                urlPattern = ZohoSheetsDownloadUrl;
            }
            return(new MemoryStream(GetClient().DownloadData(CreateUrl(string.Format(urlPattern, ext, document.Id)))));
        }
Exemple #3
0
 public MemoryStream GetDocumentStream(ZohoDocument document)
 {
     return(GetDocumentStream(document, null));
 }