Search Results for

    Show / Hide Table of Contents
    View Source

    Class MigrationEventArgs

    Provides data for events that occur during Umbraco database migrations.

    Inheritance
    object
    EventArgs
    CancellableEventArgs
    CancellableObjectEventArgs
    CancellableObjectEventArgs<IList<Type>>
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class MigrationEventArgs : CancellableObjectEventArgs<IList<Type>>

    Constructors

    View Source

    MigrationEventArgs(IList<Type>, SemVersion, SemVersion, string)

    Initializes a new instance of the MigrationEventArgs class.

    Declaration
    public MigrationEventArgs(IList<Type> migrationTypes, SemVersion configuredVersion, SemVersion targetVersion, string productName)
    Parameters
    Type Name Description
    IList<Type> migrationTypes

    A list of migration types that are being executed.

    SemVersion configuredVersion

    The version configured before the migration starts.

    SemVersion targetVersion

    The version to which the migration is being applied.

    string productName

    The name of the product undergoing migration.

    View Source

    MigrationEventArgs(IList<Type>, SemVersion, SemVersion, string, bool)

    Initializes a new instance of the MigrationEventArgs class.

    Declaration
    public MigrationEventArgs(IList<Type> migrationTypes, SemVersion configuredVersion, SemVersion targetVersion, string productName, bool canCancel)
    Parameters
    Type Name Description
    IList<Type> migrationTypes

    A list of migration types that are part of the migration process.

    SemVersion configuredVersion

    The version currently configured before migration begins.

    SemVersion targetVersion

    The version to which the migration will be performed.

    string productName

    The name of the product undergoing migration.

    bool canCancel

    True if the migration process can be cancelled; otherwise, false.

    Properties

    View Source

    ConfiguredSemVersion

    Gets the origin version of the migration, i.e. the one that is currently installed.

    Declaration
    public SemVersion ConfiguredSemVersion { get; }
    Property Value
    Type Description
    SemVersion
    View Source

    MigrationsTypes

    Returns all migrations that were used in the migration runner

    Declaration
    public IList<Type>? MigrationsTypes { get; }
    Property Value
    Type Description
    IList<Type>
    View Source

    ProductName

    Gets the product name.

    Declaration
    public string ProductName { get; }
    Property Value
    Type Description
    string
    View Source

    TargetSemVersion

    Gets the target version of the migration.

    Declaration
    public SemVersion TargetSemVersion { get; }
    Property Value
    Type Description
    SemVersion

    Methods

    View Source

    Equals(object?)

    Determines whether the specified object is equal to the current MigrationEventArgs instance.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current instance; otherwise, false.

    View Source

    Equals(MigrationEventArgs?)

    Determines whether the current MigrationEventArgs instance is equal to another instance of the same type.

    Declaration
    public bool Equals(MigrationEventArgs? other)
    Parameters
    Type Name Description
    MigrationEventArgs other

    The MigrationEventArgs to compare with the current instance.

    Returns
    Type Description
    bool

    true if the specified instance is equal to the current instance; otherwise, false.

    Remarks

    Equality is determined by comparing the values of ConfiguredSemVersion, MigrationContext, ProductName, and TargetSemVersion.

    View Source

    GetHashCode()

    Returns a hash code for this instance, based on its property values.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current MigrationEventArgs object.

    Operators

    View Source

    operator ==(MigrationEventArgs, MigrationEventArgs)

    Declaration
    public static bool operator ==(MigrationEventArgs left, MigrationEventArgs right)
    Parameters
    Type Name Description
    MigrationEventArgs left
    MigrationEventArgs right
    Returns
    Type Description
    bool
    View Source

    operator !=(MigrationEventArgs, MigrationEventArgs)

    Declaration
    public static bool operator !=(MigrationEventArgs left, MigrationEventArgs right)
    Parameters
    Type Name Description
    MigrationEventArgs left
    MigrationEventArgs right
    Returns
    Type Description
    bool
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX