Ejemplo n.º 1
0
        private void ReportsClick(object sender, RoutedEventArgs e)
        {
            var security = SelectedSecurity;

            var isSubscribe = _reportSecurities.TryAdd(security);

            if (!isSubscribe)
            {
                _reportSecurities.Remove(security);
            }

            foreach (var report in Enumerator.GetValues <FundamentalReports>())
            {
                Trader.SubscribeFundamentalReport(security, report, isSubscribe);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update filter with new subscription.
 /// </summary>
 /// <param name="securityId">Security ID.</param>
 /// <param name="dataType">Data type info.</param>
 /// <returns>If subscription was just created, return <see langword="true" />, otherwise <see langword="false" />.</returns>
 public bool Subscribe(SecurityId securityId, DataType dataType)
 {
     return(_subscriptions.TryAdd(Tuple.Create(securityId, dataType)));
 }