BuildServiceHostUtilities.Register Method (IBuildServiceHost, String, String, String, Boolean)

Registers the service host with its project collection, by using the provided userName and password. If the service host is already registered, an exception is thrown. In this case, call Unregister first.

Namespace:  Microsoft.TeamFoundation.Build.Config
Assembly:  Microsoft.TeamFoundation.Build.Config (in Microsoft.TeamFoundation.Build.Config.dll)

Syntax

'Declaration
Public Shared Sub Register ( _
    serviceHost As IBuildServiceHost, _
    userName As String, _
    password As String, _
    authenticatingUserName As String, _
    canTranslateAuthenticatingUserName As Boolean _
)
public static void Register(
    IBuildServiceHost serviceHost,
    string userName,
    string password,
    string authenticatingUserName,
    bool canTranslateAuthenticatingUserName
)
public:
static void Register(
    IBuildServiceHost^ serviceHost, 
    String^ userName, 
    String^ password, 
    String^ authenticatingUserName, 
    bool canTranslateAuthenticatingUserName
)
static member Register : 
        serviceHost:IBuildServiceHost * 
        userName:string * 
        password:string * 
        authenticatingUserName:string * 
        canTranslateAuthenticatingUserName:bool -> unit
public static function Register(
    serviceHost : IBuildServiceHost, 
    userName : String, 
    password : String, 
    authenticatingUserName : String, 
    canTranslateAuthenticatingUserName : boolean
)

Parameters

  • userName
    Type: System.String

    The service account to use for the service host. If null, Network Service will be used.

  • password
    Type: System.String

    The password for the service account.

.NET Framework Security

See Also

Reference

BuildServiceHostUtilities Class

Register Overload

Microsoft.TeamFoundation.Build.Config Namespace