# PlacementStrategy Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.placementstrategy/)

## Initialize(GrainProperties) {#initialize-orleans-metadata-grainproperties-2ab5412d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.placementstrategy/methods/initialize-orleans-metadata-grainproperties-2ab5412d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Placement/PlacementStrategy.cs#L33)

```csharp
public virtual void Initialize(GrainProperties properties)
```

Initializes an instance of this type using the provided grain properties.

### Parameters

- `properties` (`GrainProperties`): The grain properties.

## PopulateGrainProperties(IServiceProvider, Type, GrainType, Dictionary&lt;string, string&gt;) {#populategrainproperties-system-iserviceprovider-system-type-orleans-runtime-grai-2f431c7b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.placementstrategy/methods/populategrainproperties-system-iserviceprovider-system-type-orleans-runtime-grai-2f431c7b/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Placement/PlacementStrategy.cs#L44-L45)

```csharp
public virtual void PopulateGrainProperties(IServiceProvider services, Type grainClass, GrainType grainType, Dictionary<string, string> properties)
```

Populates grain properties to specify the preferred placement strategy.

### Parameters

- `services` (`IServiceProvider`): The service provider.
- `grainClass` (`Type`): The grain class.
- `grainType` (`GrainType`): The grain type.
- `properties` (`Dictionary<string, string>`): The grain properties which will be populated by this method call.
