HostLogin(String, String, Boolean, Boolean) Method

Displays a login dialog to the user that also handles password expiry and password changing. Returns a logged in Host object if successful or Nothing if the user cancels the dialog.

Definition

Namespace: T4.API
Assembly: T4API.47 (in T4API.47.dll) Version: 4.7.0.0 (4.7.68.4)
C#
public static Host Login(
	string psAppName,
	string psAppLicense,
	bool pbSubscribeToAccounts,
	bool pbIncludeTestEnvironments
)

Parameters

psAppName  String
The name of the application as stated when requesting an application license code. T4Example is a valid application on the simulator system only.
psAppLicense  String
The license code for the application. 112A04B0-5AAF-42F4-994E-FA7CB959C60B is the license for T4Example on the simulator system. NOTE that license codes will be different between the live and simulator systems for the same application name.
pbSubscribeToAccounts  Boolean
True if all the accounts this user can see should be subscribed to prior to returning. Note: Subscribe requests will be sent for all accounts, however the responses may not be received prior to returning. Check the Account.Complete properties to see if accounts have actually been loaded.
pbIncludeTestEnvironments  Boolean
True if the user selectable list of available environments should include internal test environments. This property is for internal testing only.

Return Value

Host
A logged in Host object

Remarks

This method will display a login dialog to the user allowing them to enter their details. This dialog also handles password change and expiration. Note that as this method displays a dialog to the user this method won't return until the user exits the dialog. If they cancel it then 'Nothing' will be returned from this method. If login succeeds then the Host object is returned. You will not receive LoginSuccess or LoginFailure events during initial login using this method as it will have been raised prior to the Host object being returned to you.

See Also