# ResourceStoppedEvent Constructors

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

This event is raised after a resource has stopped.

## ResourceStoppedEvent(IResource, IServiceProvider, ResourceEvent)

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

This event is raised after a resource has stopped.

```csharp
public class ResourceStoppedEvent
{
    public ResourceStoppedEvent(
        IResource resource,
        IServiceProvider services,
        ResourceEvent resourceEvent)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([IResource](/reference/api/csharp/aspire.hosting/iresource.md))
  The resource that has stopped.
- `services` (`IServiceProvider`)
  The `IServiceProvider` for the app host.
- `resourceEvent` ([ResourceEvent](/reference/api/csharp/aspire.hosting/resourceevent.md))
  The [ResourceStoppedEvent.ResourceEvent](/reference/api/csharp/aspire.hosting/resourcestoppedevent/properties.md#resourceevent) containing the current state information.

## Remarks

This event allows for cleanup or unregistration logic when a resource is stopped by an orchestrator.
