Struct MigrationStep<TVersion, TTarget>
Define a migration step.
Implements
IEquatable<MigrationStep<TVersion, TTarget>>
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
public struct MigrationStep<TVersion, TTarget> : IEquatable<MigrationStep<TVersion, TTarget>> where TVersion : struct, IConvertible where TTarget : class, IVersionable<TVersion>
Type Parameters
Name | Description |
---|---|
TVersion | An enum identifying the version. |
TTarget | The type to migrate. |
Constructors
MigrationStep(TVersion, Action<TTarget>)
Create a new migration step.
Declaration
public MigrationStep(TVersion version, Action<TTarget> action)
Parameters
Type | Name | Description |
---|---|---|
TVersion | version | The version of the step. |
Action<TTarget> | action | The migration action to perform. |
Fields
Version
The version of the step.
Declaration
public readonly TVersion Version
Field Value
Type | Description |
---|---|
TVersion |
Methods
Equals(MigrationStep<TVersion, TTarget>)
Evaluate equality between migration steps.
Declaration
public bool Equals(MigrationStep<TVersion, TTarget> other)
Parameters
Type | Name | Description |
---|---|---|
MigrationStep<TVersion, TTarget> | other | Other step to evaluate. |
Returns
Type | Description |
---|---|
bool | True when the steps are equals. |
Migrate(TTarget)
Migrate the instance for this step and set the version of the instance to this version.
If the instance has a version greater or equal to the step one, nothing will be applied.
Declaration
public void Migrate(TTarget target)
Parameters
Type | Name | Description |
---|---|---|
TTarget | target | The instance to migrate. |