Esempio n. 1
0
        private void Delete(string[] args)
        {
            string token = GetString("--token", args);
            if (string.IsNullOrEmpty(token))
            {
                Usage();
                return;
            }
            
            string uuid = GetString("--uuid", args);
            if (string.IsNullOrEmpty(uuid))
            {
                Usage("Missing argument --uuid");
                return;
            }

            var documnet = new CrocodocDocument(token);
            Task<bool> result = documnet.DeleteAsync(uuid);
            result.Wait();
        }
Esempio n. 2
0
 private void Upload(string token, Stream stream, string filename)
 {
     var documnet = new CrocodocDocument(token);
     Task<UploadResponse> result = documnet.UploadAsync(stream, filename);
     result.Wait();
 }
Esempio n. 3
0
        private void Status(string[] args)
        {
            string token = GetString("--token", args);
            if (string.IsNullOrEmpty(token))
            {
                Usage("Missing argument --token");
                return;
            }
            
            string[] uuids = GetStrings("--uuids", args);
            if (uuids == null || uuids.Length == 0)
            {
                Usage("Missing argument --uuids");
                return;
            }

            var documnet = new CrocodocDocument(token);
            Task<StatusResponse[]> result = documnet.GetStatusAsync(uuids);
            result.Wait();
        }
Esempio n. 4
0
 private void Upload(string token, Uri uri)
 {
     var documnet = new CrocodocDocument(token);
     Task<UploadResponse> result = documnet.UploadAsync(uri);
     result.Wait();
 }