Status
Definition
Indicates the current status of the primary data connection.
Properties
\<connection\>.Status
Examples
private int priceLost;private int mainLost;private void OnAccountItemUpdate(object sender, AccountItemEventArgs e){// Count the number of times OnAccountItemUpdate() is called with a lost price connectionif (myAccount.Connection.PriceStatus == ConnectionStatus.ConnectionLost)priceLost += 1;// Count the number of times OnAccountItemUpdate() is called with a lost primary connectionif (myAccount.Connection.Status == ConnectionStatus.ConnectionLost)mainLost += 1;// Print the number of times each connection was lost during OnAccountItemUpdate()if (mainLost > 0 || priceLost > 0)Print(String.Format("Main connection lost {0} times. Price feed lost {1} times.", mainLost, priceLost));Print(String.Format("Main connection lost {0} times. Price feed lost {1} times.",mainLost, priceLost));}