Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoPlan

    Represents the Umbraco CMS migration plan.

    Inheritance
    object
    MigrationPlan
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Upgrade
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class UmbracoPlan : MigrationPlan

    Constructors

    View Source

    UmbracoPlan(IUmbracoVersion)

    Initializes a new instance of the UmbracoPlan class.

    Declaration
    public UmbracoPlan(IUmbracoVersion umbracoVersion)
    Parameters
    Type Name Description
    IUmbracoVersion umbracoVersion

    The Umbraco version.

    Properties

    View Source

    InitialState

    Gets the initial state.

    Declaration
    public override string InitialState { get; }
    Property Value
    Type Description
    string
    Remarks

    The initial state is the state when the plan has never run. By default, it is the empty string, but plans may override it if they have other ways of determining where to start from.

    Methods

    View Source

    DefinePlan()

    Defines the plan.

    Declaration
    protected virtual void DefinePlan()
    Remarks

    This is virtual for testing purposes.

    View Source

    GetVersionForState(string?)

    Resolves the semantic version corresponding to a migration state in this plan.

    Declaration
    public SemVersion? GetVersionForState(string? state)
    Parameters
    Type Name Description
    string state

    The migration state to resolve.

    Returns
    Type Description
    SemVersion

    The semantic version for the state, or null if the state is not found.

    Remarks

    Walks the transition chain from InitialState and extracts version numbers from migration type namespaces (convention: V_{major}{minor}{patch}).

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX