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
Namestring- 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
invocationShortcodeInvocationcontextShortcodeContextcancellationTokenCancellationToken
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; }
}