Click or drag to resize

ExceptionManagerFilterValues Method

Retrieves the values and the count of exceptions for a specified filter type.

Namespace:  Law.EdaIntegration.Exceptions
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.2
Syntax
C#
public List<ExceptionFilterValue> FilterValues(
	ExceptionFilterType filterType
)

Parameters

filterType
Type: Law.EdaIntegration.ExceptionsExceptionFilterType
The type of filter to return values for

Return Value

Type: ListExceptionFilterValue
A list of ExceptionFilterValue representing the unique identifier of the value, its description and the count of exceptions for that value
Examples
The following example demonstrates retrieving the count of exceptions for all file types.
C#
using Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Exceptions;

class Sample
{
    public static void Main()
    {
        /* Connect to the case */
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);
        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        /* Set up the output formatting */
        string outputFormat = "{0, 6}  {1, -50} {2, 7}"
        Console.WriteLine(outputFormat, "Exc Id", "Message", "Exc Cnt");
        Console.WriteLine(outputFormat, new String('=', 6), new String('=', 50), new String('=', 7));

        /* Print each filter value */
        foreach (var exceptionFilterValue in edaCase.Exceptions.FilterValues(ExceptionFilterType.FileType))
        {
            Console.WriteLine("{0, 6} {1, -50} {2, 4}", exceptionFilterValue.Id, exceptionFilterValue.Description, exceptionFilterValue.ExceptionCount);
        }
    }
}
/*
This example produces the following results:

Exc Id  FileType                                           Exc Cnt
======  ================================================== =======
   185  JPEG File Interchange Format Image                       4
  2210  MS PowerPoint 2007-2010 Presentation (Open XML)          2
  2208  MS Word 2007-2010 Document (Open XML)                    5
   229  MS Word 97-2003 Document (OLE)                           2
     0  Unidentified                                             3*/
See Also