ExtensionMagicCommand Class#
#!extension PackageId [Version] resolves a NuGet package, requests user consent,
loads extensions from its assemblies via ExtensionHost, and stores assembly
paths in the variable store so the CSharpKernel picks them up as MetadataReferences.
#!extension ./path/to/MyExtension.dll loads extensions directly from a local
assembly file. Paths are resolved relative to the notebook's directory. No consent dialog
is shown for local files.
public sealed class ExtensionMagicCommand : Verso.Abstractions.IMagicCommand, Verso.Abstractions.IExtension
Inheritance System.Object → ExtensionMagicCommand
Implements IMagicCommand, IExtension
Methods#
ScanForExtensionDirectives(NotebookModel) Method#
Scans all cells in a notebook for #!extension directives that reference
NuGet packages (not local file paths) and returns a deduplicated list of
ExtensionConsentInfo for consent prompting.
public static System.Collections.Generic.IReadOnlyList<Verso.Abstractions.ExtensionConsentInfo> ScanForExtensionDirectives(Verso.Abstractions.NotebookModel notebook);
Parameters#
notebook NotebookModel
Returns#
System.Collections.Generic.IReadOnlyList<ExtensionConsentInfo>