This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

AssemblyVersionShortcode Pennington.Markdown.Shortcodes

Built-in shortcode that emits the running host application's version string. Resolves GetEntryAssembly, then prefers the assembly's informational version (which captures Git SHA / pre-release suffixes set by MSBuild) and falls back to the file version and finally "unknown" when no entry assembly is available (test hosts, some embedded scenarios). The optional format named argument accepts full (default), major, minor, and informational.

Properties

Name string
Case-insensitive name used to dispatch <?# Name ... ?> invocations.

Methods

ExecuteAsync

#
public Task<string> ExecuteAsync(ShortcodeInvocation invocation, ShortcodeContext context, CancellationToken cancellationToken)

Produces the replacement text for one invocation. invocation carries the parsed arguments and inline content (null for self-closing tags); context carries the host page's route and metadata.

Parameters

invocation ShortcodeInvocation
context ShortcodeContext
cancellationToken CancellationToken

Returns

Task<string>

Pennington.Markdown.Shortcodes.AssemblyVersionShortcode

namespace Pennington.Markdown.Shortcodes;

/// Built-in shortcode that emits the running host application's version string. Resolves GetEntryAssembly, then prefers the assembly's informational version (which captures Git SHA / pre-release suffixes set by MSBuild) and falls back to the file version and finally "unknown" when no entry assembly is available (test hosts, some embedded scenarios). The optional format named argument accepts full (default), major, minor, and informational.
public class AssemblyVersionShortcode
{
    /// Produces the replacement text for one invocation. invocation carries the parsed arguments and inline content (null for self-closing tags); context carries the host page's route and metadata.
    
public Task<string> ExecuteAsync(ShortcodeInvocation invocation, ShortcodeContext context, CancellationToken cancellationToken)
; /// Case-insensitive name used to dispatch <?# Name ... ?> invocations.
public string Name { get; }
}