# IDistributedApplicationPipeline Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [IDistributedApplicationPipeline](/reference/api/csharp/aspire.hosting/idistributedapplicationpipeline.md)
- Kind: `Methods`
- Members: `4`

Represents a pipeline for executing deployment steps in a distributed application.

## AddPipelineConfiguration(Func<PipelineConfigurationContext, Task>)

- Name: `AddPipelineConfiguration(Func<PipelineConfigurationContext, Task>)`
- Modifiers: `abstract`

Registers a callback to be executed during the pipeline configuration phase.

```csharp
public interface IDistributedApplicationPipeline
{
    public abstract void AddPipelineConfiguration(
        Func<PipelineConfigurationContext, Task> callback)
    {
        // ...
    }
}
```

## Parameters

- `callback` (`Func<PipelineConfigurationContext, Task>`)
  The callback function to execute during the configuration phase.

## AddStep(string, Func<PipelineStepContext, Task>, object?, object?)

- Name: `AddStep(string, Func<PipelineStepContext, Task>, object?, object?)`
- Modifiers: `abstract`

Adds a deployment step to the pipeline.

```csharp
public interface IDistributedApplicationPipeline
{
    public abstract void AddStep(
        string name,
        Func<PipelineStepContext, Task> action,
        object? dependsOn = null,
        object? requiredBy = null)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The unique name of the step.
- `action` (`Func<PipelineStepContext, Task>`)
  The action to execute for this step.
- `dependsOn` (`object?`) `optional`
  The name of the step this step depends on, or a list of step names.
- `requiredBy` (`object?`) `optional`
  The name of the step that requires this step, or a list of step names.

## AddStep(PipelineStep)

- Name: `AddStep(PipelineStep)`
- Modifiers: `abstract`

Adds a deployment step to the pipeline.

```csharp
public interface IDistributedApplicationPipeline
{
    public abstract void AddStep(
        PipelineStep step)
    {
        // ...
    }
}
```

## Parameters

- `step` ([PipelineStep](/reference/api/csharp/aspire.hosting/pipelinestep.md))
  The pipeline step to add.

## ExecuteAsync(PipelineContext)

- Name: `ExecuteAsync(PipelineContext)`
- Modifiers: `abstract`
- Returns: `Task`

Executes all steps in the pipeline in dependency order.

```csharp
public interface IDistributedApplicationPipeline
{
    public abstract Task ExecuteAsync(
        PipelineContext context)
    {
        // ...
    }
}
```

## Parameters

- `context` ([PipelineContext](/reference/api/csharp/aspire.hosting/pipelinecontext.md))
  The pipeline context for the execution.

## Returns

`Task` -- A task representing the asynchronous operation.
