# DistributedApplicationExecutionContext

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

Exposes the global contextual information for this invocation of the AppHost.

## Definition

```typescript
interface DistributedApplicationExecutionContext {
  readonly isPublishMode: boolean;
  readonly isRunMode: boolean;
  readonly operation: DistributedApplicationOperation;
  publisherName: string;
  readonly serviceProvider: IServiceProvider;
}
```

## Properties

- `isPublishMode`: `boolean` `get` -- Returns true if the current operation is publishing.
- `isRunMode`: `boolean` `get` -- Returns true if the current operation is running.
- `operation`: [DistributedApplicationOperation](/reference/api/typescript/aspire.hosting/distributedapplicationoperation.md) `get` -- The operation currently being performed by the AppHost.
- `publisherName`: `string` `get - set` -- The name of the publisher that is being used if `Operation` is set to `Publish`.
- `serviceProvider`: `IServiceProvider` `get` -- The `IServiceProvider` for the AppHost.
