Click or drag to resize

Retrieving a list of cases

Demonstrates

How to retrieve a list of cases using Integration Library

Example

This example iterates through all the cases and prints their information to the system console.

C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;

class Sample
{
    public static void Main()
    {
        // Initialize the environment
        var edaIntegration = new EdaIntegration().ConnectToExplore();

        // Retrieve the list of cases and display them on the system console
        const string outputFormat = "{0, -30} {1, -30} {2, -30}";
        Console.WriteLine(outputFormat, "Name", "Client", "Description");
        Console.WriteLine(outputFormat, "------------------------------", "-------------------------", "-------------------------");
        foreach (ICaseListing theCase in edaIntegration.Cases.All())
        {
            Console.WriteLine(outputFormat, theCase.Name, theCase.Client, theCase.Description);
        }
    }
}
Example Output
Output
Name                           Client                    Description
------------------------------ ------------------------- -------------------------
Case 1                         Client 123                Sample case #1
Case 2                         Client 45                 Sample case #2
See Also