3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

other components

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-02 11:48:48 -07:00
parent e9eab22e5c
commit 68269c43a6
250 changed files with 70871 additions and 0 deletions

98
Microsoft.Z3/Version.cs Normal file
View file

@ -0,0 +1,98 @@
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
Version.cs
Abstract:
Z3 Managed API: Version information
Author:
Christoph Wintersteiger (cwinter) 2012-03-16
Notes:
--*/
using System;
using System.Diagnostics.Contracts;
namespace Microsoft.Z3
{
/// <summary>
/// Version information.
/// </summary>
/// <remarks>Note that this class is static.</remarks>
[ContractVerification(true)]
public static class Version
{
static Version() { }
/// <summary>
/// The major version
/// </summary>
public static uint Major
{
get
{
uint major = 0, minor = 0, build = 0, revision = 0;
Native.Z3_get_version(ref major, ref minor, ref build, ref revision);
return major;
}
}
/// <summary>
/// The minor version
/// </summary>
public static uint Minor
{
get
{
uint major = 0, minor = 0, build = 0, revision = 0;
Native.Z3_get_version(ref major, ref minor, ref build, ref revision);
return minor;
}
}
/// <summary>
/// The build version
/// </summary>
public static uint Build
{
get
{
uint major = 0, minor = 0, build = 0, revision = 0;
Native.Z3_get_version(ref major, ref minor, ref build, ref revision);
return build;
}
}
/// <summary>
/// The revision
/// </summary>
public static uint Revision
{
get
{
uint major = 0, minor = 0, build = 0, revision = 0;
Native.Z3_get_version(ref major, ref minor, ref build, ref revision);
return revision;
}
}
/// <summary>
/// A string representation of the version information.
/// </summary>
new public static string ToString()
{
Contract.Ensures(Contract.Result<string>() != null);
uint major = 0, minor = 0, build = 0, revision = 0;
Native.Z3_get_version(ref major, ref minor, ref build, ref revision);
return major.ToString() + "." + minor.ToString() + "." + build.ToString() + "." + revision.ToString();
}
}
}