Udostępnij za pośrednictwem


TaskTimer Class

Definition

Caution

This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.

Runs a task after a certain delay and log any error.

[System.Obsolete("This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.")]
public class TaskTimer : IDisposable
[<System.Obsolete("This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.")>]
type TaskTimer = class
    interface IDisposable
Public Class TaskTimer
Implements IDisposable
Inheritance
TaskTimer
Attributes
Implements

Constructors

TaskTimer()

Fields

InfiniteTimeSpan

Represents an infinite time span.

Properties

Delay

Gets or sets the delay before the task starts.

IsStarted

Gets a value indicating whether value that indicates if a task has already started.

Methods

Cancel()

Cancels the current task.

Dispose()

Releases unmanaged and - optionally - managed resources.

Dispose(Boolean)

Disposes the timer.

Start(Func<Task>)

Start the task.

Applies to