Show / Hide Table of Contents

Class SchedulerExtensions

Extension methods for IScheduler.

Inheritance
System.Object
SchedulerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public static class SchedulerExtensions

Methods

Sleep(IScheduler, TimeSpan, CancellationToken)

Simulates a synchronous delay by calling Delay(TimeSpan, CancellationToken) on scheduler, and unwrapping any exceptions generated (typically cancellation).

Declaration
public static void Sleep(this IScheduler scheduler, TimeSpan delay, CancellationToken cancellationToken)
Parameters
Type Name Description
IScheduler scheduler

The scheduler to use for the sleep operation.

System.TimeSpan delay

Time to sleep for. Must not be negative.

System.Threading.CancellationToken cancellationToken

The cancellation token that will be watched during the sleep operation.

Exceptions
Type Condition
System.OperationCanceledException

The cancellation token was cancelled during the sleep.

Back to top