Class ScyllaInputActionsMetadataMigrator
Brings a ScyllaInputActionsMetadata asset forward to the schema version this build understands.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public static class ScyllaInputActionsMetadataMigrator
Remarks
The chain exists from the first release rather than being added when it is first needed, so the first real migration is not also the migrator's first outing. The version 0 step is not a placeholder: it runs against any asset predating the schema field or hand-edited to zero, and is exercised by tests.
Nothing here touches the asset database. Migration mutates the object in memory and reports whether anything changed; persisting that is the caller's job, because this type lives in the runtime assembly.
Methods
Migrate(ScyllaInputActionsMetadata, out IReadOnlyList<string>)
Runs every migration step between the asset's version and the current one.
Declaration
public static bool Migrate(ScyllaInputActionsMetadata metadata, out IReadOnlyList<string> log)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaInputActionsMetadata | metadata | The asset to migrate. |
| IReadOnlyList<string> | log | One line per step applied, empty when nothing ran. |
Returns
| Type | Description |
|---|---|
| bool |
|
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when the asset is |
NeedsMigration(ScyllaInputActionsMetadata)
Reports whether an asset is behind the current schema version.
Declaration
public static bool NeedsMigration(ScyllaInputActionsMetadata metadata)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaInputActionsMetadata | metadata | The asset to check. |
Returns
| Type | Description |
|---|---|
| bool |
|