# PipelineContext Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [PipelineContext](/reference/api/csharp/aspire.hosting/pipelinecontext.md)
- Kind: `Constructors`
- Members: `1`

Provides contextual information and services for the pipeline execution process of a distributed application.

## PipelineContext(DistributedApplicationModel, DistributedApplicationExecutionContext, IServiceProvider, ILogger, CancellationToken)

- Name: `Constructor(DistributedApplicationModel, DistributedApplicationExecutionContext, IServiceProvider, ILogger, CancellationToken)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineContext.cs#L20-L67)

Provides contextual information and services for the pipeline execution process of a distributed application.

```csharp
public sealed class PipelineContext
{
    public PipelineContext(
        DistributedApplicationModel model,
        DistributedApplicationExecutionContext executionContext,
        IServiceProvider serviceProvider,
        ILogger logger,
        CancellationToken cancellationToken)
    {
        // ...
    }
}
```

## Parameters

- `model` ([DistributedApplicationModel](/reference/api/csharp/aspire.hosting/distributedapplicationmodel.md))
  The distributed application model the pipeline is running against.
- `executionContext` ([DistributedApplicationExecutionContext](/reference/api/csharp/aspire.hosting/distributedapplicationexecutioncontext.md))
  The execution context for the distributed application.
- `serviceProvider` (`IServiceProvider`)
  The service provider for dependency resolution.
- `logger` (`ILogger`)
  The logger for pipeline operations.
- `cancellationToken` (`CancellationToken`)
  The cancellation token for the pipeline operation.
