...
Code Block | ||||
---|---|---|---|---|
| ||||
interface IState: IIdentifiable, IDescribable { } public interface IManageState { /// <summary> /// TransformStore the statelinkable instancecomponent's into an array of bytescurrent State /// </summary> /// <param name="state">The state to be turned into a byte array</param> /// <returns></<returns>Object that identifies the stored state.</returns> byte[]IState ToByteArrayKeepCurrentState(); } public interface IManageState { /// <summary> /// Store Creates an instance of the state linkableusing component'sarray currentof Statebytes /// </summary> /// <returns>Object <param name="stateID">Object that identifies the state to storedbe staterestored.</returns>param> IState KeepCurrentStateCreateStateFromByteArray(byte[] state); /// <summary> /// CreatesTransform the anstate instance of the state usinginto an array of bytes /// </summary> /// <param name="stateIDstate">Object>The state thatto identifiesbe theturned stateinto toa bebyte restored.<array</param> IState CreateStateFromByteArray(/// <returns></returns> byte[] stateToByteArray(); /// <summary> /// Restores the state identified by the parameter stateID. If the state identifier identified by /// stateID is not known by the linkable component an exception should be trown. /// </summary> /// <param name="stateID">Object that identifies the state to be restored.</param> void RestoreState(IState state); /// <summary> /// Clears a state from the linkable component's memory. If the state identifier identified by /// stateID is not known by the linkable component an exception should be trown. /// </summary> /// <param name="stateID">Object that identifies the state to be cleared.</param> void ClearState(IState state); /// <summary> /// All available states created using KeepCurrentState() /// </summary> IEnumerable<IState> AvailableStates { get; } } |
...