public NotifierProcessorDecorator(ANotifierProcessorParams notifierProcessorParams) : base(notifierProcessorParams.NotifierProcessor) { if (CheckTimeForCloseApp(((NotifierProcessorDecoratorParams)notifierProcessorParams).Lifetime)) { return; } _dataReader = ((NotifierProcessorDecoratorParams)notifierProcessorParams).DataReader; _clientsManager = notifierProcessorParams.ClientsManager; _logger = notifierProcessorParams.Logger; if (((NotifierProcessorDecoratorParams)notifierProcessorParams).Lifetime != DateTime.MinValue) { _lifetime = ((NotifierProcessorDecoratorParams)notifierProcessorParams).Lifetime; _timer = new Timer(notifierProcessorParams.Interval) { AutoReset = true }; _timer.Elapsed += (sender, eventArgs) => { Close(); }; _timer.Start(); } Execute(); }
protected ANotificationDataReaderDecorator(INotificationDataReader notificationDataReader) => NotificationDataReader = notificationDataReader;
public NotificationDataReaderDecorator(INotificationDataReader notificationDataReader, int id) : base(notificationDataReader) { _id = id; }