2017-03-22 update 1 Downgrade to .NET Standard 1.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard1.5</TargetFramework>
|
<TargetFramework>netstandard1.3</TargetFramework>
|
||||||
<AssemblyName>Modbus.Net</AssemblyName>
|
<AssemblyName>Modbus.Net</AssemblyName>
|
||||||
<RootNamespace>Modbus.Net</RootNamespace>
|
<RootNamespace>Modbus.Net</RootNamespace>
|
||||||
<PackageId>Modbus.Net</PackageId>
|
<PackageId>Modbus.Net</PackageId>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace Modbus.Net
|
|||||||
}
|
}
|
||||||
//自动寻找存在的协议并将其加载
|
//自动寻找存在的协议并将其加载
|
||||||
var protocalUnit =
|
var protocalUnit =
|
||||||
Assembly.Load(type.GetTypeInfo().Assembly.GetName()).CreateInstance(protocalName) as ProtocalUnit;
|
Activator.CreateInstance(type.GetTypeInfo().Assembly.GetType(protocalName)) as ProtocalUnit;
|
||||||
if (protocalUnit == null) throw new InvalidCastException("没有相应的协议内容");
|
if (protocalUnit == null) throw new InvalidCastException("没有相应的协议内容");
|
||||||
protocalUnit.Endian = Endian;
|
protocalUnit.Endian = Endian;
|
||||||
Register(protocalUnit);
|
Register(protocalUnit);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Reflection;
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Modbus.Net
|
namespace Modbus.Net
|
||||||
@@ -112,7 +113,7 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
//自动查找相应的协议放缩类,命令规则为——当前的实际类名(注意是继承后的)+"BytesExtend"。
|
//自动查找相应的协议放缩类,命令规则为——当前的实际类名(注意是继承后的)+"BytesExtend"。
|
||||||
var bytesExtend =
|
var bytesExtend =
|
||||||
Assembly.Load(GetType().GetTypeInfo().Assembly.GetName()).CreateInstance(GetType().FullName + "BytesExtend") as
|
Activator.CreateInstance(GetType().GetTypeInfo().Assembly.GetType(GetType().FullName + "BytesExtend")) as
|
||||||
IProtocalLinkerBytesExtend;
|
IProtocalLinkerBytesExtend;
|
||||||
return bytesExtend?.BytesExtend(content);
|
return bytesExtend?.BytesExtend(content);
|
||||||
}
|
}
|
||||||
@@ -126,7 +127,7 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
//自动查找相应的协议放缩类,命令规则为——当前的实际类名(注意是继承后的)+"BytesExtend"。
|
//自动查找相应的协议放缩类,命令规则为——当前的实际类名(注意是继承后的)+"BytesExtend"。
|
||||||
var bytesExtend =
|
var bytesExtend =
|
||||||
Assembly.Load(GetType().GetTypeInfo().Assembly.GetName()).CreateInstance(GetType().FullName + "BytesExtend") as
|
Activator.CreateInstance(GetType().GetTypeInfo().Assembly.GetType(GetType().FullName + "BytesExtend")) as
|
||||||
IProtocalLinkerBytesExtend;
|
IProtocalLinkerBytesExtend;
|
||||||
return bytesExtend?.BytesDecact(content);
|
return bytesExtend?.BytesDecact(content);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace Modbus.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void NotifyThreadPoolOfPendingWork()
|
private void NotifyThreadPoolOfPendingWork()
|
||||||
{
|
{
|
||||||
#if NET45
|
#if NET40 || NET45 || NET451 || NET452 || NET46 || NET461 || NET462
|
||||||
ThreadPool.UnsafeQueueUserWorkItem(_ =>
|
ThreadPool.UnsafeQueueUserWorkItem(_ =>
|
||||||
#else
|
#else
|
||||||
ThreadPool.QueueUserWorkItem(_ =>
|
ThreadPool.QueueUserWorkItem(_ =>
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ There are also "Modbus.Net.Siemens" that can communicate to Siemens S7-200, S7-2
|
|||||||
Platform Supported
|
Platform Supported
|
||||||
-------------------
|
-------------------
|
||||||
* Visual Studio 2017
|
* Visual Studio 2017
|
||||||
* .Net Framework 4.5
|
* .NET Framework 4.5
|
||||||
* .Net Standard 1.5
|
* .NET Standard 1.3
|
||||||
|
|
||||||
##RoadMap
|
##RoadMap
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user