# IPipelineActivityReporter Methods

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

Interface for reporting publishing activities.

## CompletePublishAsync(PublishCompletionOptions?, CancellationToken)

- Name: `CompletePublishAsync(PublishCompletionOptions?, CancellationToken)`
- Modifiers: `abstract`
- Returns: `Task`

Signals that the entire publishing process has completed.

```csharp
public interface IPipelineActivityReporter
{
    public abstract Task CompletePublishAsync(
        PublishCompletionOptions? options = null,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `options` ([PublishCompletionOptions?](/reference/api/csharp/aspire.hosting/publishcompletionoptions.md)) `optional`
  The options for completing the publishing process.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## CompletePublishAsync(string?, CompletionState?, CancellationToken)

> **Obsolete:** Use CompletePublishAsync(PublishCompletionOptions?, CancellationToken) instead.

- Name: `CompletePublishAsync(string?, CompletionState?, CancellationToken)`
- Modifiers: `abstract`
- Returns: `Task`

Signals that the entire publishing process has completed.

```csharp
public interface IPipelineActivityReporter
{
    public abstract Task CompletePublishAsync(
        string? completionMessage = null,
        CompletionState? completionState = null,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `completionMessage` (`string?`) `optional`
  The completion message of the publishing process.
- `completionState` ([CompletionState?](/reference/api/csharp/aspire.hosting/completionstate.md)) `optional`
  The completion state of the publishing process. When null, the state is automatically aggregated from all steps.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## CreateStepAsync(string, CancellationToken)

- Name: `CreateStepAsync(string, CancellationToken)`
- Modifiers: `abstract`
- Returns: [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/IPipelineActivityReporter.cs#L31)

Creates a new publishing step with the specified title.

```csharp
public interface IPipelineActivityReporter
{
    public abstract Task<IReportingStep> CreateStepAsync(
        string title,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `title` (`string`)
  The title of the publishing step.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## Returns

[Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) -- The publishing step

## CreateStepAsync(string, string?, int, CancellationToken)

- Name: `CreateStepAsync(string, string?, int, CancellationToken)`
- Modifiers: `virtual`
- Returns: [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/IPipelineActivityReporter.cs#L31)

Creates a new publishing step with optional hierarchy metadata.

```csharp
public interface IPipelineActivityReporter
{
    public virtual Task<IReportingStep> CreateStepAsync(
        string title,
        string? parentStepId,
        int hierarchyLevel,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `title` (`string`)
  The title of the publishing step.
- `parentStepId` (`string?`)
  An optional identifier for the parent step.
- `hierarchyLevel` (`int`)
  The hierarchy level for display.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## Returns

[Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) -- The publishing step.
