)>
Defined in Type: AkavacheBuilderExtensions
Namespace: Akavache.V10toV11
Assembly: Akavache.V10toV11.dll
Applies to
net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-macos26.0, net10.0-windows10.0.19041, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-ios17.5, net8.0-tvos17.2, net8.0-windows10.0.19041, net8.0-macos14.5, netstandard2.1, net481, net462, net471
Attributes: [RequiresUnreferencedCode("V10 migration may use reflection to re-serialize entries with their original type.")] [RequiresDynamicCode("V10 migration may use reflection to re-serialize entries with their original type.")]
public static IAkavacheBuilder MigrateFromV10(this IAkavacheBuilder builder, Action<V10MigrationOptions>? configure = null)
Summary:
Performs a one-time migration of data from V10 database files into the current V11 databases.
This method should be called AFTER WithSqliteDefaults() so that V11 databases have been created.
The migration reads all entries from the V10 CacheElement table, converts them to V11 CacheEntry format,
and inserts them into the V11 databases. A sentinel key prevents re-migration on subsequent runs.
Parameters
| Name | Type | Description |
|---|---|---|
builder | [IAkavacheBuilder](# | The Akavache builder with V11 caches already configured. |
configure = null | Action | Optional configuration for migration behavior. |
Returns: IAkavacheBuilder -- The builder instance for fluent configuration.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when builder is null. |
| System.InvalidOperationException | Thrown when V11 caches have not been configured yet. |