Interface IMigration<TReadResult, TWriteResult, TReadInput, TWriteInput>
Interface for managing technology migrations
Namespace: LaunchDarkly.Sdk.Server.Migrations
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public interface IMigration<TReadResult, TWriteResult, in TReadInput, in TWriteInput> where TReadResult : class where TWriteResult : class
Type Parameters
Name | Description |
---|---|
TReadResult | the result type for reads |
TWriteResult | the result type for writes |
TReadInput | the input types for reads |
TWriteInput | the input type for writes |
Methods
| Edit this page View SourceRead(string, Context, MigrationStage)
Execute a migration based read.
Declaration
MigrationResult<TReadResult> Read(string flagKey, Context context, MigrationStage defaultStage)
Parameters
Type | Name | Description |
---|---|---|
string | flagKey | the flag key of migration flag |
Context | context | the context for the migration |
MigrationStage | defaultStage | the default migration stage |
Returns
Type | Description |
---|---|
MigrationResult<TReadResult> | the result of the read |
Remarks
To execute a read with a payload use Read(string, Context, MigrationStage, TReadInput).
When no payload is provided a default value will be used for the payload.
Read(string, Context, MigrationStage, TReadInput)
Execute a migration based read with a payload.
Declaration
MigrationResult<TReadResult> Read(string flagKey, Context context, MigrationStage defaultStage, TReadInput payload)
Parameters
Type | Name | Description |
---|---|---|
string | flagKey | the flag key of migration flag |
Context | context | the context for the migration |
MigrationStage | defaultStage | the default migration stage |
TReadInput | payload | payload that will be passed to the new/old read implementations |
Returns
Type | Description |
---|---|
MigrationResult<TReadResult> | the result of the read |
Remarks
To execute a read without a payload use Read(string, Context, MigrationStage).
Write(string, Context, MigrationStage)
Execute a migration based write.
Declaration
MigrationWriteResult<TWriteResult> Write(string flagKey, Context context, MigrationStage defaultStage)
Parameters
Type | Name | Description |
---|---|---|
string | flagKey | the flag key of migration flag |
Context | context | the context for the migration |
MigrationStage | defaultStage | the default migration stage |
Returns
Type | Description |
---|---|
MigrationWriteResult<TWriteResult> | the result of the write operation |
Remarks
To execute a write with a payload use Write(string, Context, MigrationStage, TWriteInput).
When no payload is provided a default value will be used for the payload.
Write(string, Context, MigrationStage, TWriteInput)
Execute a migration based write with a payload.
Declaration
MigrationWriteResult<TWriteResult> Write(string flagKey, Context context, MigrationStage defaultStage, TWriteInput payload)
Parameters
Type | Name | Description |
---|---|---|
string | flagKey | the flag key of migration flag |
Context | context | the context for the migration |
MigrationStage | defaultStage | the default migration stage |
TWriteInput | payload | payload that will be passed to the new/old write implementations |
Returns
Type | Description |
---|---|
MigrationWriteResult<TWriteResult> | the result of the write operation |
Remarks
To execute a write without a payload use Write(string, Context, MigrationStage).