IDocumentManagerById Method (IEnumerableGuid) |
Namespace: EdaIntegrationContract.Document
IEnumerable<IDocument> ById( IEnumerable<Guid> documentIds )
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.Document; class Sample { public static void Main() { var edaIntegration = new EdaIntegration().ConnectToExplore(); ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); // Retrieve all documents that have exceptions int[] docIds = edaCase.Exceptions.All().Select(x => x.DocumentId).ToArray(); IDocument[] docs = edaCase.Documents.ById(docIds).ToArray(); // Print the document id and name Console.WriteLine("All documents with exceptions"); Console.WriteLine("============================="); foreach (IDocument doc in docs) { if (doc.DocumentType == DocumentType.EDocument) { Console.WriteLine("{0,6} {1, -25}", doc.Id, doc.FileName); } else if (doc.DocumentType == DocumentType.Email) { Console.WriteLine("{0,6} {1, -25}", doc.Id, doc.EmailMetadata.Subject); } } } } /* This example produces the following results: All documents with exceptions ====================================== 26 Doc1_metadata.docm 6 Empty Content.rtf 22 early.docx 15 lorem_pw.docx 3 Custom Encrypted.pptx 1 Background.jpg 7 nashvile march.jpg*/