NotebookModel Class#
Mutable model representing a full Verso notebook document, including its cells, metadata, and layout configuration.
public sealed class NotebookModel
Inheritance System.Object → NotebookModel
Properties#
ActiveLayout Property#
Gets or sets the qualified LayoutReference for the currently active layout,
or null if no layout is selected. Legacy bare-string references read from
older notebooks land here with an empty ExtensionId and are
resolved when the notebook is wired up to the extension host.
public System.Nullable<Verso.Abstractions.LayoutReference> ActiveLayout { get; set; }
Property Value#
System.Nullable<LayoutReference>
ActiveLayoutId Property#
Convenience accessor exposing just the LayoutId half of the active layout. Retained as a compatibility forwarder for callers that have not yet been migrated to the qualified ActiveLayout shape, and slated for removal in a future release.
public string? ActiveLayoutId { get; set; }
Property Value#
Remarks#
The setter is obsolete. A bare layout id cannot name its owning extension, so an assignment produces an unqualified ActiveLayout that is resolved against the loaded extension set at wire-up time, and only when exactly one loaded layout carries that id. When the assigned id matches the current ActiveLayout, the existing ExtensionId is preserved so a qualified reference is not silently downgraded to an unqualified one. Set ActiveLayout directly to name an unambiguous layout.
Cells Property#
Gets or sets the ordered list of cells that make up the notebook content.
public System.Collections.Generic.List<Verso.Abstractions.CellModel> Cells { get; set; }
Property Value#
System.Collections.Generic.List<CellModel>
Created Property#
Gets or sets the timestamp when the notebook was created.
public System.Nullable<System.DateTimeOffset> Created { get; set; }
Property Value#
System.Nullable<System.DateTimeOffset>
DefaultKernelId Property#
Gets or sets the identifier of the default language kernel used for new code cells.
public string? DefaultKernelId { get; set; }
Property Value#
ExtensionSettings Property#
Gets or sets per-extension settings keyed by extension ID. Only overridden values (not defaults) are persisted.
public System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,object?>> ExtensionSettings { get; set; }
Property Value#
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.Object>>
FormatVersion Property#
Gets or sets the notebook file format version string.
public string FormatVersion { get; set; }
Property Value#
Layouts Property#
Gets or sets named layout definitions that control how cells are arranged in the notebook UI.
public System.Collections.Generic.Dictionary<string,object> Layouts { get; set; }
Property Value#
System.Collections.Generic.Dictionary<System.String,System.Object>
Modified Property#
Gets or sets the timestamp when the notebook was last modified.
public System.Nullable<System.DateTimeOffset> Modified { get; set; }
Property Value#
System.Nullable<System.DateTimeOffset>
OptionalExtensions Property#
Gets or sets the list of extension identifiers that may enhance this notebook but are not required.
public System.Collections.Generic.List<string> OptionalExtensions { get; set; }
Property Value#
System.Collections.Generic.List<System.String>
Parameters Property#
Gets or sets typed parameter definitions keyed by parameter name. When present, parameters are injected into the variable store before execution.
public System.Collections.Generic.Dictionary<string,Verso.Abstractions.NotebookParameterDefinition>? Parameters { get; set; }
Property Value#
System.Collections.Generic.Dictionary<System.String,NotebookParameterDefinition>
PreferredThemeId Property#
Gets or sets the identifier of the preferred theme, or null if no theme preference is set.
public string? PreferredThemeId { get; set; }
Property Value#
RequiredExtensions Property#
Gets or sets the list of extension identifiers that must be loaded for this notebook to function.
public System.Collections.Generic.List<string> RequiredExtensions { get; set; }
Property Value#
System.Collections.Generic.List<System.String>
RequiresLegacyLayoutResolution Property#
True when this model was loaded from a legacy notebook whose activeLayout was
a bare string and required resolution against the loaded extension set. Not persisted;
consumed by the host wire-up to decide whether to run legacy resolution and whether
the next serialize should promote the on-disk form.
public bool RequiresLegacyLayoutResolution { get; set; }
Property Value#
Title Property#
Gets or sets the display title of the notebook, or null if untitled.
public string? Title { get; set; }