39 |
|
} |
40 |
|
|
41 |
|
#region IVersionType Members |
42 |
+ |
/// <summary> |
43 |
+ |
/// Returns a string representation of the Granny2 API Version in format (Major.Minor.Customization.Build) |
44 |
+ |
/// </summary> |
45 |
|
public string Version { get { return string.Format("{0}.{1}.{2}.{3}", Major, Minor, Customization, Build); } } |
46 |
|
private granny_int32x _Major; |
47 |
+ |
/// <summary> |
48 |
+ |
/// Returns the Major of the Granny2 API Version (X.0.0.0) |
49 |
+ |
/// </summary> |
50 |
|
public granny_int32x Major { get { return _Major; } } |
51 |
|
|
52 |
|
private granny_int32x _Minor; |
53 |
+ |
/// <summary> |
54 |
+ |
/// Returns the Minor of the Granny2 API Version (0.X.0.0) |
55 |
+ |
/// </summary> |
56 |
|
public granny_int32x Minor { get { return _Minor; } } |
57 |
|
|
58 |
|
private granny_int32x _Customization; |
59 |
+ |
/// <summary> |
60 |
+ |
/// Returns the Customization of the Granny2 API Version - Customization (0.0.X.0) |
61 |
+ |
/// </summary> |
62 |
|
public granny_int32x Customization { get { return _Customization; } } |
63 |
|
|
64 |
|
private granny_int32x _Build; |
65 |
+ |
/// <summary> |
66 |
+ |
/// Returns the Build of the Granny2 API Version (0.0.0.X) |
67 |
+ |
/// </summary> |
68 |
|
public granny_int32x Build { get { return _Build; } } |
69 |
|
#endregion |
70 |
|
} |
77 |
|
VersionType APIVersion { get; } |
78 |
|
VersionType ExpectedAPIVersion { get; } |
79 |
|
} |
80 |
+ |
/// <summary> |
81 |
+ |
/// Handle's the checking of the Loaded Granny2 API Version |
82 |
+ |
/// </summary> |
83 |
|
public class Granny2APIVersion : IGranny2APIVersion |
84 |
|
{ |
85 |
|
public Granny2APIVersion() |
131 |
|
|
132 |
|
#region IGranny2APIVersion Members |
133 |
|
private bool _APIVersionsMatch = false; |
134 |
+ |
/// <summary> |
135 |
+ |
/// Indicates that the Loaded Granny2 API Version matches the version that the core library was built against |
136 |
+ |
/// </summary> |
137 |
|
public bool APIVersionsMatch { get { return _APIVersionsMatch; } } |
138 |
|
private VersionType _APIVersion; |
139 |
+ |
/// <summary> |
140 |
+ |
/// Gets the Loaded Granny2 API Version |
141 |
+ |
/// </summary> |
142 |
|
public VersionType APIVersion { get { return _APIVersion; } } |
143 |
+ |
/// <summary> |
144 |
+ |
/// Gets the Expected Granny2 API Version |
145 |
+ |
/// </summary> |
146 |
|
public VersionType ExpectedAPIVersion { get { return new VersionType(APIVersionType.GrannyProductMajorVersion, APIVersionType.GrannyProductMinorVersion, APIVersionType.GrannyProductCustomization, APIVersionType.GrannyProductBuildNumber); } } |
147 |
|
#endregion |
148 |
|
} |