Пример #1
0
        public override void OnRegisterNotification(ISymbol symbol, SymbolNotificationType type, INotificationSettings settings)
        {
            if (symbol == null)
            {
                throw new ArgumentNullException("symbol");
            }
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            NotificationSettings settings2 = null;

            if (!this._notificationTable.TryGetRegisteredNotificationSettings(symbol, out settings2))
            {
                this.RegisterNotification(symbol, type, (NotificationSettings)settings);
            }
            else if (settings2.CompareTo(settings) >= 0)
            {
                this.RegisterNotification(symbol, type, settings2);
            }
            else
            {
                this.UnregisterNotification(symbol, type);
                this.RegisterNotification(symbol, type, (NotificationSettings)settings);
            }
        }