Gorgon
Show / Hide Table of Contents

Interface IGorgonComputerInfo

Provides information about the current platform.

Namespace: Gorgon.Diagnostics
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonComputerInfo
Remarks

Ths interface will only be implemented on a platform specific assembly (e.g. Gorgon.Windows) since it requires platform specific functionality.

Properties

| Edit this page View Source

AvailablePhysicalRAM

Property to return the available physical RAM in bytes.

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

ComputerName

Property to return the name for the computer.

Declaration
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
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
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
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
string OperatingSystemServicePack { get; }
Property Value
Type Description
string
| Edit this page View Source

OperatingSystemVersion

Property to return the version of the operating system.

Declaration
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
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
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
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
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
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
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
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
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.

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