Delen via


ServicingContext.CreateComponent<TComponent> Method

Creates a component that can be used to communicate to the current version of the database.

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

Syntax

'Declaration
Public Function CreateComponent(Of TComponent As {New, TeamFoundationSqlResourceComponent}) ( _
    databaseCategory As String, _
    partitionId As Integer, _
    commandTimeout As Integer, _
    deadlockPause As Integer, _
    maxDeadlockRetries As Integer _
) As TComponent
public TComponent CreateComponent<TComponent>(
    string databaseCategory,
    int partitionId,
    int commandTimeout,
    int deadlockPause,
    int maxDeadlockRetries
)
where TComponent : new(), TeamFoundationSqlResourceComponent
public:
generic<typename TComponent>
where TComponent : gcnew(), TeamFoundationSqlResourceComponent
TComponent CreateComponent(
    String^ databaseCategory, 
    int partitionId, 
    int commandTimeout, 
    int deadlockPause, 
    int maxDeadlockRetries
)
member CreateComponent : 
        databaseCategory:string * 
        partitionId:int * 
        commandTimeout:int * 
        deadlockPause:int * 
        maxDeadlockRetries:int -> 'TComponent  when 'TComponent : new() and TeamFoundationSqlResourceComponent
JScript does not support generic types or methods.

Type Parameters

  • TComponent
    The typoe of component to create.

Parameters

Return Value

Type: TComponent
Returns [{0}].

.NET Framework Security

See Also

Reference

ServicingContext Class

Microsoft.TeamFoundation.Framework.Server Namespace