EnvironmentAliases Class

Summary

Contains functionality related to the environment.
Namespace
Cake.Common
Base Types
  • object
graph BT Type-->Base0["object"] Type["EnvironmentAliases"] class Type type-node

Syntax

[CakeAliasCategory("Environment")]
public static class EnvironmentAliases

Attributes

Type Description
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Methods

Name Value Summary
EnvironmentVariable(ICakeContext, string) string
Retrieves the value of the environment variable or null if the environment variable does not exist.
static
EnvironmentVariable<T>(ICakeContext, string, T) T
Retrieves the value of the environment variable or defaultValue if the environment variable does not exist.
static
EnvironmentVariables(ICakeContext) IDictionary<string, string>
Retrieves all environment variables.
static
HasEnvironmentVariable(ICakeContext, string) bool
Checks for the existence of a value for a given environment variable.
static
IsRunningOnLinux(ICakeContext) bool
Determines whether the build script running on a Linux based system.
static
IsRunningOnMacOs(ICakeContext) bool
Determines whether the build script running on a macOS based system.
static
IsRunningOnUnix(ICakeContext) bool
Determines whether the build script running on a Unix or Linux based system.
static
IsRunningOnWindows(ICakeContext) bool
Determines whether the build script is running on Windows.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin