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

Annotation of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50 - (hide annotations) (download)
Thu Jul 15 07:39:22 2010 UTC (9 years, 6 months ago) by william
File size: 1478 byte(s)
catch granny2apiloadexception

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     class Program
12     {
13     static void Main(string[] args)
14     {
15 william 50 try
16     {
17     // Setup access to check loaded Granny2 API Version
18     granny2apiversion apiversion = new granny2apiversion();
19 william 16
20 william 50 // Check if the Loaded API Version Matches
21     if (!apiversion.apiversionsmatch)
22     {
23     // the loaded version does not match
24     Console.WriteLine("Warning:\n" +
25     "\t Loaded Granny2 DLL Version: " + apiversion.apiversion.version + "\n" +
26     "\t Expected Version: " + apiversion.expectedapiversion.version);
27     // return from void to exit application
28     return;
29     }
30     else
31     {
32     // the loaded version matches
33     Console.WriteLine("Loaded granny2.dll: " + apiversion.apiversion.version);
34     }
35     // if we have arrived at this point, the loaded api version matches the what the library was built against
36 william 16 }
37 william 50 catch (granny2apiloadexception ex)
38 william 16 {
39 william 50 Console.WriteLine(ex.Message);
40 william 16 }
41 william 9 }
42     }
43     }

  ViewVC Help
Powered by ViewVC 1.1.22