IExtension Interface#
Base interface for all Verso extensions. Provides identity, metadata, and lifecycle hooks that the extension host calls when loading and unloading an extension.
public interface IExtension
Derived
↳ ICellPropertyProvider
↳ ICellRenderer
↳ ICellType
↳ IDataFormatter
↳ ILanguageKernel
↳ ILayoutEngine
↳ ILayoutInteractionHandler
↳ ILayoutLifecycleHandler
↳ IMagicCommand
↳ INotebookPanel
↳ INotebookPostProcessor
↳ INotebookSerializer
↳ IPanelInteractionHandler
↳ ITheme
↳ IToolbarAction
Properties#
Author Property#
Optional author or publisher name.
string? Author { get; }
Property Value#
Description Property#
Optional short description of what the extension provides.
string? Description { get; }
Property Value#
Remarks#
One class is one contribution, so for a IToolbarAction or an INotebookPanel this doubles as the description of that button or panel: hosts show it beneath the name in the control's tooltip. Since those controls are often an icon with no label, a sentence saying what the thing does is worth more here than a restatement of its name.
ExtensionId Property#
Unique identifier for this extension, typically in reverse-domain format (e.g. "com.example.myext").
string ExtensionId { get; }
Property Value#
Name Property#
Human-readable display name shown in the UI and extension listings.
string Name { get; }
Property Value#
Version Property#
Semantic version string for the extension (e.g. "1.2.0").
string Version { get; }
Property Value#
Methods#
OnLoadedAsync(IExtensionHostContext) Method#
Called by the host when the extension is loaded. Use this to register services, subscribe to events, and perform any asynchronous initialization.
System.Threading.Tasks.Task OnLoadedAsync(Verso.Abstractions.IExtensionHostContext context);
Parameters#
context IExtensionHostContext
Host context providing access to Verso services and registration APIs.
Returns#
System.Threading.Tasks.Task
A task that completes when the extension has finished loading.
OnUnloadedAsync() Method#
Called by the host when the extension is being unloaded. Use this to release resources, unsubscribe from events, and perform cleanup.
System.Threading.Tasks.Task OnUnloadedAsync();
Returns#
System.Threading.Tasks.Task
A task that completes when the extension has finished unloading.