# IReportingStep Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [IReportingStep](/reference/api/csharp/aspire.hosting/ireportingstep.md)
- Kind: `Methods`
- Members: `7`

Represents a publishing step, which can contain multiple tasks.

## CompleteAsync(string, CompletionState, CancellationToken)

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

Completes the step with the specified completion text and state.

```csharp
public interface IReportingStep
{
    public abstract Task CompleteAsync(
        string completionText,
        CompletionState completionState = CompletionState.Completed,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `completionText` (`string`)
  The completion text for the step.
- `completionState` ([CompletionState](/reference/api/csharp/aspire.hosting/completionstate.md)) `optional`
  The completion state for the step.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## CompleteAsync(MarkdownString, CompletionState, CancellationToken)

- Name: `CompleteAsync(MarkdownString, CompletionState, CancellationToken)`
- Modifiers: `abstract`
- Returns: `Task`

Completes the step with Markdown-formatted completion text and the specified state.

```csharp
public interface IReportingStep
{
    public abstract Task CompleteAsync(
        MarkdownString completionText,
        CompletionState completionState = CompletionState.Completed,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `completionText` ([MarkdownString](/reference/api/csharp/aspire.hosting/markdownstring.md))
  The Markdown-formatted completion text for the step.
- `completionState` ([CompletionState](/reference/api/csharp/aspire.hosting/completionstate.md)) `optional`
  The completion state for the step.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## CreateTaskAsync(string, CancellationToken)

- Name: `CreateTaskAsync(string, CancellationToken)`
- Modifiers: `abstract`
- Returns: [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md)

Creates a new task within this step.

```csharp
public interface IReportingStep
{
    public abstract Task<IReportingTask> CreateTaskAsync(
        string statusText,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `statusText` (`string`)
  The initial status text for the task.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## Returns

[Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) -- The created task.

## CreateTaskAsync(MarkdownString, CancellationToken)

- Name: `CreateTaskAsync(MarkdownString, CancellationToken)`
- Modifiers: `abstract`
- Returns: [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md)

Creates a new task within this step with Markdown-formatted status text.

```csharp
public interface IReportingStep
{
    public abstract Task<IReportingTask> CreateTaskAsync(
        MarkdownString statusText,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `statusText` ([MarkdownString](/reference/api/csharp/aspire.hosting/markdownstring.md))
  The initial Markdown-formatted status text for the task.
- `cancellationToken` (`CancellationToken`) `optional`
  The cancellation token.

## Returns

[Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) -- The created task.

## Log(LogLevel, string, bool)

> **Obsolete:** Use Log(LogLevel, string) or Log(LogLevel, MarkdownString) instead.

- Name: `Log(LogLevel, string, bool)`
- Modifiers: `abstract`

Logs a message at the specified level within this step.

```csharp
public interface IReportingStep
{
    public abstract void Log(
        LogLevel logLevel,
        string message,
        bool enableMarkdown)
    {
        // ...
    }
}
```

## Parameters

- `logLevel` (`LogLevel`)
  The log level for the message.
- `message` (`string`)
  The message to log.
- `enableMarkdown` (`bool`)
  Whether to enable Markdown formatting for the message.

## Log(LogLevel, string)

- Name: `Log(LogLevel, string)`
- Modifiers: `abstract`

Logs a plain-text message at the specified level within this step.

```csharp
public interface IReportingStep
{
    public abstract void Log(
        LogLevel logLevel,
        string message)
    {
        // ...
    }
}
```

## Parameters

- `logLevel` (`LogLevel`)
  The log level for the message.
- `message` (`string`)
  The plain-text message to log.

## Log(LogLevel, MarkdownString)

- Name: `Log(LogLevel, MarkdownString)`
- Modifiers: `abstract`

Logs a Markdown-formatted message at the specified level within this step.

```csharp
public interface IReportingStep
{
    public abstract void Log(
        LogLevel logLevel,
        MarkdownString message)
    {
        // ...
    }
}
```

## Parameters

- `logLevel` (`LogLevel`)
  The log level for the message.
- `message` ([MarkdownString](/reference/api/csharp/aspire.hosting/markdownstring.md))
  The Markdown-formatted message to log.
