# GH_StateServer class

Namespace: [Grasshopper.Kernel](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_StateServer : List<GH_State>, GH_ISerializable
```

Maintains all the recorded states for this document.

## Constructors

- [GH_StateServer](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/ctor.md)

## Properties

- [Names](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/names.md): Gets a list of all the state names in this server.
- [Owner](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/owner.md): Gets the document that owns this server.

## Methods

- [NewStateFromDocument](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/newstatefromdocument.md): Displays UI for new state creation. If the user aborts, then null is returned. If the user successfully defines a new state, it is appended to this server.
- [Read](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/read.md)
- [RemoveState](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/removestate.md): Remove a certain state. This method adds an undo record to the document.
- [RestoreState](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/restorestate.md): (3 overloads) Restore a certain state.
- [Write](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.gh-stateserver/write.md)
