namespace S22.Sasl.Mechanisms.Ntlm {
///
/// Indicates the version and build number of the operating system.
///
internal class OSVersion {
///
/// The major version number of the operating system.
///
public byte MajorVersion {
get;
set;
}
///
/// The minor version number of the operating system.
///
public byte MinorVersion {
get;
set;
}
///
/// The build number of the operating system.
///
public short BuildNumber {
get;
set;
}
///
/// Default constructor.
///
public OSVersion() {
}
///
/// Creates a new instance of the OSVersion class using the specified
/// values.
///
/// The major version of the operating
/// system.
/// The minor version of the operating
/// system.
/// The build number of the operating systen.
public OSVersion(byte majorVersion, byte minorVersion, short buildNumber) {
MajorVersion = majorVersion;
MinorVersion = minorVersion;
BuildNumber = buildNumber;
}
///
/// Serializes this instance of the OSVersion class to an array of
/// bytes.
///
/// An array of bytes representing this instance of the OSVersion
/// class.
public byte[] Serialize() {
return new ByteBuilder()
.Append(MajorVersion)
.Append(MinorVersion)
.Append(BuildNumber)
.Append(0, 0, 0, 0x0F)
.ToArray();
}
}
}