Gorgon
Show / Hide Table of Contents

Class GorgonComputerInfo

Information about the computer and operating system that is running Gorgon.

Inheritance
object
GorgonComputerInfo
Implements
IGorgonComputerInfo
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Diagnostics
Assembly: Gorgon.Windows.dll
Syntax
public class GorgonComputerInfo : IGorgonComputerInfo

Constructors

| Edit this page View Source

GorgonComputerInfo()

Initializes the GorgonComputerInfo class.

Declaration
public GorgonComputerInfo()

Properties

| Edit this page View Source

AvailablePhysicalRAM

Property to return the available physical RAM in bytes.

Declaration
public long AvailablePhysicalRAM { get; }
Property Value
Type Description
long
| Edit this page View Source

ComputerName

Property to return the name for the computer.

Declaration
public string ComputerName { get; }
Property Value
Type Description
string
| Edit this page View Source

MachineEnvironmentVariables

Property to return a list of machine specific environment variables.

Declaration
public IReadOnlyDictionary<string, string> MachineEnvironmentVariables { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>
| Edit this page View Source

OperatingSystemArchitecture

Property to return the architecture of the Operating System that Gorgon is running on.

Declaration
public PlatformArchitecture OperatingSystemArchitecture { get; }
Property Value
Type Description
PlatformArchitecture
Remarks

When the application that uses this class is run on a 64 bit version of windows, and on a 64 bit machine then this value will return x64, otherwise it will return x86.

| Edit this page View Source

OperatingSystemPlatform

Property to return the platform for the Operating System.

Declaration
public PlatformID OperatingSystemPlatform { get; }
Property Value
Type Description
PlatformID
| Edit this page View Source

OperatingSystemServicePack

Property to return the service pack that is applied to the operating system.

Declaration
public string OperatingSystemServicePack { get; }
Property Value
Type Description
string
| Edit this page View Source

OperatingSystemVersion

Property to return the version of the operating system.

Declaration
public Version OperatingSystemVersion { get; }
Property Value
Type Description
Version
| Edit this page View Source

OperatingSystemVersionText

Property to return the operating system version as a formatted text string.

Declaration
public string OperatingSystemVersionText { get; }
Property Value
Type Description
string
Remarks

This includes the platform, version number and service pack.

| Edit this page View Source

PlatformArchitecture

Property to return the platform that this instance of Gorgon was compiled for.

Declaration
public PlatformArchitecture PlatformArchitecture { get; }
Property Value
Type Description
PlatformArchitecture
Remarks

When the application that uses this class is run on a 64 bit version of windows, on a 64 bit machine, and the application is running as 64 bit, then this value will return x64, otherwise it will return x86.

| Edit this page View Source

ProcessEnvironmentVariables

Property to return a list of process specific environment variables.

Declaration
public IReadOnlyDictionary<string, string> ProcessEnvironmentVariables { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>
| Edit this page View Source

ProcessorCount

Property to return the number of processors in the computer.

Declaration
public int ProcessorCount { get; }
Property Value
Type Description
int
| Edit this page View Source

SystemDirectory

Property to return the system directory for the operating system.

Declaration
public string SystemDirectory { get; }
Property Value
Type Description
string
| Edit this page View Source

TotalPhysicalRAM

Property to return the total physical RAM available in bytes.

Declaration
public long TotalPhysicalRAM { get; }
Property Value
Type Description
long
| Edit this page View Source

UserEnvironmentVariables

Property to return a list of user specific environment variables.

Declaration
public IReadOnlyDictionary<string, string> UserEnvironmentVariables { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>

Methods

| Edit this page View Source

RefreshEnvironmentVariables()

Function to refresh the list of user and machine specific environment variables.

Declaration
public void RefreshEnvironmentVariables()
Remarks

This method will populate the MachineEnvironmentVariables, ProcessEnvironmentVariables, and the UserEnvironmentVariables properties with values from the environment variables for the operating system. These values cannot be modified from this class since this class is meant for information gathering only.

Implements

IGorgonComputerInfo

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author