public NotificationDirectorFake( NotifierStrategy strategy, List <Monitor> monitors, List <Monitor> previousMonitors, List <NotificationCondition> notificationConditions, List <Notification> notifications ) : base(strategy) { _monitors = monitors; _previousMonitors = previousMonitors; _notificationConditions = notificationConditions; _notifications = notifications; }
/// <summary> /// 建構式 /// </summary> /// <param name="strategy">通知策略</param> public NotificationDirector(NotifierStrategy strategy) { _notifierStrategy = strategy; }
/// <summary> /// 建構式 /// </summary> /// <param name="detector">偵測器</param> /// <param name="record">接收記錄訊息</param> /// <param name="deviceType">設備類型</param> /// <param name="sourceIp">來源 IP</param> public GenericRecordDirector(Detector detector, string record, DeviceType deviceType, NotifierStrategy strategy, string sourceIp = null) { _license = new LicenseBusinessLogic(); _workDirector = new WorkDirector(detector, record, deviceType, sourceIp); _notificationDirector = new NotificationDirector(strategy); _pusher = new MonitorPushStrategy(); }