Commit 1b12bd7d authored by Andreas Müller's avatar Andreas Müller

Updated References, Added ILogger to TCP-client. Other following.

parent fa6cf8c9
Pipeline #19 passed with stage
in 2 minutes and 38 seconds
......@@ -5,6 +5,10 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modbus.Tcp\Modbus.Tcp.csproj" />
</ItemGroup>
......
......@@ -52,7 +52,8 @@
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.2-beta" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.5" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
......
using System;
using AMWD.Modbus.Common.Util;
using System;
namespace AMWD.Modbus.Common.Structures
{
......@@ -32,5 +33,15 @@ namespace AMWD.Modbus.Common.Structures
public ModbusException(string message, Exception innerException)
: base(message, innerException)
{ }
/// <summary>
/// Gets or sets the error/exception code.
/// </summary>
public ErrorCode ErrorCode { get; set; }
/// <summary>
/// Gets the error message.
/// </summary>
public string ErrorMessage => ErrorCode.GetDescription();
}
}
......@@ -53,8 +53,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="System.IO.Ports" Version="4.5.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.2-beta" PrivateAssets="all" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.5" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
......
This diff is collapsed.
......@@ -52,7 +52,8 @@
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.2-beta" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.2.5" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
......
......@@ -541,7 +541,7 @@ namespace UnitTests
Console.WriteLine($"Server response: {response?.Length ?? -1}");
if (response != null)
{
await stream.WriteAsync(response, ct);
await stream.WriteAsync(response, 0, response.Length, ct);
Console.WriteLine("Server response written");
}
}
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment