Connection

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Add On > Account >

Connection

Previous page Return to chapter overview Next page

Definition

Indicates the data connection used for the specified account.

 

Property Value

An instance of the Connection class containing information about the connection used for a specified account

 

Syntax

<Account>.Connection

 

Examples

ns


private Account myAccount;
 
protected override void OnStateChange()
{
  if (State == State.SetDefaults)
  {
      // Initialize myAccount
  }

}
 
private void OnAccountStatusUpdate(object sender, AccountStatusEventArgs e)
{
  Print(String.Format("{0} connection updated", myAccount.Connection.Options.Name));
}