Skip to content
ConsoleMonster
Class

DemoScript

ConsoleMonster.Demos

Namespace
ConsoleMonster.Demos
Assembly
ConsoleMonster
Modifiers
sealed

Plain PowerShell commands with optional # demo: presentation directives.

Inheritance

  • object
  • DemoScript

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 2

Methods

public static DemoScript Parse(string source) #

Parses commands and directives. Multiline strings, blocks, pipelines and here-strings remain one command.

Parameters

source string required

Returns

DemoScript
public static DemoScript Read(string path) #

Reads a UTF-8 demo file.

Parameters

path string required

Returns

DemoScript

Properties

public IReadOnlyList<DemoStep> Steps { get; } #

Steps in source order. Parsing does not execute PowerShell.

public string? SourcePath { get; private set; } #

Original file path for PowerShell's PSScriptRoot and PSCommandPath, or null for parsed text.