private static void extendedTest(IDocumentProvider msGraph, Microsoft.Graph.User serviceUser) { var documents = msGraph.GetDocuments(serviceUser.Id); //var folders = msGraph.GetFolders(); /*var htmlLargeInputBytes = File.ReadAllBytes("..\\..\\resources\\source\\large-file.pptx"); * byte[] pdfHTMLLargeDocBytes = msGraph.ConvertDocumentToPDF(htmlLargeInputBytes, $"Temp/{Guid.NewGuid()}.pptx", serviceUser.Id); * File.WriteAllBytes($"..\\..\\resources\\target\\large-file-pptx.pdf", pdfHTMLLargeDocBytes);*/ var htmlSimpleInputBytes = File.ReadAllBytes("..\\..\\resources\\source\\simple-html.html"); byte[] pdfHTMLSimpleDocBytes = msGraph.ConvertDocumentToPDF(htmlSimpleInputBytes, $"Temp/{Guid.NewGuid()}.html", serviceUser.Id); File.WriteAllBytes($"..\\..\\resources\\target\\simple-html.pdf", pdfHTMLSimpleDocBytes); /*var csvSimpleInputBytes = File.ReadAllBytes("..\\..\\resources\\source\\simple.csv"); * byte[] pdfCSVSimpleDocBytes = msGraph.ConvertDocumentToPDF(csvSimpleInputBytes, $"Temp/{Guid.NewGuid()}.csv", serviceUser.Id); * File.WriteAllBytes($"..\\..\\resources\\target\\csv-simple.pdf", pdfCSVSimpleDocBytes);*/ var inputBytes = File.ReadAllBytes("..\\..\\resources\\source\\doc.docx"); byte[] pdfDocBytes = msGraph.ConvertDocumentToPDF(inputBytes, $"Temp/{Guid.NewGuid()}.docx", serviceUser.Id); File.WriteAllBytes($"..\\..\\resources\\target\\doc.pdf", pdfDocBytes); var invoiceInputBytes = File.ReadAllBytes("..\\..\\resources\\source\\invoice.xlsx"); byte[] pdfInvoiceDocBytes = msGraph.ConvertDocumentToPDF(invoiceInputBytes, $"Temp/{Guid.NewGuid()}.xlsx", serviceUser.Id); File.WriteAllBytes($"..\\..\\resources\\target\\invoice.pdf", pdfInvoiceDocBytes); /*var csvInvoiceInputBytes = File.ReadAllBytes("..\\..\\resources\\source\\invoice.csv"); * byte[] pdfCSVInvoiceDocBytes = msGraph.ConvertDocumentToPDF(csvInvoiceInputBytes, $"Temp/{Guid.NewGuid()}.csv", serviceUser.Id); * File.WriteAllBytes($"..\\..\\resources\\target\\csv-invoice.pdf", pdfCSVInvoiceDocBytes);*/ var rootDocs = msGraph.GetRootDocuments(serviceUser.Id); var doc1 = msGraph.GetDocumentByPath(serviceUser.Id, "dummy.txt"); //var doc2 = msGraph.GetDocumentById(serviceUser.Id, "01IKWSDM5REL3VRV2EFNHZ6DCBXVN46JCV"); // 01IKWSDMZZH4XLSPOKLNA33GWZD6XF7MC5 //var doc3 = msGraph.GetDocumentByPath(serviceUser.Id, "7Digital"); //var childDocuments = msGraph.GetChildDocumentsById(serviceUser.Id, "01IKWSDM5REL3VRV2EFNHZ6DCBXVN46JCV"); var smallBuffer = System.Text.Encoding.UTF8.GetBytes("Empty"); var smallDocName = Guid.NewGuid().ToString(); var smallDoc = msGraph.UploadSmallDocument(smallBuffer, $"Temp/{smallDocName}.txt", serviceUser.Id); msGraph.DeleteDocumentById(serviceUser.Id, smallDoc.id); var largeBuffer = System.IO.File.ReadAllBytes("..\\..\\resources\\source\\doc.docx"); var largeDocName = Guid.NewGuid().ToString(); var largeDoc = msGraph.UploadLargeDocument(largeBuffer, $"Temp/{largeDocName}.txt", serviceUser.Id); msGraph.DeleteDocumentById(serviceUser.Id, largeDoc.id); }