GH_State

References
public class GH_State : GH_ISerializable
Represents a single recorded document state. A state contains values for an arbitrary set of objects inside the document.

Constructors

GH_State

#
public GH_State()

GH_State

#
public GH_State(GH_State other)
other (GH_State)

Properties

LastModified

#
public DateTime LastModified { get; }
Gets the date at which this state was last modified.

Name

#
public string Name { get; set; }
Gets or sets the name of this state.

StateCount

#
public int StateCount { get; }
Gets the number of items stored in the state database.

StateData

#
public SortedList<Guid, string> StateData { get; }
Gets a pointer to the internal database of states.

Indexers

Data

#
public string this[Guid id] { get; }
Gets the state data stored under the specified ID
id (Guid)

Data

#
public string this[int index] { get; }
Gets the state data stored under the specified index
index (int)

Methods

AddStateObject

#
public void AddStateObject(IGH_StateAwareObject obj, Guid obj_id)
Append a new object to the database.
obj (IGH_StateAwareObject)Object to append.
obj_id (Guid)Instance GUID of object in document.

ClearStates

#
public void ClearStates()
Removes all items from the state database.

Read

#
public bool Read(GH_IReader reader)
reader (GH_IReader)
Read

RemoveStateObject

#
public void RemoveStateObject(Guid obj_id)
Remove an object from the database.
obj_id (Guid)

Write

#
public bool Write(GH_IWriter writer)
writer (GH_IWriter)
Write