private void RaiseNewSecurity(Security security) { _added.SafeInvoke(security); NewSecurity.SafeInvoke(security); var multiEvt = NewSecurities; if (multiEvt == null) { return; } multiEvt.SafeInvoke(new[] { security }); }
public override void Add(Security item) { if (item is ExpressionIndexSecurity) { _registry.IndexSecurities.Add((ExpressionIndexSecurity)item); } else if (item is ContinuousSecurity) { _registry.ContinuousSecurities.Add((ContinuousSecurity)item); } else { base.Add(item); } NewSecurity.SafeInvoke(item); }
internal void OnAddSecurity(int row, int rowCount, string securityId, string shortName, string longName, string type, int decimals, int lotSize, double stepPrice, double priceStep, string isin, string board, DateTime expiryDate, double daysBeforeExpiry, double strike) { NewSecurity.SafeInvoke(row, rowCount, securityId, shortName, longName, type, decimals, lotSize, stepPrice.ToDecimal(), priceStep.ToDecimal(), isin, board, DateTime.FromOADate(0) == expiryDate ? (DateTime?)null : expiryDate, daysBeforeExpiry.ToDecimal(), strike.ToDecimal()); }
private void NewSecurityHandler(Security security) { AddGuiAction(() => NewSecurity.SafeInvoke(security)); }