Status
Definition
Indicates the current status of the primary data connection.
Properties
\<connection\>.Status
Examples
1 private int priceLost; 2 private int mainLost; 3 4 private void OnAccountItemUpdate(object sender, AccountItemEventArgs e) 5 { 6 // Count the number of times OnAccountItemUpdate() is called with a lost price connection 7 if (myAccount.Connection.PriceStatus == ConnectionStatus.ConnectionLost) 8 9 10 priceLost += 1; 11 12 // Count the number of times OnAccountItemUpdate() is called with a lost primary connection 13 14 if (myAccount.Connection.Status == ConnectionStatus.ConnectionLost) 15 mainLost += 1; 16 17 // Print the number of times each connection was lost during OnAccountItemUpdate() 18 if (mainLost > 0 || priceLost > 0) 19 Print(String.Format("Main connection lost {0} times. Price feed lost {1} times.", mainLost, priceLost)); 20 21 22 Print(String.Format("Main connection lost {0} times. Price feed lost {1} times.", 23 mainLost, priceLost)); 24 }

