Environment

Overview

Helper class to access information about the current process environment.

Location

 

constructor  protected

 

constructor

 

Environment()

 

init()

 

Environment()

 

Sub New()

BinaryArchitecture

 

class property BinaryArchitecture: String read;

 

class String BinaryArchitecture { get; }

 

static var BinaryArchitecture: String { get{} }

 

class String BinaryArchitecture { __get; }

 

Shared ReadOnly Property BinaryArchitecture() As String

CurrentDirectory Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

 

Shared Function CurrentDirectory() As String

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Exit

 

class method Exit(aCode: Int32)

 

static void Exit(Int32 aCode)

 

static func Exit(_ aCode: Int32)

 

static void Exit(Int32 aCode)

 

Shared Sub Exit(aCode As Int32)

Parameters:

  • aCode:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetCommandLine

 

class method GetCommandLine: String

 

static String GetCommandLine()

 

static func GetCommandLine() -> String

 

static String GetCommandLine()

 

Shared Function GetCommandLine() As String

GetCommandLineArgs

 

class method GetCommandLineArgs: array of String

 

static String[] GetCommandLineArgs()

 

static func GetCommandLineArgs() -> String...

 

static String[] GetCommandLineArgs()

 

Shared Function GetCommandLineArgs() As String()

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

 

Shared Function GetEnvironmentVariable(Name As String) As String

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

Shared Function GetEnvironmentVariables() As ImmutableDictionary<String, String>

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

 

Shared ReadOnly Property NewLine() As String

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

 

Shared ReadOnly Property OSName() As String

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

 

Shared ReadOnly Property OSVersion() As String

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

 

Shared Function ProcessorCount() As Int32

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

Shared Function SetEnvironmentVariable(Name As String, Value As String) As Boolean

Parameters:

  • Name:
  • Value:

SubMode

 

class property SubMode: String read;

 

class String SubMode { get; }

 

static var SubMode: String { get{} }

 

class String SubMode { __get; }

 

Shared ReadOnly Property SubMode() As String

TempFolder Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

 

Shared Function TempFolder() As Folder

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

UserHomeFolder Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

 

Shared Function UserHomeFolder() As Folder

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

Shared ReadOnly Property UserName() As String

 

BinaryArchitecture

 

class property BinaryArchitecture: String read;

 

class String BinaryArchitecture { get; }

 

static var BinaryArchitecture: String { get{} }

 

class String BinaryArchitecture { __get; }

 

Shared ReadOnly Property BinaryArchitecture() As String

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

 

Shared ReadOnly Property NewLine() As String

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

 

Shared ReadOnly Property OSName() As String

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

 

Shared ReadOnly Property OSVersion() As String

SubMode

 

class property SubMode: String read;

 

class String SubMode { get; }

 

static var SubMode: String { get{} }

 

class String SubMode { __get; }

 

Shared ReadOnly Property SubMode() As String

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

Shared ReadOnly Property UserName() As String

 

CurrentDirectory Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

 

Shared Function CurrentDirectory() As String

Exit

 

class method Exit(aCode: Int32)

 

static void Exit(Int32 aCode)

 

static func Exit(_ aCode: Int32)

 

static void Exit(Int32 aCode)

 

Shared Sub Exit(aCode As Int32)

Parameters:

  • aCode:

GetCommandLine

 

class method GetCommandLine: String

 

static String GetCommandLine()

 

static func GetCommandLine() -> String

 

static String GetCommandLine()

 

Shared Function GetCommandLine() As String

GetCommandLineArgs

 

class method GetCommandLineArgs: array of String

 

static String[] GetCommandLineArgs()

 

static func GetCommandLineArgs() -> String...

 

static String[] GetCommandLineArgs()

 

Shared Function GetCommandLineArgs() As String()

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

 

Shared Function GetEnvironmentVariable(Name As String) As String

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

Shared Function GetEnvironmentVariables() As ImmutableDictionary<String, String>

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

 

Shared Function ProcessorCount() As Int32

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

Shared Function SetEnvironmentVariable(Name As String, Value As String) As Boolean

Parameters:

  • Name:
  • Value:

TempFolder Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

 

Shared Function TempFolder() As Folder

UserHomeFolder Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

 

Shared Function UserHomeFolder() As Folder

 

constructor  protected

 

constructor

 

Environment()

 

init()

 

Environment()

 

Sub New()

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String