ExceptionManagerFilterValues Method |
Namespace: Law.EdaIntegration.Exceptions
public List<ExceptionFilterValue> FilterValues( ExceptionFilterType filterType )
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*/