LanguageExt.Sys

LanguageExt.Sys Sys

Contents

Sub modules

IO

class Console <RT> Source #

where RT : struct, HasConsole<RT>

Time IO

Properties

property Eff<RT, ConsoleKeyInfo> readKey Source #

Read a key from the console

property Producer<RT, ConsoleKeyInfo, Unit> readKeys Source #

Read keys from the console and push them downstream

property Eff<RT, Unit> clear Source #

Clear the console

property Eff<RT, int> read Source #

Read from the console

property Producer<RT, int, Unit> reads Source #

Read chars from the console and push them downstream

property Eff<RT, string> readLine Source #

Read from the console

property Producer<RT, string, Unit> readLines Source #

Read lines from the console and push them downstream

property Eff<RT, Unit> writeEmptyLine Source #

Write an empty line to the console

property Eff<RT, ConsoleColor> bgColor Source #

property Eff<RT, ConsoleColor> color Source #

Methods

method Eff<RT, Unit> writeLine (string line) Source #

Write a line to the console (returning unit)

method Eff<RT, string> writeLine2 (string line) Source #

Write a line to the console (returning the original line)

method Eff<RT, Unit> write (string line) Source #

Write a string to the console

method Eff<RT, Unit> write (char line) Source #

Write a string to the console

method Eff<RT, Unit> setBgColor (ConsoleColor color) Source #

method Eff<RT, Unit> setColor (ConsoleColor color) Source #

method Eff<RT, Unit> resetColor () Source #

class Enc <RT> Source #

where RT : struct, HasEncoding<RT>

Properties

property Eff<RT, System.Text.Encoding> encoding Source #

Encoding

Parameters

type RT

Runtime environment

returns

Encoding

class Environment <RT> Source #

where RT : struct, HasEnvironment<RT>

Environment IO

Properties

property Eff<RT, string> commandLine Source #

Gets the command line for this process.

property Eff<RT, int> currentManagedThreadId Source #

Gets a unique identifier for the current managed thread.

property Eff<RT, int> exitCode Source #

Gets the exit code of the process.

property Eff<RT, Seq<string>> commandLineArgs Source #

Returns a string array containing the command-line arguments for the current process.

property Eff<RT, HashMap<string, string>> environmentVariables Source #

Retrieves all environment variable names and their values from the current process.

property Eff<RT, Seq<string>> logicalDrives Source #

Returns an array of string containing the names of the logical drives on the current computer.

property Eff<RT, bool> hasShutdownStarted Source #

Gets a value that indicates whether the current application domain is being unloaded or the common language runtime (CLR) is shutting down.

property Eff<RT, bool> is64BitOperatingSystem Source #

Determines whether the current operating system is a 64-bit operating system.

property Eff<RT, bool> is64BitProcess Source #

Determines whether the current process is a 64-bit process.

property Eff<RT, string> machineName Source #

Gets the NetBIOS name of this local computer.

property Eff<RT, string> newLine Source #

Gets the newline string defined for this environment.

property Eff<RT, OperatingSystem> osVersion Source #

Gets an OperatingSystem object that contains the current platform identifier and version number.

property Eff<RT, int> processorCount Source #

Gets the number of processors on the current machine.

property Eff<RT, string> stackTrace Source #

Gets current stack trace information.

property Eff<RT, string> systemDirectory Source #

Gets the fully qualified path of the system directory.

property Eff<RT, int> systemPageSize Source #

Gets the number of bytes in the operating system's memory page.

property Eff<RT, int> tickCount Source #

Gets the number of milliseconds elapsed since the system started.

property Eff<RT, string> userDomainName Source #

Gets the network domain name associated with the current user.

property Eff<RT, bool> userInteractive Source #

Gets a value indicating whether the current process is running in user interactive mode.

property Eff<RT, string> userName Source #

Gets the user name of the person who is currently logged on to the operating system.

property Eff<RT, Version> version Source #

Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.

property Eff<RT, long> workingSet Source #

Gets the amount of physical memory mapped to the process context.

Methods

method Eff<RT, Unit> exit (int exitCode) Source #

Terminates this process and returns an exit code to the operating system.

method Eff<RT, Unit> setExitCode (int exitCode) Source #

Sets the exit code of the process.

Parameters

param exitCode

exit code of the process

method Eff<RT, string> expandEnvironmentVariables (string name) Source #

Replaces the name of each environment variable embedded in the specified string with the string equivalent of the value of the variable, then returns the resulting string.

Parameters

param name

A string containing the names of zero or more environment variables. Each environment variable is quoted with the percent sign character (%).

method Eff<RT, Unit> failFast (Option<string> message) Source #

Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message in error reporting to Microsoft.

Parameters

param message

A message that explains why the process was terminated, or null if no explanation is provided.

method Eff<RT, Unit> failFast (Option<string> message, Option<Exception> exception) Source #

Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message and exception information in error reporting to Microsoft.

Parameters

param message

A message that explains why the process was terminated, or null if no explanation is provided.

param exception

An exception that represents the error that caused the termination. This is typically the exception in a catch block.

method Eff<RT, Option<string>> getEnvironmentVariable (string variable) Source #

Retrieves the value of an environment variable from the current process.

Parameters

param variable

The name of an environment variable.

method Eff<RT, Option<string>> getEnvironmentVariable (string variable, EnvironmentVariableTarget target) Source #

Retrieves the value of an environment variable from the current process or from the Windows operating system registry key for the current user or local machine.

Parameters

param variable

The name of an environment variable.

param target

Target

method Eff<RT, HashMap<string, string>> getEnvironmentVariables (System.EnvironmentVariableTarget target) Source #

Retrieves all environment variable names and their values from the current process, or from the Windows operating system registry key for the current user or local machine.

Parameters

param target

One of the System.EnvironmentVariableTarget values. Only System.EnvironmentVariableTarget.Process is supported on .NET Core running on Unix-based systems.

method Eff<RT, string> getFolderPath (System.Environment.SpecialFolder folder) Source #

Gets the path to the system special folder that is identified by the specified enumeration.

Parameters

param folder

One of enumeration values that identifies a system special folder.

method Eff<RT, string> getFolderPath (System.Environment.SpecialFolder folder, System.Environment.SpecialFolderOption option) Source #

Gets the path to the system special folder that is identified by the specified enumeration, and uses a specified option for accessing special folders.

Parameters

param folder

One of the enumeration values that identifies a system special folder.

param option

One of the enumeration values that specifies options to use for accessing a special folder.

method Eff<RT, Unit> setEnvironmentVariable (string variable, Option<string> value) Source #

Creates, modifies, or deletes an environment variable stored in the current process.

Parameters

param variable

The name of an environment variable.

param value

A value to assign to variable .

method Eff<RT, Unit> SetEnvironmentVariable (string variable, Option<string> value, EnvironmentVariableTarget target) Source #

Creates, modifies, or deletes an environment variable stored in the current process or in the Windows operating system registry key reserved for the current user or local machine.

Parameters

param variable

The name of an environment variable.

param value

A value to assign to variable.

param target

One of the enumeration values that specifies the location of the environment variable.

class Time <RT> Source #

where RT : struct, HasTime<RT>

DateTime IO

Properties

property Eff<RT, DateTime> now Source #

Current local date time

property Eff<RT, DateTime> nowUTC Source #

Current universal date time

property Eff<RT, DateTime> today Source #

Today's date

Methods

method Aff<RT, Unit> sleepUntil (DateTime dt) Source #

Pause a task until a specified time

method Aff<RT, Unit> sleepFor (TimeSpan ts) Source #

Pause a task until for a specified length of time