-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathLightningVersionInfo.cs
More file actions
46 lines (39 loc) · 1.01 KB
/
LightningVersionInfo.cs
File metadata and controls
46 lines (39 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Runtime.InteropServices;
using static LightningDB.Native.Lmdb;
namespace LightningDB;
/// <summary>
/// Represents LMDB version information.
/// </summary>
public class LightningVersionInfo
{
internal static LightningVersionInfo Get()
{
var version = mdb_version(out var major, out var minor, out var patch);
return new LightningVersionInfo
{
Version = Marshal.PtrToStringAnsi(version),
Major = major,
Minor = minor,
Patch = patch
};
}
private LightningVersionInfo()
{
}
/// <summary>
/// Major version number.
/// </summary>
public int Major { get; private set; }
/// <summary>
/// Minor version number.
/// </summary>
public int Minor { get; private set; }
/// <summary>
/// Patch version number.
/// </summary>
public int Patch { get; private set; }
/// <summary>
/// Version string.
/// </summary>
public string Version { get; private set; }
}