Docs · API reference · Verso.Serializers.Migrations

NotebookMigrationPipeline Class#

Upgrades a parsed NotebookModel from its declared format version to Current by walking a chain of registered INotebookMigration steps. Migrations are pure-data transforms; host-dependent resolution is performed separately during notebook wire-up.

public sealed class NotebookMigrationPipeline

Inheritance System.Object → NotebookMigrationPipeline

Constructors#

NotebookMigrationPipeline(IEnumerable<INotebookMigration>) Constructor#

Creates a pipeline over the given migrations. The order they are supplied in does not matter; the chain is walked by matching each step's From.

public NotebookMigrationPipeline(System.Collections.Generic.IEnumerable<Verso.Abstractions.INotebookMigration> migrations);

Parameters#

migrations System.Collections.Generic.IEnumerable<INotebookMigration>

Properties#

Default Property#

The built-in pipeline, pre-registered with the shipped migrations.

public static Verso.Serializers.Migrations.NotebookMigrationPipeline Default { get; }

Property Value#

NotebookMigrationPipeline

Methods#

Run(NotebookModel) Method#

Migrates notebook in place toward the current format version and stamps the version it reached. Returns a log of applied steps and warnings. A document declaring a newer version than this build supports is left untouched and a warning is recorded.

public Verso.Abstractions.NotebookMigrationLog Run(Verso.Abstractions.NotebookModel notebook);

Parameters#

notebook NotebookModel

Returns#

NotebookMigrationLog