ExceptionManagerAll Method |
Namespace: Law.EdaIntegration.Exceptions
public IEnumerable<ExceptionItem> All( ExceptionFilter filter = null )
using Law.EdaIntegration; using Law.EdaIntegration.Case; using Law.EdaIntegration.Exceptions; class Sample { public static void Main() { 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"); string outputFormat = "{0, 6} {1, 6} {2}" Console.WriteLine(outputFormat, "Exc Id", "Doc Id", "Message"); Console.WriteLine(outputFormat, "======", "======", "========================================"); foreach (ExceptionItem 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 Law.EdaIntegration; using Law.EdaIntegration.Case; using Law.EdaIntegration.Exceptions; class Sample { public static void Main() { 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"); var 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 (ExceptionItem exception in edaCase.Exceptions.All(types)) { 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.*/