/// <summary> /// 运行前检测 /// </summary> /// <param name="args"></param> /// <returns></returns> public override bool RunCheck(ExtensionRunCheckArgs args) { try { return(((DeviceState)_script.GetStaticMethodWithArgs("*.__ReqState")()) .HasFlag(args.DeviceInfo.State)); } #if SHOW_METHOD_ERR catch (Exception ex) { OpenApi.Log.Warn(this, "__ReqState() Not found", ex); return(true); } #else catch { return(true); } #endif }
/// <summary> /// 运行检测 /// </summary> /// <param name="args"></param> /// <returns></returns> public bool RunCheck(ExtensionRunCheckArgs args) { return(RequiredDeviceState.HasFlag(args.DeviceInfo.State)); }
/// <summary> /// 运行检查 /// </summary> /// <param name="args"></param> /// <returns></returns> public abstract bool RunCheck(ExtensionRunCheckArgs args);