ModelStateWriter Class |
It supports optional objects and optional values. Whenever a non-optional object or value is included, all earlier optional object and values at that level and lower will be added to the stream. Objects with purely optional sub-objects and parameters will not be added to the stream.
The optional object can be used if an ancestor does not know whether a child actually contains state, so the ancestor can add itself and its parameters as optional, and only if a child has state, the ancestor values will be included.
Namespace: DHI.Mike1D.ModelState
The ModelStateWriter type exposes the following members.
Name | Description | |
---|---|---|
ModelStateWriter |
Constructor
|
Name | Description | |
---|---|---|
Close |
Close state, and also underlying state stream.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HandleOptionalParameter |
Helper method for handling optional parameters: If the parameter
is optional, and the current object is optional (there is something in the list
of optional objects), this parameter value is added to the list of parameters in
the optional object.
If the parameter is not optional, but the current object is optional, all optional objects and parameters are added to the state. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Open(Stream) |
Create writer that writes to a stream
| |
Open(String) |
Create writer that writes to a file
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WriteDataValue |
Write parameter array values to current object
| |
WriteEndObject |
Closes current object
| |
WriteOptionalObjects |
Write all optional objects to state stream.
| |
WriteStartObject(String) |
Writes a start object tag with the specified name
| |
WriteStartObject(String, Boolean) |
Adds an optional start object tag with the specified name to
the list of optional objects
| |
WriteValue(String, Boolean, Boolean) |
Write parameter value to current object
| |
WriteValue(String, IEnumerableDateTime, Boolean) |
Write parameter array values to current object
| |
WriteValue(String, IEnumerableDouble, Boolean) |
Write parameter array values to current object
| |
WriteValue(String, IEnumerableInt32, Boolean) |
Write parameter array values to current object
| |
WriteValue(String, IEnumerableString, Boolean) |
Write parameter array values to current object
| |
WriteValue(String, DateTime, Boolean) |
Write parameter value to current object
| |
WriteValue(String, Double, Boolean) |
Write parameter value to current object
| |
WriteValue(String, Int32, Boolean) |
Write parameter value to current object
| |
WriteValue(String, Object, Boolean) |
Write parameter value to object
| |
WriteValue(String, String, Boolean) |
Write parameter value to current object
| |
WriteValue(String, TimeSpan, Boolean) |
Write parameter value to current object
|
Name | Description | |
---|---|---|
AddReach | (Defined by NetworkStateWriter.) |