IExceptionManagerFilterValues Method |
Namespace: EdaIntegrationContract.Exceptions
List<IExceptionFilterValue> FilterValues( ExceptionFilterType filterType )
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.Exceptions; class Sample { static void Main() { /* Connect to the case */ var edaIntegration = new EdaIntegration().ConnectToExplore(); ICase 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*/