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

Contents of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50 - (show 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 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 using gr2lib.core;
6 using gr2lib.core.apiversion;
7 using gr2lib.core.exceptions;
8
9 namespace gr2lib_UnitTest
10 {
11 class Program
12 {
13 static void Main(string[] args)
14 {
15 try
16 {
17 // Setup access to check loaded Granny2 API Version
18 granny2apiversion apiversion = new granny2apiversion();
19
20 // 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 }
37 catch (granny2apiloadexception ex)
38 {
39 Console.WriteLine(ex.Message);
40 }
41 }
42 }
43 }

  ViewVC Help
Powered by ViewVC 1.1.22