# PipelineSummary

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Pipelines`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineSummary.cs)

Represents pipeline summary information to be displayed after pipeline completion. This is a general-purpose key-value collection that pipeline steps can contribute to.

## Definition

```csharp
namespace Aspire.Hosting.Pipelines;

public sealed class PipelineSummary
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/PipelineSummary`
- Public instance methods are exported as ATS capabilities.

## Remarks

This class provides a flexible way for any pipeline step to contribute information to be displayed after pipeline execution. The data is stored as key-value pairs that will be formatted as a table or list in the CLI output.

Pipeline steps can add any relevant information such as resource group names, subscription IDs, URLs, namespaces, cluster names, or any other details. Values can be plain text or Markdown-formatted by using [MarkdownString](/reference/api/csharp/aspire.hosting/markdownstring.md).

The summary is available via the [PipelineContext.Summary](/reference/api/csharp/aspire.hosting/pipelinecontext/properties.md#summary) property and can be accessed from any pipeline step.

## Constructors

- [PipelineSummary](/reference/api/csharp/aspire.hosting/pipelinesummary/constructors.md#constructor)

## Properties

- [Items](/reference/api/csharp/aspire.hosting/pipelinesummary/properties.md#items) : `ReadOnlyCollection<PipelineSummaryItem>` `get` -- Gets the items in the pipeline summary as a read-only collection. Items are displayed in the order they were added.

## Methods

- [Add(string, string)](/reference/api/csharp/aspire.hosting/pipelinesummary/methods.md#add-string-string) -- Adds a key-value pair to the pipeline summary with a plain-text value.
- [Add(string, MarkdownString)](/reference/api/csharp/aspire.hosting/pipelinesummary/methods.md#add-string-markdownstring) `ats ignored` -- Adds a key-value pair to the pipeline summary with a Markdown-formatted value.

## Examples

```csharp
// In a pipeline step, add to the summary
public async Task ExecuteAsync(PipelineStepContext context)
{
    // Do work...

    // Add plain text summary items
    context.PipelineContext.Summary.Add("☁️ Target", "Azure");
    context.PipelineContext.Summary.Add("📦 Resource Group", "rg-myapp");
    context.PipelineContext.Summary.Add("🔑 Subscription", "12345678-1234-1234-1234-123456789012");
    context.PipelineContext.Summary.Add("🌐 Location", "eastus");
}

    // Kubernetes example
    context.PipelineContext.Summary.Add("☸️ Target", "Kubernetes");
    context.PipelineContext.Summary.Add("📦 Namespace", "production");
    context.PipelineContext.Summary.Add("🖥️ Cluster", "my-cluster");

    // Docker example
    context.PipelineContext.Summary.Add("🐳 Target", "Docker");
    context.PipelineContext.Summary.Add("🌐 Endpoint", "localhost:8080");

    // Add a Markdown-formatted value (e.g., a clickable link)
    context.PipelineContext.Summary.Add("📦 Resource Group", new MarkdownString($"[{rgName}]({portalUrl})"));
```
