# GrainConstructorArgumentFactory Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainconstructorargumentfactory/)

## GrainConstructorArgumentFactory(IServiceProvider, Type) {#constructor-system-iserviceprovider-system-type-f954faa3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainconstructorargumentfactory/constructors/constructor-system-iserviceprovider-system-type-f954faa3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Facet/GrainConstructorArgumentFactory.cs#L24-L51)

```csharp
public GrainConstructorArgumentFactory(IServiceProvider serviceProvider, Type grainType)
```

Initializes a new [GrainConstructorArgumentFactory](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainconstructorargumentfactory/) instance.

### Parameters

- `serviceProvider` (`IServiceProvider`): The service provider.
- `grainType` (`Type`): The grain type.
