# GrainService.OnRangeChange(IRingRange, IRingRange, bool)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainservice/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainservice/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Services/GrainService.cs#L138-L142)

```csharp
public virtual Task OnRangeChange(IRingRange oldRange, IRingRange newRange, bool increased)
```

Invoked when the ring range owned by the service instance changes because of a change in the cluster state

### Parameters

- `oldRange` (`IRingRange`): The old range.
- `newRange` (`IRingRange`): The new range.
- `increased` (`bool`): A value indicating whether the range has increased.

### Returns

A `System.Threading.Tasks.Task` representing the work performed.
