DevToys logo DevToys
  • Home
  • Blog
  • Documentation
  • Download
Search Results for

    Show / Hide Table of Contents

    Class CancellationTokenExtension

    Provides a set of helper method to play around with cancellation tokens.

    Inheritance
    object
    CancellationTokenExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DevToys.Api
    Assembly: DevToys.Api.dll
    Syntax
    public static class CancellationTokenExtension

    Methods

    AsTask(CancellationToken)

    Converts the CancellationToken to a Task that cancels when the CancellationToken is being canceled.

    Declaration
    public static Task AsTask(this CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    In this article
    DevToys logo © 2024 DevToys