using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System
{
/// Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited.
/// 2
// Token: 0x0200069B RID: 1691
[ComVisible(true)]
[Serializable]
public sealed class OperatingSystem : ICloneable, ISerializable
{
/// Initializes a new instance of the class, using the specified platform identifier value and version object.
/// One of the values that indicates the operating system platform.
/// A object that indicates the version of the operating system.
///
/// is null.
///
/// is not a enumeration value.
// Token: 0x06004054 RID: 16468 RVA: 0x000DB6A8 File Offset: 0x000D98A8
public OperatingSystem(PlatformID platform, Version version)
{
if (version == null)
{
throw new ArgumentNullException("version");
}
this._platform = platform;
this._version = version;
}
/// Gets a enumeration value that identifies the operating system platform.
/// One of the values.
/// 2
// Token: 0x17000BE2 RID: 3042
// (get) Token: 0x06004055 RID: 16469 RVA: 0x000DB6EC File Offset: 0x000D98EC
public PlatformID Platform
{
get
{
return this._platform;
}
}
/// Gets a object that identifies the operating system.
/// A object that describes the major version, minor version, build, and revision numbers for the operating system.
/// 2
// Token: 0x17000BE3 RID: 3043
// (get) Token: 0x06004056 RID: 16470 RVA: 0x000DB6F4 File Offset: 0x000D98F4
public Version Version
{
get
{
return this._version;
}
}
/// Gets the service pack version represented by this object.
/// The service pack version, if service packs are supported and at least one is installed; otherwise, an empty string ("").
/// 2
// Token: 0x17000BE4 RID: 3044
// (get) Token: 0x06004057 RID: 16471 RVA: 0x000DB6FC File Offset: 0x000D98FC
public string ServicePack
{
get
{
return this._servicePack;
}
}
/// Gets the concatenated string representation of the platform identifier, version, and service pack that are currently installed on the operating system.
/// The string representation of the values returned by the , , and properties.
/// 2
// Token: 0x17000BE5 RID: 3045
// (get) Token: 0x06004058 RID: 16472 RVA: 0x000DB704 File Offset: 0x000D9904
public string VersionString
{
get
{
return this.ToString();
}
}
/// Creates an object that is identical to this instance.
/// An object that is a copy of this instance.
/// 2
// Token: 0x06004059 RID: 16473 RVA: 0x000DB70C File Offset: 0x000D990C
public object Clone()
{
return new OperatingSystem(this._platform, this._version);
}
/// Populates a object with the data necessary to deserialize this instance.
/// The object to populate with serialization information.
/// The place to store and retrieve serialized data. Reserved for future use.
///
/// is null.
/// 2
// Token: 0x0600405A RID: 16474 RVA: 0x000DB720 File Offset: 0x000D9920
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("_platform", this._platform);
info.AddValue("_version", this._version);
info.AddValue("_servicePack", this._servicePack);
}
/// Converts the value of this object to its equivalent string representation.
/// The string representation of the values returned by the , , and properties.
/// 2
// Token: 0x0600405B RID: 16475 RVA: 0x000DB768 File Offset: 0x000D9968
public override string ToString()
{
int platform = (int)this._platform;
string text;
switch (platform)
{
case 0:
text = "Microsoft Win32S";
goto IL_96;
case 1:
text = "Microsoft Windows 98";
goto IL_96;
case 2:
text = "Microsoft Windows NT";
goto IL_96;
case 3:
text = "Microsoft Windows CE";
goto IL_96;
case 4:
break;
case 5:
text = "XBox";
goto IL_96;
case 6:
text = "OSX";
goto IL_96;
default:
if (platform != 128)
{
text = Locale.GetText("");
goto IL_96;
}
break;
}
text = "Unix";
IL_96:
return text + " " + this._version.ToString();
}
// Token: 0x04001991 RID: 6545
private PlatformID _platform;
// Token: 0x04001992 RID: 6546
private Version _version;
// Token: 0x04001993 RID: 6547
private string _servicePack = string.Empty;
}
}