# StreamSubscription Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.core.streamsubscription/)

## StreamSubscription(Guid, string, StreamId, GrainId) {#constructor-system-guid-string-orleans-runtime-streamid-orleans-runtime-grainid-a9d6b0e5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.core.streamsubscription/constructors/constructor-system-guid-string-orleans-runtime-streamid-orleans-runtime-grainid-a9d6b0e5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Core/StreamSubscription.cs#L19-L25)

```csharp
public StreamSubscription(Guid subscriptionId, string streamProviderName, StreamId streamId, GrainId grainId)
```

Initializes a new instance of the [StreamSubscription](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.core.streamsubscription/) class.

### Parameters

- `subscriptionId` (`Guid`): The subscription identifier.
- `streamProviderName` (`string`): Name of the stream provider.
- `streamId` (`StreamId`): The stream identifier.
- `grainId` (`GrainId`): The grain identifier.
