优化SignalTowerBase,增加_dicRtGeneratedStEvents字典,用于解决RT设置三色灯状态和事件配置文件自动设置三色灯状态相互无法同步的问题。(例如RT打开蜂鸣器后,下一次扫描周期可能会被自动关闭)
新增属性IsBuzzer到SignalTowerPartBase对象。
新增属性Name到STEventAction对象。
优化一些代码和注释。
解决方案中关闭对单元测试项目的编译。
This commit is contained in:
DESKTOP-1N1NK8A\auvkk 2023-05-08 11:19:59 +08:00
parent 77b02eff44
commit 1d82dc23fa
10 changed files with 218 additions and 208 deletions

View File

@ -7,21 +7,34 @@ namespace MECF.Framework.Common.Device.Bases
/// </summary> /// </summary>
public class STEventAction : IComparable, ICloneable public class STEventAction : IComparable, ICloneable
{ {
#region Constructors
/// <summary> /// <summary>
/// 信号灯塔元件动作构造函数。 /// 信号灯塔元件动作构造函数。
/// </summary> /// </summary>
/// <param name="light">信号灯类型。</param> /// <param name="name">动作名称。</param>
/// <param name="status">信号灯输出状态。</param> /// <param name="light">信号塔组件类型(名称)。</param>
/// <param name="blinkPattern">闪烁模式。如果传入空值,则自动调用 /// <param name="status">信号塔组件输出状态。</param>
/// <see cref="STBlinkPattern.GetDefaultPattern"/>以创建默认闪烁模式。</param> /// <param name="blinkPattern">信号塔组件工作模式。如果传入空值,则自动调用
public STEventAction(LightType light, TowerLightStatus status, STBlinkPattern blinkPattern = null) /// <see cref="STBlinkPattern.GetDefaultPattern"/>以创建默认工作模式。</param>
public STEventAction(string name, LightType light, TowerLightStatus status, STBlinkPattern blinkPattern = null)
{ {
Name = name;
Light = light; Light = light;
Status = status; Status = status;
BlinkPattern = blinkPattern ?? STBlinkPattern.GetDefaultPattern(); BlinkPattern = blinkPattern ?? STBlinkPattern.GetDefaultPattern();
} }
#endregion
#region Properties
/// <summary>
/// 动作名称。
/// </summary>
public string Name { get; }
/// <summary> /// <summary>
/// 返回信号灯实例。 /// 返回信号灯实例。
/// </summary> /// </summary>
@ -38,6 +51,8 @@ namespace MECF.Framework.Common.Device.Bases
/// </summary> /// </summary>
public STBlinkPattern BlinkPattern { get; set; } public STBlinkPattern BlinkPattern { get; set; }
#endregion
#region Methods #region Methods
/// <inheritdoc /> /// <inheritdoc />
@ -56,7 +71,7 @@ namespace MECF.Framework.Common.Device.Bases
/// <inheritdoc /> /// <inheritdoc />
public object Clone() public object Clone()
{ {
return new STEventAction(Light, Status, (STBlinkPattern)BlinkPattern.Clone()); return new STEventAction(Name, Light, Status, (STBlinkPattern)BlinkPattern.Clone());
} }
/// <inheritdoc/> /// <inheritdoc/>

View File

@ -87,7 +87,7 @@ namespace MECF.Framework.Common.Device.Bases
status = TowerLightStatus.Customized; status = TowerLightStatus.Customized;
} }
events[stEvent.Name].Add(new STEventAction(light, status, blinkPattern)); events[stEvent.Name].Add(new STEventAction(stEvent.Name, light, status, blinkPattern));
} }
else else
{ {

View File

@ -11,9 +11,11 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Windows.Media.Media3D;
using System.Xml; using System.Xml;
using DicEventActions = System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<MECF.Framework.Common.Device.Bases.STEventAction>>;
using DicLightActions = System.Collections.Generic.Dictionary<MECF.Framework.Common.Device.Bases.LightType,MECF.Framework.Common.Device.Bases.STEventAction>;
namespace MECF.Framework.Common.Device.Bases namespace MECF.Framework.Common.Device.Bases
{ {
/// <summary> /// <summary>
@ -23,6 +25,11 @@ namespace MECF.Framework.Common.Device.Bases
{ {
#region Variables #region Variables
/// <summary>
/// 系统保留的工作模式配置项,用于工艺结束后蜂鸣器发出提示音。
/// </summary>
protected const string KEY_PATTERN_JOB_DONE = "JobDone";
/// <summary> /// <summary>
/// 是否关闭蜂鸣器输出。 /// 是否关闭蜂鸣器输出。
/// <value>True蜂鸣器被手动关闭满足事件条件也不要打开蜂鸣器。</value> /// <value>True蜂鸣器被手动关闭满足事件条件也不要打开蜂鸣器。</value>
@ -32,8 +39,20 @@ namespace MECF.Framework.Common.Device.Bases
/// <summary> /// <summary>
/// 信号塔事件字典,从配置文件中读取。 /// 信号塔事件字典,从配置文件中读取。
/// <remarks>
/// 字典的Key表示事件名称对应STEvent配置文件中的name属性。
/// </remarks>
/// </summary> /// </summary>
private Dictionary<string, List<STEventAction>> _signalTowerEvent; private DicEventActions _dicPreDefinedStEvents;
/// <summary>
/// 信号塔扩展事件字典。
/// <remarks>
/// 除STEvents配置中预设的事件外还有一类事件通常由RT触发这类事件也需要参与三色灯输出状态判断。
/// </remarks>
/// </summary>
private DicEventActions _dicRtGeneratedStEvents;
/// <summary> /// <summary>
/// 信号塔中组件字典。 /// 信号塔中组件字典。
@ -64,6 +83,7 @@ namespace MECF.Framework.Common.Device.Bases
: base(module, node, ioModule) : base(module, node, ioModule)
{ {
_dicStParts = new Dictionary<LightType, SignalTowerPartBase>(); _dicStParts = new Dictionary<LightType, SignalTowerPartBase>();
_dicRtGeneratedStEvents = new ();
var doRedLight = ParseDoNode("doRed", node, ioModule); var doRedLight = ParseDoNode("doRed", node, ioModule);
var doYellowLight = ParseDoNode("doYellow", node, ioModule); var doYellowLight = ParseDoNode("doYellow", node, ioModule);
@ -165,8 +185,8 @@ namespace MECF.Framework.Common.Device.Bases
if (events == null) if (events == null)
LOG.Error("Unable to parse the signal tower events from config file."); LOG.Error("Unable to parse the signal tower events from config file.");
_signalTowerEvent = events; _dicPreDefinedStEvents = events;
return _signalTowerEvent != null; return _dicPreDefinedStEvents != null;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -196,6 +216,7 @@ namespace MECF.Framework.Common.Device.Bases
public void Reset() public void Reset()
{ {
_switchBuzzerOff = false; _switchBuzzerOff = false;
_dicRtGeneratedStEvents?.Clear();
foreach (var light in _dicStParts.Values) foreach (var light in _dicStParts.Values)
light.Reset(); light.Reset();
@ -215,46 +236,31 @@ namespace MECF.Framework.Common.Device.Bases
/// </summary> /// </summary>
public void Monitor() public void Monitor()
{ {
_dicMergedActions = _dicStParts.ToDictionary( // 遍历所有预设的事件,决定信号塔各元件的输出状态。
x => x.Key, _dicMergedActions = ConvertEventsToActions(_dicPreDefinedStEvents);
v => new STEventAction(v.Key, TowerLightStatus.Off));
// 默认设置为Off // 遍历所有扩展的事件,决定信号塔各元件的输出状态。
_dicMergedActions.Values.ToList().ForEach(x => x.Status = TowerLightStatus.Off); _dicMergedActions = ConvertEventsToActions(_dicRtGeneratedStEvents, _dicMergedActions, false);
// 遍历所有注册的事件,决定信号塔各元件的输出状态。
foreach (var signalEvent in _signalTowerEvent)
{
var obj = DATA.Poll(signalEvent.Key);
if (obj is not true)
continue;
foreach (var newAction in signalEvent.Value)
{
if (!_dicStParts.TryGetValue(newAction.Light, out var stPart))
continue;
// 根据当前设备状态,判断下一步信号组件的输出动作是什么
var mergedAction = MergeAction(_dicMergedActions[stPart.Light], newAction);
_dicMergedActions[stPart.Light] = mergedAction;
}
}
// 设置信号塔每个组件的输出。 // 设置信号塔每个组件的输出。
foreach (var action in _dicMergedActions) foreach (var kvp in _dicMergedActions)
{ {
// 创建一个动作副本,解决蜂鸣器被手动关闭后无法启用的问题 var action = kvp.Value;
var clonedAction = (STEventAction)action.Value?.Clone(); if (action == null)
if(clonedAction == null)
continue; continue;
// 如果蜂鸣器被强制关闭 var stPart = _dicStParts[action.Light];
if (clonedAction.Light == LightType.Buzzer && _switchBuzzerOff) if (stPart == null)
clonedAction.Status = TowerLightStatus.Off; continue;
// 创建动作副本因为后续可能根据_switchBuzzerOff调整输出状态避免覆盖原配置。
var cloned = (STEventAction)action.Clone();
_dicStParts[action.Key].SetAction(clonedAction); // 如果蜂鸣器被强制关闭则将待执行动作中的状态修改为Off
if (stPart.IsBuzzer && _switchBuzzerOff)
cloned.Status = TowerLightStatus.Off;
stPart.SetAction(cloned);
} }
// 扫描信号塔组件状态 // 扫描信号塔组件状态
@ -276,17 +282,15 @@ namespace MECF.Framework.Common.Device.Bases
return false; return false;
} }
if (_dicStParts.TryGetValue(light, out var lightInstance)) if (!_dicRtGeneratedStEvents.TryGetValue(light.ToString(), out var actions))
{ {
// 强制使能蜂鸣器 actions = new List<STEventAction>();
_switchBuzzerOff = false; _dicRtGeneratedStEvents[light.ToString()] = actions;
lightInstance.SetAction(new STEventAction(lightInstance.Light, TowerLightStatus.Customized,
pattern));
return true;
} }
LOG.Error($"{light} Unable to find this part of signal tower, check configuration"); actions.Add(new STEventAction("Blink", light, TowerLightStatus.Customized, pattern));
return false;
return true;
} }
/// <summary> /// <summary>
@ -301,16 +305,16 @@ namespace MECF.Framework.Common.Device.Bases
STBlinkPattern blinkPattern = null; STBlinkPattern blinkPattern = null;
// 读取STEvents配置文件中的JobDone模式的配置。 // 读取STEvents配置文件中的JobDone模式的配置。
var settings = _originStEvents.PatternsSettings.FirstOrDefault(x=>x.Name == "JobDone"); var settings = _originStEvents.PatternsSettings.FirstOrDefault(x => x.Name == KEY_PATTERN_JOB_DONE);
if (settings != null) if (settings != null)
{ {
// 解析配置中的Buzzer如果未指定Buzzer或指定为除Buzzer以外的信号灯则默认使用Buzzer。 // 解析配置中的Buzzer如果未指定Buzzer或指定为除Buzzer以外的信号灯则默认使用Buzzer。
var targetPart = settings.Part; var targetPart = settings.Part;
if (string.IsNullOrEmpty(targetPart) if (Enum.TryParse(targetPart, out LightType lightType)
|| !targetPart.StartsWith("Buz") && _dicStParts.TryGetValue(lightType, out var buzzer)
|| !Enum.TryParse(targetPart, out targetBuzzer)) && buzzer.IsBuzzer)
targetBuzzer = LightType.Buzzer; targetBuzzer = buzzer.Light;
blinkPattern = new STBlinkPattern(settings.Pattern, priority: settings.Priority, cycle: settings.Cycles); blinkPattern = new STBlinkPattern(settings.Pattern, priority: settings.Priority, cycle: settings.Cycles);
} }
@ -318,23 +322,18 @@ namespace MECF.Framework.Common.Device.Bases
{ {
// 没找到JobDone的工作模式配置生成默认配置 // 没找到JobDone的工作模式配置生成默认配置
blinkPattern = STBlinkPattern.GetJobDonePattern(); blinkPattern = STBlinkPattern.GetJobDonePattern();
LOG.Warning("Unable to find pre-defined pattern for JobDone"); LOG.Warning($"Unable to find pre-defined pattern for {KEY_PATTERN_JOB_DONE}");
} }
// 如果在字典中找到Buzzer组件则设置动作 if (!_dicRtGeneratedStEvents.TryGetValue(targetBuzzer.ToString(), out var actions))
if (_dicStParts.TryGetValue(targetBuzzer, out var objBuzzer))
{ {
// 强制使能蜂鸣器 actions = new List<STEventAction>();
_switchBuzzerOff = false; _dicRtGeneratedStEvents[targetBuzzer.ToString()] = actions;
objBuzzer.SetAction(new STEventAction(targetBuzzer, TowerLightStatus.Customized, blinkPattern)); }
actions.Add(new STEventAction(KEY_PATTERN_JOB_DONE, targetBuzzer, TowerLightStatus.Customized, blinkPattern));
return true; return true;
} }
else
{
reason = $"Unalbe to find \"{targetBuzzer}\"";
return false;
}
}
/// <summary> /// <summary>
/// 打开或关闭蜂鸣器。 /// 打开或关闭蜂鸣器。
@ -404,6 +403,53 @@ namespace MECF.Framework.Common.Device.Bases
return false; return false;
} }
/// <summary>
/// 更具RT当前状态合并所有事件的动作决定信号塔组件的输出状态。
/// </summary>
/// <param name="dicEvents">事件字典。</param>
/// <param name="initActions">信号塔组件初始动作字典。</param>
/// <param name="isPollDataNeeded">
/// 是否从RT拉去事件对应的属性值。
/// <remarks>
/// 对于<see cref="_dicRtGeneratedStEvents"/>事件列表不需要从RT拉去数据直接合并动作即可。
/// </remarks>
/// </param>
/// <returns></returns>
private DicLightActions ConvertEventsToActions(DicEventActions dicEvents, DicLightActions initActions = null, bool isPollDataNeeded = true)
{
// 创建初始动作字典
initActions ??= _dicStParts.ToDictionary(
x => x.Key,
v => new STEventAction("", v.Key, TowerLightStatus.Off));
// 遍历所有预设的事件,决定信号塔各元件的输出状态。
foreach (var stEvent in dicEvents)
{
if (isPollDataNeeded)
{
// 如果需要从RT拉取事件对应属性的返回值则判断返回值是否为True
// 仅当为True时才进行动作合并否则直接忽略
var obj = DATA.Poll(stEvent.Key);
if (obj is not true)
continue;
}
foreach (var newAction in stEvent.Value)
{
if (!_dicStParts.TryGetValue(newAction.Light, out var stPart))
continue;
// 根据当前设备状态,判断下一步信号组件的输出动作是什么
var mergedAction = MergeAction(initActions[stPart.Light], newAction);
initActions[stPart.Light] = mergedAction;
}
}
return initActions;
}
#endregion #endregion
} }

View File

@ -83,6 +83,12 @@ namespace MECF.Framework.Common.Device.Bases
/// </summary> /// </summary>
public LightType Light => _lightType; public LightType Light => _lightType;
/// <summary>
/// 返回当前信号塔组件是否为蜂鸣器。
/// </summary>
public bool IsBuzzer => _lightType.ToString().Contains("Buzz");
#endregion #endregion
#region Monitor Methods #region Monitor Methods
@ -333,7 +339,7 @@ namespace MECF.Framework.Common.Device.Bases
_blinkStage = FsmStateBlink.Idle; _blinkStage = FsmStateBlink.Idle;
_blinkCycleDownCounter = 0; _blinkCycleDownCounter = 0;
_action = null; _action.Status = TowerLightStatus.Off;
_doLight.Value = false; _doLight.Value = false;
_qBlinkData?.Clear(); _qBlinkData?.Clear();

View File

@ -38,17 +38,17 @@
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="xunit.core">
<HintPath>..\packages\xunit.extensibility.core.2.4.2\lib\net452\xunit.core.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.extensibility.core"> <PackageReference Include="xunit.extensibility.core">
<Version>2.4.2</Version> <Version>2.4.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.0.1" /> <PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -93,7 +93,6 @@ Global
{EBE55E3F-6DCE-47B9-AC61-54A8B9B3482A}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBE55E3F-6DCE-47B9-AC61-54A8B9B3482A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBE55E3F-6DCE-47B9-AC61-54A8B9B3482A}.Release|Any CPU.Build.0 = Release|Any CPU {EBE55E3F-6DCE-47B9-AC61-54A8B9B3482A}.Release|Any CPU.Build.0 = Release|Any CPU
{F619C5AD-D0D9-4758-A85E-D747156709E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F619C5AD-D0D9-4758-A85E-D747156709E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F619C5AD-D0D9-4758-A85E-D747156709E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU {F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU
{F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU {F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU
{F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU {F619C5AD-D0D9-4758-A85E-D747156709E6}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU
@ -108,7 +107,6 @@ Global
{290FE38F-45F9-408C-B25B-C899B467E3F8}.Release|Any CPU.ActiveCfg = Release|Any CPU {290FE38F-45F9-408C-B25B-C899B467E3F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{290FE38F-45F9-408C-B25B-C899B467E3F8}.Release|Any CPU.Build.0 = Release|Any CPU {290FE38F-45F9-408C-B25B-C899B467E3F8}.Release|Any CPU.Build.0 = Release|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU
@ -116,7 +114,6 @@ Global
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.Release|Any CPU.ActiveCfg = Release|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25E5D56D-461A-43A0-BEA8-CF5057356C80}.Release|Any CPU.Build.0 = Release|Any CPU {25E5D56D-461A-43A0-BEA8-CF5057356C80}.Release|Any CPU.Build.0 = Release|Any CPU
{9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU {9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopy|Any CPU.ActiveCfg = Debug|Any CPU
{9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU {9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopy|Any CPU.Build.0 = Debug|Any CPU
{9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU {9808C3D5-3EC7-47EF-8FF7-5670BEB9DEED}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\xunit.core.2.4.2\build\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.4.2\build\xunit.core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -36,36 +35,12 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.18.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\..\packages\Moq.4.18.4\lib\net462\Moq.dll</HintPath>
</Reference>
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert, Version=2.4.2.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\packages\xunit.assert.2.4.2\lib\netstandard1.1\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core, Version=2.4.2.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\packages\xunit.extensibility.core.2.4.2\lib\net452\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.4.2.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\packages\xunit.extensibility.execution.2.4.2\lib\net452\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Aitex\Core\RT\IOCore\Interlock\InterlockManagerTests.cs" /> <Compile Include="Aitex\Core\RT\IOCore\Interlock\InterlockManagerTests.cs" />
@ -102,21 +77,22 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Include="app.config" />
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Analyzer Include="..\..\packages\xunit.analyzers.1.1.0\analyzers\dotnet\cs\xunit.analyzers.dll" /> <PackageReference Include="Moq">
<Analyzer Include="..\..\packages\xunit.analyzers.1.1.0\analyzers\dotnet\cs\xunit.analyzers.fixes.dll" /> <Version>4.18.4</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.2</Version>
</PackageReference>
<PackageReference Include="xunit.analyzers">
<Version>1.1.0</Version>
</PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\xunit.core.2.4.2\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.4.2\build\xunit.core.props'))" />
<Error Condition="!Exists('..\..\packages\xunit.core.2.4.2\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.4.2\build\xunit.core.targets'))" />
</Target>
<Import Project="..\..\packages\xunit.core.2.4.2\build\xunit.core.targets" Condition="Exists('..\..\packages\xunit.core.2.4.2\build\xunit.core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="5.1.1" targetFramework="net48" />
<package id="Moq" version="4.18.4" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="xunit" version="2.4.2" targetFramework="net48" />
<package id="xunit.abstractions" version="2.0.3" targetFramework="net48" />
<package id="xunit.analyzers" version="1.1.0" targetFramework="net48" />
<package id="xunit.assert" version="2.4.2" targetFramework="net48" />
<package id="xunit.core" version="2.4.2" targetFramework="net48" />
<package id="xunit.extensibility.core" version="2.4.2" targetFramework="net48" />
<package id="xunit.extensibility.execution" version="2.4.2" targetFramework="net48" />
</packages>

View File

@ -40,18 +40,6 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c">
<HintPath>..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c">
<HintPath>..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c">
<HintPath>..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c">
<HintPath>..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CustomWndTests.cs" /> <Compile Include="CustomWndTests.cs" />
@ -63,6 +51,11 @@
<Name>MECF.Framework.UI.Client</Name> <Name>MECF.Framework.UI.Client</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="xunit">
<Version>2.4.2</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit" version="2.1.0" targetFramework="net45" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />
<package id="xunit.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
</packages>