SolutionData

References
public sealed class SolutionData
Storage class for object solution results.

Properties

CustomData

#
Gets the fleeting custom data dictionary where custom values can be stored.
public FleetingCustomData CustomData { get; }

Duration

#
Gets the time it took to compute this data. This property can be set in case additional duration needs to be added to the measured duration so far. Just make sure you're adding the correct amount to the correct state if you are setting this.
public TimeSpan Duration { get; set; }

Id

#
Gets the id of the solution which spawned this data.
public SolutionId Id { get; }

IsEmpty

#
Gets whether this result contains an ITree, any messages, or any custom data.
public bool IsEmpty { get; }

KeyedTreeCount

#
Gets the number of keyed trees stored in this data.
public int KeyedTreeCount { get; }

Messages

#
Gets all messages associated with this object.
public Messages Messages { get; }

Methods

AddMessage

#
Add a message to the message set.
public void AddMessage(
message
)

AddMessages

#
Add a collection of messages to the message set.
public void AddMessages(
messages
)

AddMessages

#
Add a collection of messages to the message set.
public void AddMessages(
params Message[]
messages
)

Empty

#
Create an empty result, to be populated at a later time.
public static SolutionData Empty()

FromData

#
Create results with a data tree.
public static SolutionData FromData(
id,
duration,
tree
)

FromException

#
Create empty results with exception messaging.
public static SolutionData FromException(
id,
exception
)

RemoveMessages

#
Remove all messages which match the given level and filter.
public void RemoveMessages(
level,
Message level.
filter
Message text (or part of message text).
)

SetTree

#
Sets or overwrites a keyed tree. This is typically only used so that components can store the data trees meant for their output parameters.
public void SetTree(
key,
tree
)

SetTree

#
Sets or overwrites the unkeyed tree.
public void SetTree(
tree
)

Tree

#
Gets the unkeyed tree, if any.
public ITree Tree()

Tree

#
Gets a keyed tree, if it exists.
public ITree Tree(
key
)