XPQueryExtensions.SingleOrDefaultAsync Method
Name | Parameters | Description |
---|---|---|
Single |
query, predicate, cancellation |
Asynchronously gets the object from a selection if only one object in the selection meets the specified requirements. If the selection is empty, returns a default value for <T>. If the selection has more than one of such elements, throws an exception. |
Single |
query, cancellation |
Asynchronously gets the only object in a selection. If the selection is empty, returns a default value for <T>. If the selection has more than one element, throws an exception. |