Click or drag to resize

Result Class

Container for values returned from Wait methods.
Inheritance Hierarchy
SystemObject
  Demo3D.EventQueueResult
    Demo3D.NativeResultT

Namespace: Demo3D.EventQueue
Assembly: Demo3D.EventQueue (in Demo3D.EventQueue.dll) Version: 19.00.00
Syntax
C#
public class Result : ITask

The Result type exposes the following members.

Constructors
 NameDescription
Public methodResult Default constructor for a future result.
Public methodResult(Object) Constructor for a future result with the value given straight away.
Top
Properties
 NameDescription
Public propertyHasValue Has the future value been set yet.
Public propertyIsCancelled Was the future result value canceled. This may have been due to an exception in the task that was populating the future result value.
Public propertyValue The future result value.
Top
Methods
 NameDescription
Public methodToString A string version of the value.
(Overrides ObjectToString)
Top
Extension Methods
 NameDescription
Public Extension MethodForNoLongerThan Throw an exception if the task takes longer than the timeout.
(Defined by TaskExt)
Public Extension MethodIfTimeout Add an action to be called if a task throws an exception due to a timeout.
(Defined by TaskExt)
Top
Example
This sample shows to read a value from a channel, which may block. When resumed, "load.Value" will contain the result.
C#
var load = new Result<Visual>();
yield return Wait.ForRead(channel.Value, load);

// OR

var load = Wait.ForRead(channel.Value);
yield return load;
See Also