/// <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(); }
public void When執行EF告警作業() { var detector = ScenarioContext.Current.Get <Detector>("detector"); var originRecord = ScenarioContext.Current.Get <string>("originRecord"); var deviceType = ScenarioContext.Current.Get <DeviceType>("deviceType"); var sourceIp = ScenarioContext.Current.Get <string>("sourceIp"); _workDirector = new WorkDirectorFake(detector, originRecord, deviceType, sourceIp, _devices, _targets, _alarmConditions); _workDirector.Execute(); }