DigitalTwinsClient.GetEventRoutesAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
. Lists the event routes in a digital twins instance by iterating through a collection asynchronously.
public virtual Azure.AsyncPageable<Azure.DigitalTwins.Core.DigitalTwinsEventRoute> GetEventRoutesAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetEventRoutesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.DigitalTwins.Core.DigitalTwinsEventRoute>
override this.GetEventRoutesAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.DigitalTwins.Core.DigitalTwinsEventRoute>
Public Overridable Function GetEventRoutesAsync (Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of DigitalTwinsEventRoute)
Parameters
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The pageable list AsyncPageable<T> of application/json event routes and the HTTP response.
Exceptions
The exception that captures the errors from the service. Check the ErrorCode and Status properties for more details.
Examples
AsyncPageable<DigitalTwinsEventRoute> response = client.GetEventRoutesAsync();
await foreach (DigitalTwinsEventRoute er in response)
{
Console.WriteLine($"Event route '{er.Id}', endpoint name '{er.EndpointName}'");
}
Remarks
For more samples, see our repo samples.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應