# All

Initialize a new instance of `Continuation<(TFail1, TFail2, TFailN),(TSuccess1, TSuccess2, TSuccessN)>` value according to the continuation parameters.

The new `Continuation<TFail, TSuccess>` will be in Success state only when all parameters are also in this state. Otherwise, it will be in Fail state.

| Parameters                                                                                                                                                                                                                           | Returns                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| <p>Continuation&#x3C;TFail1, TSuccess1> continuation1</p><p>Continuation&#x3C;TFail2, TSuccess2> continuation2</p>                                                                                                                   | Continuation<( Option\<TFail1>, Option\<TFail2>), (TSuccess1, TSuccess2)>                                                        |
| <p>Continuation&#x3C;TFail1, TSuccess1> continuation1</p><p>Continuation&#x3C;TFail2, TSuccess2> continuation2</p><p>Continuation&#x3C;TFail3, TSuccess3> continuation3</p>                                                          | Continuation<( Option\<TFail1>, Option\<TFail2>, Option\<TFail3>), (TSuccess1, TSuccess2, TSuccess3)>                            |
| <p>Continuation&#x3C;TFail1, TSuccess1> continuation1</p><p>Continuation&#x3C;TFail2, TSuccess2> continuation2</p><p>Continuation&#x3C;TFail3, TSuccess3> continuation3</p><p>Continuation&#x3C;TFail4, TSuccess4> continuation4</p> | Continuation<( Option\<TFail1>, Option\<TFail2>, Option\<TFail3>, Option\<TFail4>), (TSuccess1, TSuccess2, TSuccess3,TSuccess4)> |

## Usage

This method is usually used to merge multiples `Continuation` pipelines in a single one. You can merge up to four different pipelines and the results will be grouped in tuples.

&#x20;**Merging two pipelines successfully**&#x20;

```csharp
var continuation1 = 
    ContinuationModule.Resolve<string, int>(10);

var continuation2 = 
    ContinuationModule.Resolve<float, string>("number");

var result = ContinuationModule
                .All(continuation1, continuation2)
                .Then(values => $"{values.Item2} is {values.Item1}")

//result.IsSuccess = true
//result.Success = "number is 10"
```

&#x20;**Merging pipelines when one of them failed**

```csharp
var continuation1 = 
    ContinuationModule.Resolve<string, int>(10);

var continuation2 = 
    ContinuationModule.Resolve<float, string>("number");

var continuation3 = 
    ContinuationModule.Reject<string, bool>("error");



var result = ContinuationModule
                .All(continuation1, continuation2)
                .Then(values => $"{values.Item2} is {values.Item1}")

//result.IsFail= true
//result.Fail= (
//    Option.IsNone = true,
//    Option.IsNone = true,
//    Option.IsSome = true | Option.Some = "error"
//)
```
