IExchangeWriter.CreateExchangeAsync method
Creates a new exchange from the supplied input.
public Task<DataExchange> CreateExchangeAsync(ExchangeInput exchange,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| exchange | Creation input describing the exchange. |
| cancellationToken | Token used to cancel the operation. |
Return Value
A task whose result is the created DataExchange.
Exceptions
| exception | condition |
|---|---|
| ApiException | Thrown when the underlying exchange API request fails. |
| DataSyncException | Thrown when exchange creation fails without a more specific underlying exception. |
| OperationCanceledException | Thrown when the operation is cancelled through cancellationToken. |
Remarks
When the underlying API returns an unclassified error, the implementation may rethrow the original exception type.
See Also
- class DataExchange
- class ExchangeInput
- interface IExchangeWriter
- namespace Autodesk.DataExchange.Core.Interface