Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- requestContext
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
- databaseCategory
 Type: System.String
- action
 Type: System.Action<TComponent>
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.