Browse Source

通讯修改

master
pry 2 years ago
parent
commit
e93e06d2a0
2 changed files with 12 additions and 0 deletions
  1. +3
    -0
      BPASmartClient.S7Net/EntityClassResolution.cs
  2. +9
    -0
      TestDemo/TestDemo.csproj

+ 3
- 0
BPASmartClient.S7Net/EntityClassResolution.cs View File

@@ -55,6 +55,7 @@ namespace BPASmartClient.S7Net
numBytes += len;
break;
default:
if (type.IsClass) numBytes += 2.0;
numBytes = GetClassSize(Activator.CreateInstance(type), numBytes, isInnerProperty: true);
break;
}
@@ -218,6 +219,7 @@ namespace BPASmartClient.S7Net
break;
default:
{
if (propertyType.IsClass) numBytes += 2;
object obj2 = Activator.CreateInstance(propertyType);
numBytes = FromBytes(obj2, bytes, numBytes);
obj = obj2;
@@ -335,6 +337,7 @@ namespace BPASmartClient.S7Net
}
break;
default:
if (propertyValue.GetType().IsClass) numBytes += 2;
numBytes = ToBytes(propertyValue, bytes, numBytes);
break;
}


+ 9
- 0
TestDemo/TestDemo.csproj View File

@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Condition=" '$(EAZFUSCATOR_NET_HOME)' != '' and Exists('$(EAZFUSCATOR_NET_HOME)\Integration\MSBuild\Eazfuscator.NET.targets') " Project="$(EAZFUSCATOR_NET_HOME)\Integration\MSBuild\Eazfuscator.NET.targets" />

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
@@ -8,6 +10,13 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
<!-- Eazfuscator.NET is integrated with this project at MSBuild level: https://www.gapotchenko.com/eazfuscator.net/kb/100036 -->
<EazfuscatorIntegration>MSBuild</EazfuscatorIntegration>
<EazfuscatorActiveConfiguration>Release</EazfuscatorActiveConfiguration>
<EazfuscatorCompatibilityVersion>2021.4</EazfuscatorCompatibilityVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BPASmartClient.AGV\BPASmartClient.AGV.csproj" />
<ProjectReference Include="..\BPASmartClient.Helper\BPASmartClient.Helper.csproj" />


Loading…
Cancel
Save