• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Api.StorageApi类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Com.Aspose.Storage.Api.StorageApi的典型用法代码示例。如果您正苦于以下问题:C# StorageApi类的具体用法?C# StorageApi怎么用?C# StorageApi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StorageApi类属于Com.Aspose.Storage.Api命名空间,在下文中一共展示了StorageApi类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Main

        public static void Main(String[] args){

            try
            {
                System.Diagnostics.Debug.WriteLine("\n\nFetching the results...");
                StorageApi storageApi = new StorageApi("xxx", "xxx", "http://api.aspose.com/v1.1");

                string fileName = "test_multi_pages.docx";

                System.Diagnostics.Debug.WriteLine(storageApi.PutCreate(fileName,null, null, System.IO.File.ReadAllBytes("\\temp\\"+fileName)));

                //storageApi.PutCreate(fileName, null, null, System.IO.File.ReadAllBytes("\\temp\\resources\\" + fileName));

                ////System.Diagnostics.Debug.WriteLine(storageApi.GetDownload(fileName, null, null)+"\n\nthese were the file contents");


                byte[] responseStream = storageApi.GetDownload(fileName, null, null).ResponseStream;
                System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, responseStream);

                //System.Diagnostics.Debug.WriteLine(storageApi.GetListFiles("", ""));

                //System.IO.File.WriteAllBytes("\\temp\\new_" + fileName, System.IO.File.ReadAllBytes("\\temp\\"+fileName));

            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("\nError:"+ex.Message+"\n" + ex.StackTrace + "\n");
            }
        }
开发者ID:imranwar,项目名称:AsposeStoragePHP,代码行数:29,代码来源:Storage.cs


示例2: Run

        public static void Run()
        {
            // ExStart:1

            // Instantiate Aspose Storage Cloud API SDK
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Instantiate Aspose BarCode Cloud API SDK
            BarcodeApi barcodeApi = new BarcodeApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // set input file name
            String name = "sample-barcode.jpeg";

            //The barcode type.
            //If this parameter is empty, autodetection of all supported types is used.
            String type = "";

            // Set folder location at cloud storage
            String folder = "";
            
            BarcodeReader body = new BarcodeReader();

            // Set if FNC symbol stripping should be performed.
            body.StripFNC = true;

            // Set mode for checksum validation during recognition
            body.ChecksumValidation = "ON";

            // Set special mode of barcode binarization
            body.BinarizationHints = BinarizationHints.ComplexBackground;

            try
            {
                //upload source file to aspose cloud storage
                 BarcodeResponseList apiResponse = barcodeApi.PutBarcodeRecognizeFromBody(name, type, folder, body);

                 // invoke Aspose.BarCode Cloud SDK API to recognition of a barcode from file on server with parameters in body
                 apiResponse = barcodeApi.PutBarcodeRecognizeFromBody(name, type, folder, body);

                if (apiResponse != null)
                {
                    foreach (Barcode barcode in apiResponse.Barcodes)
                    {
                        Console.WriteLine("Codetext: " + barcode.BarcodeValue + "\nType: " + barcode.BarcodeType);
                    }
                    Console.WriteLine("Recognize Barcode with Checksum Option, Done!");

                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

            }
            // ExEnd:1
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.BarCode-for-Cloud,代码行数:56,代码来源:ReadBarcodesWithChecksum.cs


示例3: Main

        public static void Main(String[] args)
        {

            string APIKEY = "xxxxx";
            string APPSID = "xxxxx";
            string BASEPATH = "http://api.aspose.com/v1.1";


            try
            {

                SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
                StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);


                //string name = "slide_" + new Random().Next(100) + ".pptx";
                //string password = null;
                //string storage = null;
                //string folder = null;
                //byte[] file = System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + "test_slide.pptx");
                ////System.Diagnostics.Debug.WriteLine("-------------working......");
                //ResponseMessage actual;
                //actual = target.PutNewPresentation(name, password, storage, folder, file);


                string name = "test_slide.pptx";
                int? slideIndex = 1;
                int? shapeIndex = 1;
                int? paragraphIndex = 1;
                int? portionIndex = 1;
                string folder = null;
                string storage = null;

                Portion body = new Portion();
                body.Text = "Newer value";
                body.FontColor = "#FFFF0000";

                storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name));

                ResponseMessage actual;
                actual = target.PutSetParagraphPortionProperties(name, slideIndex, shapeIndex, paragraphIndex, portionIndex, folder, storage, body);




                System.Diagnostics.Debug.WriteLine("-------------working......"+actual);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("--------------------------------\nException:" + ex.Message + "\n" + ex.StackTrace);
            }

        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:53,代码来源:slides.cs


