|
|
@@ -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; |
|
|
|
} |
|
|
|