ComponentFutureWriter Class

The writable end of a future held by the host.

public sealed class ComponentFutureWriter

Methods

NameDescription
Create(ComponentValueType?, ComponentValue)Creates a future: the host writes its value, and gives the readable end to a component.
Write(ComponentValue?)Writes the value of the future: the reader receives it when it reads the future.

Create(ComponentValueType?, ComponentValue)

ComponentStreams.cs

Creates a future: the host writes its value, and gives the readable end to a component.

public static ComponentFutureWriter Create(ComponentValueType? elementType, out ComponentValue readable)

Parameters

elementType ComponentValueType?
The type of the value, or null.
readable ComponentValue
The readable end, to give to a component as a value of type future.

Returns

ComponentFutureWriter

Write(ComponentValue?)

ComponentStreams.cs

Writes the value of the future: the reader receives it when it reads the future.

public void Write(ComponentValue? value)

Parameters

value ComponentValue?
The value, or null for a future without value type.

Exceptions

InvalidOperationException
The value is already written.