Partilhar via


TeamFoundationTask<T> Class

A task that can be added to the Task Service to run once or on an interval basis on a pool of worker threads. When the task runs, the provided callback method is invoked.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Framework.Server.Task.TeamFoundationTask<T>
    Microsoft.TeamFoundation.Framework.Server.TeamFoundationTask

Namespace:  Microsoft.TeamFoundation.Framework.Server.Task
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Class TeamFoundationTask(Of T)
public class TeamFoundationTask<T>
generic<typename T>
public ref class TeamFoundationTask
type TeamFoundationTask<'T> =  class end
JScript does not support generic types or methods.

Type Parameters

  • T

The TeamFoundationTask<T> type exposes the following members.

Constructors

  Name Description
Public method TeamFoundationTask<T> Creates a TeamFoundationTask with the specified arguments

Top

Properties

  Name Description
Public property Callback The callback that should be invoked when the task is executed
Public property Identifier Some identifier to figure out who owns this task
Public property Interval The frequency the task should run for this schedule (measured in milliseconds)
Public property IsHighPriority
Public property NeedsTargetRequestContext
Public property ServicingContext Flag indicating if this task should return a servicing or system context to the callback.
Public property StartTime The first time the task should run
Public property TaskArgs The arguments to pass to the task callback when it is invoked

Top

Methods

  Name Description
Public method Equals Returns true if the given task targets the same callback method (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Gets the hash code for the task (Overrides Object.GetHashCode().)
Public method GetRequestContext
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Pretty print this task (Overrides Object.ToString().)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Framework.Server.Task Namespace