|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents information about an operating system, such as the version and platform identifier. More...
#include <OperatingSystem.h>
Public Member Functions | |
| OperatingSystem (PlatformID platform, const Version &version) | |
| Initializes a new instance of the OperatingSystem class, using the specified platform identifier and version object. | |
| PlatformID | GetPlatform () const |
| Gets a PlatformID value that identifies the operating system platform. | |
| String | GetServicePack () const |
| Gets the service pack version represented by this OperatingSystem object. | |
| const Version & | GetVersion () const |
| Gets a Version object that identifies the operating system. | |
| String | GetVersionString () const |
| Gets the concatenated string representation of the platform identifier and version. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static bool | IsLinux () |
| Indicates whether the current application is running on Linux. | |
| static bool | IsWindows () |
| Indicates whether the current application is running on Windows. | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Represents information about an operating system, such as the version and platform identifier.
Definition at line 33 of file OperatingSystem.h.
| DotNetDupe::System::OperatingSystem::OperatingSystem | ( | PlatformID | platform, |
| const Version & | version ) |
Initializes a new instance of the OperatingSystem class, using the specified platform identifier and version object.
| platform | One of the PlatformID values that indicates the operating system platform. |
| version | A Version object that indicates the version of the operating system. |
Definition at line 15 of file OperatingSystem.cpp.
Referenced by DotNetDupe::System::Environment::GetOperatingSystem().
| PlatformID DotNetDupe::System::OperatingSystem::GetPlatform | ( | ) | const |
Gets a PlatformID value that identifies the operating system platform.
Return stored platform identifier enumeration value.
Definition at line 18 of file OperatingSystem.cpp.
| String DotNetDupe::System::OperatingSystem::GetServicePack | ( | ) | const |
Gets the service pack version represented by this OperatingSystem object.
Query extended OS version info via ntdll RtlGetVersion to bypass manifest compatibility checks.
Convert wide CSDVersion string to UTF-8.
Definition at line 28 of file OperatingSystem.cpp.
References DotNetDupe::System::String::String(), and DotNetDupe::System::Internal::WCharToUtf8().
| const Version & DotNetDupe::System::OperatingSystem::GetVersion | ( | ) | const |
Gets a Version object that identifies the operating system.
Return stored operating system version reference.
Definition at line 23 of file OperatingSystem.cpp.
| String DotNetDupe::System::OperatingSystem::GetVersionString | ( | ) | const |
Gets the concatenated string representation of the platform identifier and version.
Format operating system version string.
Definition at line 51 of file OperatingSystem.cpp.
References DotNetDupe::System::String::ToString().
|
static |
Indicates whether the current application is running on Linux.
Definition at line 65 of file OperatingSystem.cpp.
|
static |
Indicates whether the current application is running on Windows.
Platform compile target is Windows.
Definition at line 56 of file OperatingSystem.cpp.