ServiceFactory<T> Delegate

Delegate for injecting a factory to create TeamFoundationServices in a way that can circumvent TeamFoundationRequestContext.GetService. This delegate can be used to facilitate Dependency Injection. Use these in a service consuming class constructor.

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

Syntax

'Declaration
Public Delegate Function ServiceFactory(Of T) ( _
    context As TeamFoundationRequestContext _
) As T
public delegate T ServiceFactory<T>(
    TeamFoundationRequestContext context
)
generic<typename T>
public delegate T ServiceFactory(
    TeamFoundationRequestContext^ context
)
type ServiceFactory = 
    delegate of  
        context:TeamFoundationRequestContext -> 'T
JScript does not support generic types or methods.

Type Parameters

  • T
    The base type that the factory should return. This should be an interface, abstract or unsealed class with virtuals

Parameters

Return Value

Type: T

See Also

Reference

Microsoft.TeamFoundation.Framework.Server Namespace