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)

public static void Register(
	IBuildServiceHost serviceHost,
	string userName,
	string password,
	string authenticatingUserName,
	bool canTranslateAuthenticatingUserName
)

Parameters

serviceHost
Type: Microsoft.TeamFoundation.Build.Client.IBuildServiceHost

The service host to be registered.

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.

authenticatingUserName
Type: System.String
canTranslateAuthenticatingUserName
Type: System.Boolean

Show: