Click or drag to resize

ModelStateReader Methods

The ModelStateReader type exposes the following members.

Methods
  NameDescription
Public methodAppendLineInfo
Append line information to string. If no line information is available, the input string is returned directly.
Public methodClose
Close reader and underlying stream.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpen(Stream)
Open reader and read from stream
Public methodOpen(String)
Open reader and read from file
Public methodRead
Read next token from state stream
Public methodRead(StateToken)
Reads next element from the state stream and validates that the tokenType matches.

It throws an exception if the tokenType does not match

Public methodReadBoolean
Read boolean
Public methodReadBooleans
Read a list of integers
Public methodReadDateTime
Read a DateTime
Public methodReadDateTimes
Read a list of DateTimes
Public methodReadDouble
Read double
Public methodReadDoubles
Read a list of doubles
Public methodReadEndObject
Reads next element from the state stream and validates that it is and end object element.
Public methodReadInt
Read integer
Public methodReadInts
Read a list of integers
Public methodReadStartObject
Reads the next element from the state stream and validates that the tokenName matches.

If file version and bridge version matches, if object is not found, an exception is thrown.

If file version is older than bridge version, and object is not found, false is returned.

Public methodReadString
Read string
Public methodReadStrings
Read a list of strings
Public methodReadTimeSpan
Read a TimeSpan
Public methodSkip
Skip current element, moves beyond the ObjectEnd of the current section.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryRead
First time called, this will read the next token. At subsequent calls, a new token will only be read if the previous call returned true
Public methodTryReadStartObject
Reads the next element, but does only move by it if the tokenName matches.
Top
Extension Methods
  NameDescription
Public Extension MethodReadBoolean(String)Overloaded.
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadBoolean(String, ActionBoolean)Overloaded.
Read a parameter from state, and if there, apply it.
(Defined by ModelStateExtensions.)
Public Extension MethodReadBooleans
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadDateTime(String)Overloaded.
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadDateTime(String, ActionDateTime)Overloaded.
Read a parameter from state, and if there, apply it.
(Defined by ModelStateExtensions.)
Public Extension MethodReadDateTimes
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadDouble(String)Overloaded.
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadDouble(String, ActionDouble)Overloaded.
Read a parameter from state, and if there, apply it.
(Defined by ModelStateExtensions.)
Public Extension MethodReadDoubles
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadInt(String)Overloaded.
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodReadInt(String, ActionInt32)Overloaded.
Read a parameter from state, and if there, apply it.
(Defined by ModelStateExtensions.)
Public Extension MethodReadNetworkState
Read a network state, based on the indices of nodes and reaches specified, storing values in a NetworkDataT object.

A network states contains one array of node values, matching the nodesinput, and a number of arrays of reach values, matching the reaches input. For reaches, the array must contain values on all H grid points or all Q grid points.

(Defined by NetworkDataStateReader.)
Public Extension MethodReadString
Read a parameter from state, return its value
(Defined by ModelStateExtensions.)
Public Extension MethodTryReadDouble
Read a parameter from state, and if there, apply it.
(Defined by ModelStateExtensions.)
Public Extension MethodWarning
Warning while reading state
(Defined by ModelStateExtensions.)
Top
See Also