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
serviceHost
Type: Microsoft.TeamFoundation.Build.Client.IBuildServiceHostThe service host to be registered.
userName
Type: System.StringThe service account to use for the service host. If null, Network Service will be used.
password
Type: System.StringThe password for the service account.
- authenticatingUserName
Type: System.String
- canTranslateAuthenticatingUserName
Type: System.Boolean
.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.