Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions Microsoft.Research/Contracts/MsCorlib/System.OperatingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,57 @@ public class OperatingSystem: ICloneable

public PlatformID Platform
{
get { return default(PlatformID); }
[Pure]
get
{
Contract.Ensures(Contract.Result<PlatformID>() >= PlatformID.Win32S);
Contract.Ensures(Contract.Result<PlatformID>() <= PlatformID.MacOSX);
return default(PlatformID);
}
}

public string ServicePack
{
[Pure]
get
{
Contract.Ensures(Contract.Result<string>() != null);
return default(string);
}
}

public Version Version
{
get { return default(Version); }
[Pure]
get
{
Contract.Ensures(Contract.Result<Version>() != null);
return default(Version);
}
}

public string VersionString
{
get
{
Contract.Ensures(!string.IsNullOrWhitespace(Contract.Result<string>()));
return default(string);
}
}

public object Clone()
{

return default(object);
}

public OperatingSystem(PlatformID platform, Version version)
{
Contract.Requires(platform >= PlatformID.Win32S)
Contract.Requires(platform <= PlatformID.MacOSX)
Contract.Requires(version != null);
Contract.EnsuresOnThrow<ArgumentException>(true, "platform is not a PlatformID enumeration value.")
Contract.EnsuresOnThrow<ArgumentNullException>(true, "version is null.")
}
}
}