@@ -55,6 +55,7 @@ namespace BPASmartClient.S7Net | |||||
numBytes += len; | numBytes += len; | ||||
break; | break; | ||||
default: | default: | ||||
if (type.IsClass) numBytes += 2.0; | |||||
numBytes = GetClassSize(Activator.CreateInstance(type), numBytes, isInnerProperty: true); | numBytes = GetClassSize(Activator.CreateInstance(type), numBytes, isInnerProperty: true); | ||||
break; | break; | ||||
} | } | ||||
@@ -218,6 +219,7 @@ namespace BPASmartClient.S7Net | |||||
break; | break; | ||||
default: | default: | ||||
{ | { | ||||
if (propertyType.IsClass) numBytes += 2; | |||||
object obj2 = Activator.CreateInstance(propertyType); | object obj2 = Activator.CreateInstance(propertyType); | ||||
numBytes = FromBytes(obj2, bytes, numBytes); | numBytes = FromBytes(obj2, bytes, numBytes); | ||||
obj = obj2; | obj = obj2; | ||||
@@ -335,6 +337,7 @@ namespace BPASmartClient.S7Net | |||||
} | } | ||||
break; | break; | ||||
default: | default: | ||||
if (propertyValue.GetType().IsClass) numBytes += 2; | |||||
numBytes = ToBytes(propertyValue, bytes, numBytes); | numBytes = ToBytes(propertyValue, bytes, numBytes); | ||||
break; | break; | ||||
} | } | ||||
@@ -1,5 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <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> | <PropertyGroup> | ||||
<OutputType>WinExe</OutputType> | <OutputType>WinExe</OutputType> | ||||
<TargetFramework>net6.0-windows</TargetFramework> | <TargetFramework>net6.0-windows</TargetFramework> | ||||
@@ -8,6 +10,13 @@ | |||||
<ImplicitUsings>enable</ImplicitUsings> | <ImplicitUsings>enable</ImplicitUsings> | ||||
</PropertyGroup> | </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> | <ItemGroup> | ||||
<ProjectReference Include="..\BPASmartClient.AGV\BPASmartClient.AGV.csproj" /> | <ProjectReference Include="..\BPASmartClient.AGV\BPASmartClient.AGV.csproj" /> | ||||
<ProjectReference Include="..\BPASmartClient.Helper\BPASmartClient.Helper.csproj" /> | <ProjectReference Include="..\BPASmartClient.Helper\BPASmartClient.Helper.csproj" /> | ||||