# BeforeResourceStartedEvent Constructors

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

This event is raised by orchestrators before they have started a new resource.

## BeforeResourceStartedEvent(IResource, IServiceProvider)

- Name: `Constructor(IResource, IServiceProvider)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/BeforeResourceStartedEvent.cs#L17-L23)

This event is raised by orchestrators before they have started a new resource.

```csharp
public class BeforeResourceStartedEvent
{
    public BeforeResourceStartedEvent(
        IResource resource,
        IServiceProvider services)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([IResource](/reference/api/csharp/aspire.hosting/iresource.md))
  The resource that is being created.
- `services` (`IServiceProvider`)
  The `IServiceProvider` for the app host.

## Remarks

Resources that are created by orchestrators may not yet be ready to handle requests.
