This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

PenningtonBuildMode Pennington.Infrastructure

Detects whether the host is running in static-build mode (CLI verb "build") versus dev-serve mode. Centralized so every call site agrees on the array shape — param-style arrays from Main have the verb at index 0; GetCommandLineArgs has the executable at index 0 and the verb at index 1.

Methods

IsBuildMode

#
public static bool IsBuildMode(string[] args);

Returns true when args (param-style: verb at index 0) starts with the "build" verb. Use when a caller already has the args array forwarded from Main.

Parameters

args string[]

Returns

bool

IsBuildMode

#
public static bool IsBuildMode();

Returns true when the current process was launched with the "build" verb. Reads GetCommandLineArgs, slices off the executable at index 0, and delegates to IsBuildMode. Use from middleware, processors, and other components that don't receive Main's args directly.

Returns

bool

Pennington.Infrastructure.PenningtonBuildMode

namespace Pennington.Infrastructure;

/// Detects whether the host is running in static-build mode (CLI verb "build") versus dev-serve mode. Centralized so every call site agrees on the array shape — param-style arrays from Main have the verb at index 0; GetCommandLineArgs has the executable at index 0 and the verb at index 1.
public class PenningtonBuildMode
{
    /// Returns true when args (param-style: verb at index 0) starts with the "build" verb. Use when a caller already has the args array forwarded from Main.
    
public static bool IsBuildMode(string[] args);
/// Returns true when the current process was launched with the "build" verb. Reads GetCommandLineArgs, slices off the executable at index 0, and delegates to IsBuildMode. Use from middleware, processors, and other components that don't receive Main's args directly.
public static bool IsBuildMode();
}