Show / Hide Table of Contents

# CancellationTokenSourceExtensions Class

###### Namespace: Cysharp.Threading.Tasks

###### Assembly: cs.temp.dll.dll

    public static class CancellationTokenSourceExtensions

##### Inheritance

System.Object → CancellationTokenSourceExtensions

### Members

#### Methods

Name | Description
--- | ---
CancelAfterSlim(CancellationTokenSource, Int32, DelayType, PlayerLoopTiming) |
CancelAfterSlim(CancellationTokenSource, TimeSpan, DelayType, PlayerLoopTiming) |
RegisterRaiseCancelOnDestroy(CancellationTokenSource, Component) |
RegisterRaiseCancelOnDestroy(CancellationTokenSource, GameObject) |

### Methods

#### CancelAfterSlim(CancellationTokenSource, Int32, DelayType, PlayerLoopTiming)

    public static void CancelAfterSlim(this CancellationTokenSource cts, int millisecondsDelay, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update)

##### Parameters

`cts` CancellationTokenSource
`millisecondsDelay` System.Int32
`delayType` DelayType
`delayTiming` PlayerLoopTiming

#### CancelAfterSlim(CancellationTokenSource, TimeSpan, DelayType, PlayerLoopTiming)

    public static void CancelAfterSlim(this CancellationTokenSource cts, TimeSpan delayTimeSpan, DelayType delayType = DelayType.DeltaTime, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update)

##### Parameters

`cts` CancellationTokenSource
`delayTimeSpan` System.TimeSpan
`delayType` DelayType
`delayTiming` PlayerLoopTiming

#### RegisterRaiseCancelOnDestroy(CancellationTokenSource, Component)

    public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, Component component)

##### Parameters

`cts` CancellationTokenSource
`component` Component

#### RegisterRaiseCancelOnDestroy(CancellationTokenSource, GameObject)

    public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject)

##### Parameters

`cts` CancellationTokenSource
`gameObject` GameObject