Click or drag to resize
ConsumerTRootCreateAsync Method (S101Client, Int32, ChildrenRetrievalPolicy, Byte)

Namespace: Lawo.EmberPlusSharp.Model
Assembly: Lawo.EmberPlusSharp (in Lawo.EmberPlusSharp.dll) Version: 1.4.1707.27006
Syntax
C#
public static Task<Consumer<TRoot>> CreateAsync(
	S101Client client,
	int timeout,
	ChildrenRetrievalPolicy childrenRetrievalPolicy,
	byte slot
)

Parameters

client
Type: Lawo.EmberPlusSharp.S101S101Client
The S101Client to use.
timeout
Type: SystemInt32
The total amount of time, in milliseconds, this method will wait for the provider to send all requested elements. Specify -1 to wait indefinitely.
childrenRetrievalPolicy
Type: Lawo.EmberPlusSharp.ModelChildrenRetrievalPolicy
The policy that defines whether direct and indirect children are retrieved from the provider before this method returns.
slot
Type: SystemByte
The slot to communicate with. All outgoing S101Message objects will have their Slot property set to this value. Incoming messages are ignored, if their Slot property does not match this value.

Return Value

Type: TaskConsumerTRoot
Exceptions
ExceptionCondition
ArgumentOutOfRangeException
  • timeout is less than -1, and/or
  • childrenRetrievalPolicy is either less than None or greater than All.
ArgumentNullExceptionclient equals null.
ExceptionAn exception was thrown from one of the callbacks passed to the S101Client constructor, see Message for more information.
ModelExceptionThe model does either not match the data sent by the provider, or the provider has sent unexpected data.
ObjectDisposedExceptionDispose has been called or the connection has been lost.
OperationCanceledExceptionDispose has been called or the connection has been lost.
TimeoutExceptionThe provider did not send all requested elements within the specified timeout.
Remarks

Sets the ChildrenRetrievalPolicy property of the Root object to the value passed for childrenRetrievalPolicy and then retrieves a partial or full copy of the provider tree before returning the ConsumerTRoot object. Exactly what elements are initially retrieved from the provider depends on the type of TRoot and the value of childrenRetrievalPolicy.

Afterwards, all changes are continuously synchronized such that the state of the object tree accessible through the Root property mirrors the state of the tree held by the provider.

All changes to the object tree are reported by raising the PropertyChanged event of the affected objects.

Bibliography
[1] Marius Keuck and Philip Boger, Ember+ Specification, L-S-B Broadcast Technologies GmbH, https://github.com/Lawo/ember-plus/raw/master/documentation/Ember%2B%20Documentation.pdf
See Also