Click or drag to resize

IDocumentManagerById Method (IEnumerableGuid)

Retrieves a set of documents matching a list of unique identifiers

Namespace:  EdaIntegrationContract.Document
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 7.6
Syntax
C#
IEnumerable<IDocument> ById(
	IEnumerable<Guid> documentIds
)

Parameters

documentIds
Type: System.Collections.GenericIEnumerableGuid
The unique identifiers of the documents to find

Return Value

Type: IEnumerableIDocument
A list of documents matching the supplied unique identifiers
Examples
The following example demonstrates retrieving multiple documents using a list of ids.
C#
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*/
See Also