/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Annotation of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 58 - (hide annotations) (download)
Thu Jul 15 08:24:01 2010 UTC (9 years, 6 months ago) by william
File size: 1629 byte(s)
update to reflect latest gr2lib

1 william 9 using System;
2     using System.Collections.Generic;
3     using System.Text;
4    
5 william 16 using gr2lib.core;
6     using gr2lib.core.apiversion;
7 william 50 using gr2lib.core.exceptions;
8 william 16
9 william 9 namespace gr2lib_UnitTest
10     {
11 william 58
12 william 9 class Program
13     {
14     static void Main(string[] args)
15     {
16 william 50 try
17     {
18     // Setup access to check loaded Granny2 API Version
19 william 58 granny2apiversion apiversion = new granny2apiversion(shared.EXPECTED_API_VERSION);
20 william 16
21 william 50 // Check if the Loaded API Version Matches
22     if (!apiversion.apiversionsmatch)
23     {
24     // the loaded version does not match
25     Console.WriteLine("Warning:\n" +
26     "\t Loaded Granny2 DLL Version: " + apiversion.apiversion.version + "\n" +
27     "\t Expected Version: " + apiversion.expectedapiversion.version);
28     // return from void to exit application
29     return;
30     }
31     else
32     {
33     // the loaded version matches
34     Console.WriteLine("Loaded granny2.dll: " + apiversion.apiversion.version);
35     }
36     // if we have arrived at this point, the loaded api version matches the what the library was built against
37 william 16 }
38 william 50 catch (granny2apiloadexception ex)
39 william 16 {
40 william 58 Console.WriteLine(ex.ToString());
41 william 16 }
42 william 58 catch (Exception ex)
43     {
44     Console.WriteLine(ex.ToString());
45     }
46 william 9 }
47     }
48     }

  ViewVC Help
Powered by ViewVC 1.1.22