Interface ISchemaRegistrar
Allows callers to register component types and migrations for dry-run validation.
public interface ISchemaRegistrar
Methods
RegisterByteMigration(string, int, int, int, int, ByteMigrationFunc)
Registers a byte-level migration for a component whose old struct type is no longer available in code.
void RegisterByteMigration(string name, int fromRev, int toRev, int oldSize, int newSize, ByteMigrationFunc func)
Parameters
namestringComponent (schema) name.
fromRevintSource revision.
toRevintTarget revision.
oldSizeintByte size of the old component layout.
newSizeintByte size of the new component layout.
funcByteMigrationFuncDelegate that transforms the raw old bytes into the raw new bytes.
RegisterComponent<T>()
Registers component type T for validation against the persisted schema.
void RegisterComponent<T>() where T : unmanaged
Type Parameters
TThe component struct type.
RegisterMigration<TOld, TNew>(MigrationFunc<TOld, TNew>)
Registers a strongly-typed migration between two revisions of the same component.
void RegisterMigration<TOld, TNew>(MigrationFunc<TOld, TNew> func) where TOld : unmanaged where TNew : unmanaged
Parameters
funcMigrationFunc<TOld, TNew>Delegate that transforms an old-revision value into a new-revision value.
Type Parameters
TOldThe source revision's struct type.
TNewThe target revision's struct type.