示例4: Run

        public static void Run()
        {

            // ExStart:1
            // Instantiate Aspose Storage Cloud API SDK
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Instantiate Aspose OCR Cloud API SDK
            OcrApi ocrApi = new OcrApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Set the image file name 
            String name = "Sampleocr.bmp";

            // Set the language of the document.
            String language = "English";

            // Set X and Y coordinate to recognize text inside..
            int? rectX = 150;
            int? rectY = 100;

            //Set Width and Height to recognize text inside.
            int? rectWidth = 1000;
            int? rectHeight = 300;

            //Set the spelling correction is used.
            bool? useDefaultDictionaries = true;

            //Set 3rd party cloud storage server (if any)
            String storage = "";
            String folder = "";

            try
            {
                //upload source file to aspose cloud storage
                storageApi.PutCreate(name, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + name));

                // invoke Aspose.OCR Cloud SDK API to extract text and partsinfo from an image           
                OCRResponse apiResponse = ocrApi.GetRecognizeDocument(name, language, rectX, rectY, rectWidth, rectHeight, useDefaultDictionaries, storage, folder); 
               
                if (apiResponse != null)
                {
                    Console.WriteLine("Codetext: " + apiResponse.Text+ "\n");

                    Console.WriteLine("Extract OCR or HOCR Text from a specific Block, Done!");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.OCR-for-Cloud,代码行数:52,代码来源:ExtractOCRorHOCRTextFromSpecificBlockImage.cs


示例5: TestDeleteProperties

        public void TestDeleteProperties()
        {
            PdfApi target = new PdfApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "Sample-Annotation.pdf";
            string storage = null;
            string folder = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\pdf\\resources\\" + name));

            Com.Aspose.PDF.Model.SaaSposeResponse actual;
            actual = target.DeleteProperties(name, storage, folder);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.PDF.Model.SaaSposeResponse(), actual.GetType());
        }
开发者ID:imranwar,项目名称:Aspose_Pdf_Cloud,代码行数:17,代码来源:PdfApiTest.cs


示例6: TestDeleteCalendarException

        public void TestDeleteCalendarException()
        {
            TasksApi target = new TasksApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "sample-project.mpp";
            int? calendarUid = 1;
            int? index = 1;
            string fileName = null;
            string storage = null;
            string folder = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\tasks\\resources\\" + name));
            SaaSposeResponse actual;
            actual = target.DeleteCalendarException(name, calendarUid, index, fileName, storage, folder);
            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new SaaSposeResponse(), actual.GetType());
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Tasks-for-Cloud,代码行数:18,代码来源:TasksApiTest.cs


示例7: TestDeleteSlideByIndex

        public void TestDeleteSlideByIndex()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);             
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);


            string name = "test_slide.pptx"; 
            int? slideIndex = 1; 
            string folder = null; 
            string storage = null; 

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 
            
            SlideListResponse actual;
            actual = target.DeleteSlideByIndex(name, slideIndex, folder, storage);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.SlideListResponse(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:19,代码来源:SlidesApiTest.cs


示例8: TestGetChangeImageScale

        public void TestGetChangeImageScale()
        {
            ImagingApi target = new ImagingApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);


            string name = "aspose_imaging_for_cloud.png";
            string format = "jpg";
            int? newWidth = 200;
            int? newHeight = 200;
            string outPath = "";
            string folder = "";
            string storage = "";

             storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\imaging\\resources\\" + name)); 

            ResponseMessage actual;
            actual = target.GetChangeImageScale(name, format, newWidth, newHeight, outPath, folder, storage);

            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Imaging-for-Cloud,代码行数:22,代码来源:ImagingApiTest.cs


示例9: TestGetRecognizeDocument

        public void TestGetRecognizeDocument()
        {
            OcrApi target = new OcrApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name =  "Sampleocr.bmp";
            string language =  "english";
            int? rectX = null;
            int? rectY = null;
            int? rectWidth = null;
            int? rectHeight = null;
            bool?  useDefaultDictionaries = null;
            string storage =  null;
            string folder =  null;

            storageApi.PutCreate(name, "", "", System.IO.File.ReadAllBytes("\\temp\\ocr\\resources\\" + name));
            
            Com.Aspose.OCR.Model.OCRResponse actual;
            actual = target.GetRecognizeDocument(name, language, rectX, rectY, rectWidth, rectHeight, useDefaultDictionaries, storage, folder);
            
            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new OCRResponse(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.OCR-for-Cloud,代码行数:23,代码来源:OcrApiTest.cs


示例10: TestPostAddNewShape

        public void TestPostAddNewShape()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "test_slide.pptx"; 
            int? slideIndex = 1; 
            string folder = null; 
            string storage = null;
            Shape body = new Shape();
            body.Name = "Aspsoe";
            body.ShapeType = "Line";
            body.AlternativeText = "aspose.com";

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 

            ResponseMessage actual;
            actual = target.PostAddNewShape(name, slideIndex, folder, storage, body);

            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:22,代码来源:SlidesApiTest.cs


示例11: TestPostPresentationMerge

        public void TestPostPresentationMerge()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH); 
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "test_slide.pptx";
            string mergeFile1 = "sample-input.pptx";
            string mergeFile2 = "demo.pptx";

            string storage = null; 
            string folder = null; 

            PresentationsMergeRequest body = new PresentationsMergeRequest();
            body.PresentationPaths = new System.Collections.Generic.List<string>  {mergeFile1,mergeFile2};

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name));

            storageApi.PutCreate(mergeFile1, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + mergeFile1));
            storageApi.PutCreate(mergeFile2, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + mergeFile2)); 

            DocumentResponse actual;
            actual = target.PostPresentationMerge(name, storage, folder, body);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.DocumentResponse(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:26,代码来源:SlidesApiTest.cs


示例12: TestGetSlidesSlideShapesParent

 public void TestGetSlidesSlideShapesParent()
 {
     SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH); StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);
     
     string name = "test_slide.pptx"; 
     int? slideIndex = 1; 
     string shapePath = "1"; 
     string folder = null; 
     string storage = null; 
     
     storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 
     
     ResponseMessage actual;
     actual = target.GetSlidesSlideShapesParent(name, slideIndex, shapePath, folder, storage);
     
     Assert.AreEqual(200, actual.Code);
     Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
 }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:18,代码来源:SlidesApiTest.cs


