Method WithDisposeOnCompletion
WithDisposeOnCompletion<TDescription, TCapturedVariableType>(TDescription, TCapturedVariableType)
Mark a captured Native Container or type that contains a Native Container to be disposed of after the job finishes (or immediately after with .Run()).
Declaration
public static TDescription WithDisposeOnCompletion<TDescription, TCapturedVariableType>(this TDescription description, TCapturedVariableType capturedVariable) where TDescription : ILambdaJobDescription
Parameters
| Type | Name | Description | 
|---|---|---|
| TDescription | description | The target object  | 
    
| TCapturedVariableType | capturedVariable | Captured variable that stores a NativeContainer  | 
    
Returns
| Type | Description | 
|---|---|
| TDescription | The target object, suitable for chaining multiple methods  | 
    
Type Parameters
| Name | Description | 
|---|---|
| TDescription | Type of target object  | 
    
| TCapturedVariableType | Type of captured variable  |