Partager via


TeamFoundationResourceManagementService.CreateComponentExecuteAndDispose<TComponent> Method

Creates a component that can be used to communicate to the current version of the database, executes a delegate specified by the action parameter and disposes a component.

This method will retry an action up to 10 times if database version has changed between the time when component was created and execut.

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

Syntax

'Declaration
Public Sub CreateComponentExecuteAndDispose(Of TComponent As TeamFoundationSqlResourceComponent) ( _
    requestContext As TeamFoundationRequestContext, _
    databaseCategory As String, _
    action As Action(Of TComponent) _
)
public void CreateComponentExecuteAndDispose<TComponent>(
    TeamFoundationRequestContext requestContext,
    string databaseCategory,
    Action<TComponent> action
)
where TComponent : TeamFoundationSqlResourceComponent
public:
generic<typename TComponent>
where TComponent : TeamFoundationSqlResourceComponent 
void CreateComponentExecuteAndDispose(
    TeamFoundationRequestContext^ requestContext, 
    String^ databaseCategory, 
    Action<TComponent>^ action
)
member CreateComponentExecuteAndDispose : 
        requestContext:TeamFoundationRequestContext * 
        databaseCategory:string * 
        action:Action<'TComponent> -> unit   when 'TComponent : TeamFoundationSqlResourceComponent
JScript does not support generic types or methods.

Type Parameters

  • TComponent

Parameters

.NET Framework Security

See Also

Reference

TeamFoundationResourceManagementService Class

Microsoft.TeamFoundation.Framework.Server Namespace