示例13: TestPostSlidesSaveAsTiff

        public void TestPostSlidesSaveAsTiff()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "test_slide.pptx"; 
            string password = null; 
            string storage = null; 
            string folder = null; 
            string outPath = null; 
            TiffExportOptions body = new TiffExportOptions();
            body.ExportFormat = "tiff";

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 

            ResponseMessage actual;
            actual = target.PostSlidesSaveAsTiff(name, password, storage, folder, outPath, body);
            
            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:21,代码来源:SlidesApiTest.cs


示例14: Main


//.........这里部分代码省略.........
//String storage = "";
//String folder = "";

//try
//{
//    //upload source file to aspose cloud storage
//    storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes("\\temp\\tasks\\resources\\" + fileName));

//    //invoke Aspose.PDF Cloud SDK API to append word document
//    ResponseMessage apiResponse = tasksApi.GetTaskDocumentWithFormat(fileName, format, storage, folder);

//    if (apiResponse != null)
//    {
//        //download appended document from storage server
//        System.IO.File.WriteAllBytes("\\temp\\" + name + "." + format, apiResponse.ResponseStream);
//        Console.WriteLine("Retrieve Outline Codes Information, Done!");
//        Console.ReadKey();
//    }
//}
//catch (Exception ex)
//{
//    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

//}



/*
*  Working with Outline Codes and Extended Attributes        
*  Retrieve Project Properties 
*/

TasksApi tasksApi = new TasksApi(APIKEY, APPSID, BASEPATH);
StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

String name = "sample-project.mpp";
String storage = null;
String folder = null;

try
{
    //upload source file to aspose cloud storage
    storageApi.PutCreate(name, "", "", System.IO.File.ReadAllBytes("\\temp\\tasks\\resources\\" + name));

    //invoke Aspose.PDF Cloud SDK API to append word document
    DocumentPropertiesResponse apiResponse = tasksApi.GetDocumentProperties(name, storage, folder);

    if (apiResponse != null && apiResponse.Status.Equals("OK"))
    {
        foreach (DocumentProperty docProp in apiResponse.Properties.List)
        {
            Console.WriteLine(docProp.Name + " :: " + docProp.Value);
        }
        Console.WriteLine("Retrieve Project Properties, Done!");
        Console.ReadKey();
    }
}
catch (Exception ex)
{
    System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

}



            ///*
开发者ID:farooqsheikhpk,项目名称:Aspose.Tasks-for-Cloud,代码行数:67,代码来源:tasks.cs


示例15: TestGetSlidesPresentationTextItems

 public void TestGetSlidesPresentationTextItems()
 {
     SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
     StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);
     
     string name = "test_slide.pptx"; 
     bool? withEmpty = null;
     string folder = null; 
     string storage = null; 
     
     storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 
     
     TextItemsResponse actual;
     actual = target.GetSlidesPresentationTextItems(name, withEmpty, folder, storage);
     
     Assert.AreEqual("200", actual.Code);
     Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.TextItemsResponse(), actual.GetType()); 
 }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:18,代码来源:SlidesApiTest.cs


