IExceptionManagerAll Method |
Namespace: EdaIntegrationContract.Exceptions
IEnumerable<IExceptionItem> All( IExceptionFilter filter = null )
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.Exceptions; class Sample { static void Main() { var edaIntegration = new EdaIntegration().ConnectToExplore(); ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); string outputFormat = "{0, 6} {1, 6} {2}"; Console.WriteLine(outputFormat, "Exc Id", "Doc Id", "Message"); Console.WriteLine(outputFormat, "======", "======", "========================================"); foreach (IExceptionItem exception in edaCase.Exceptions.All()) { Console.WriteLine(outputFormat, exception.Id, exception.DocumentId, exception.Message); } } } /* This example produces the following results: Exc Id Doc Id Message ====== ====== ======================================== 1 26 Eligible file contained no content. 2 16 Eligible file contained no content. 3 16 File type could not be identified. 4 16 0 Byte File. 5 122 File is encrypted. 6 122 File contains no content due to encryption. 7 115 File is encrypted. 8 115 File contains no content due to encryption. 9 114 File is encrypted. 10 114 File contains no content due to encryption. 11 13 File is encrypted. 12 13 File contains no content due to encryption. 13 11 Eligible file contained no content. 14 17 Eligible file contained no content. 15 116 Eligible file contained no content. 16 117 Eligible file contained no content.*/
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.Exceptions; class Sample { static void Main() { var edaIntegration = new EdaIntegration().ConnectToExplore(); ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); IExceptionFilter filt = edaCase.Exceptions.NewExceptionFilter(); filt.Types = new List<ExceptionType>() { ExceptionType.EncryptedFile, ExceptionType.OcrError }; string outputFormat = "{0, 6} {1, 6} {2}"; Console.WriteLine(outputFormat, "Exc Id", "Doc Id", "Message"); Console.WriteLine(outputFormat, "======", "======", "========================================"); foreach (IExceptionItem exception in edaCase.Exceptions.All(filt)) { Console.WriteLine(outputFormat, exception.Id, exception.DocumentId, exception.Message); } } } /* This example produces the following results: Exc Id Doc Id Message ====== ====== ======================================== 3 16 File type could not be identified. 5 122 File is encrypted. 7 115 File is encrypted. 9 114 File is encrypted. 11 13 File is encrypted.*/