ConsumerTRootCreateAsync Method (S101Client, Int32, ChildrenRetrievalPolicy, Byte) |
Namespace: Lawo.EmberPlusSharp.Model
public static Task<Consumer<TRoot>> CreateAsync( S101Client client, int timeout, ChildrenRetrievalPolicy childrenRetrievalPolicy, byte slot )
Exception | Condition |
---|---|
ArgumentOutOfRangeException | |
ArgumentNullException | client equals null. |
Exception | An exception was thrown from one of the callbacks passed to the S101Client constructor, see Message for more information. |
ModelException | The model does either not match the data sent by the provider, or the provider has sent unexpected data. |
ObjectDisposedException | Dispose has been called or the connection has been lost. |
OperationCanceledException | Dispose has been called or the connection has been lost. |
TimeoutException | The provider did not send all requested elements within the specified timeout. |
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.