示例16: TestPostSlidesReorderPosition

        public void TestPostSlidesReorderPosition()
        {   
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "sample-input.pptx"; 
            int? oldPosition = 1; 
            int? newPosition = 2; 
            string folder = null; 
            string storage = null; 

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + name)); 

            SlideListResponse actual;
            actual = target.PostSlidesReorderPosition(name, oldPosition, newPosition, folder, storage);

            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.SlideListResponse(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:19,代码来源:SlidesApiTest.cs


示例17: Run

        public static void Run()
        {
            // ExStart:1
            
            // Instantiate Aspose Storage Cloud API SDK
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Instantiate Aspose BarCode Cloud API SDK
            BarcodeApi barcodeApi = new BarcodeApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // set input file name
            String name = "sample-barcode.jpeg";

            //The barcode type.
            //If this parameter is empty, autodetection of all supported types is used.
            String type = "";

            //Sets mode for checksum validation during recognition
            String checksumValidation = "";

            //Sets if FNC symbol stripping should be performed. 
            bool stripFnc = true;

            //Sets recognition of rotated barcode
            int? rotationAngle = null;

            //Sets exact number of barcodes to recognize 
            int? barcodesCount = null;

            //Set recognition of barcode inside specified Rectangle region
            int? rectX = 10;
            int? rectY = 10;
            int? rectWidth = 200;
            int? rectHeight = 200;
            
            //Set 3rd party cloud storage server (if any)
            String storage = "";

            // Set folder location at cloud storage
            String folder = "";

            try
            {
                //upload source file to aspose cloud storage
                storageApi.PutCreate(name, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + name));

                // invoke Aspose.BarCode Cloud SDK API to read barcode with specific region of image
                BarcodeResponseList apiResponse = barcodeApi.GetBarcodeRecognize(name, type, checksumValidation, stripFnc, rotationAngle, barcodesCount, rectX, rectY, rectWidth, rectHeight, storage, folder);


                if (apiResponse != null)
                {
                    foreach (Barcode barcode in apiResponse.Barcodes)
                    {
                        Console.WriteLine("Codetext: " + barcode.BarcodeValue + "\nType: " + barcode.BarcodeType);
                    }
                    Console.WriteLine("Read Barcode from Specific Region of Image, Done!");
                    
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);

            }
            // ExEnd:1
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.BarCode-for-Cloud,代码行数:67,代码来源:ReadBarcodeFromSpecificRegionOfImage.cs


示例18: TestPutSlidesDocumentFromHtml

        public void TestPutSlidesDocumentFromHtml()
        {   
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "slide_" + new Random().Next(100) + ".pptx";
            string password = null; 
            string storage = null; 
            string folder = null;
            byte[] file = System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + "test.html"); 

            ResponseMessage actual;
            actual = target.PutSlidesDocumentFromHtml(name, password, storage, folder, file);
            
            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:17,代码来源:SlidesApiTest.cs


示例19: TestPostSlidesDocument

        public void TestPostSlidesDocument()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH); 
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "slide_"+ new Random().Next(100) +".pptx";
            string templatePath = "test_slide.pptx"; 
            string templateStorage = null; 
            bool? isImageDataEmbeeded = false;
            string password = null; 
            string storage = null; 
            string folder = null;

            byte[] file = System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + "test.html");

            storageApi.PutCreate(templatePath, null, null, System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + templatePath)); 

            ResponseMessage actual;
            actual = target.PostSlidesDocument(name, templatePath, templateStorage, isImageDataEmbeeded, password, storage, folder, file);

            Assert.AreEqual("Created", actual.Status);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:23,代码来源:SlidesApiTest.cs


示例20: TestPutSlidesConvert

        public void TestPutSlidesConvert()
        {
            SlidesApi target = new SlidesApi(APIKEY, APPSID, BASEPATH); 
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string password = null; 
            string format = "pdf"; 
            string outPath = null;
            byte[] file = System.IO.File.ReadAllBytes("\\temp\\slides\\resources\\" + "test_slide.pptx"); 

            ResponseMessage actual;
            actual = target.PutSlidesConvert(password, format, outPath, file);

            Assert.AreEqual(200, actual.Code);
            Assert.IsInstanceOfType(new Com.Aspose.Slides.Model.ResponseMessage(), actual.GetType()); 
        }
开发者ID:farooqsheikhpk,项目名称:Aspose.Slides-for-Cloud,代码行数:16,代码来源:SlidesApiTest.cs



注:本文中的Com.Aspose.Storage.Api.StorageApi类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CommandLine.ArgumentAttribute类代码示例发布时间:2022-05-24
下一篇:
C# ObjectTools.PagedObjectList类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap