Class MigrationMethod
Static class for creation MigrationMethod.Result<TResult> instances.
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Migrations
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public static class MigrationMethod
  Methods
| Edit this page View SourceFailure<TResult>()
Construct a method result representing a failure.
Declaration
public static MigrationMethod.Result<TResult> Failure<TResult>() where TResult : class
  Returns
| Type | Description | 
|---|---|
| MigrationMethod.Result<TResult> | the failed result  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TResult | the type of the result  | 
      
Remarks
This method doesn't provide any information about the cause of the failure. It is recommended to throw an exception or use Failure<TResult>(Exception).
Failure<TResult>(Exception)
Construct a method result representing a failure based on an Exception.
Declaration
public static MigrationMethod.Result<TResult> Failure<TResult>(Exception exception) where TResult : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| Exception | exception | the exception which occurred during method execution  | 
      
Returns
| Type | Description | 
|---|---|
| MigrationMethod.Result<TResult> | the failed result  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TResult | the type of the result  | 
      
Success<TResult>(TResult)
Construct a successful result.
Declaration
public static MigrationMethod.Result<TResult> Success<TResult>(TResult result) where TResult : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| TResult | result | the value of the result  | 
      
Returns
| Type | Description | 
|---|---|
| MigrationMethod.Result<TResult> | the successful result  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TResult | the type of the result  |