Exemple #1
0
 /// <inheritdoc />
 public override byte[] GetBytes()
 {
     byte[] PropertyValue = new byte[ValueSize];
     Buffer.BlockCopy(BitConverter.GetBytes(ValueSize), 0, PropertyValue, 0, 4);
     Buffer.BlockCopy(BitConverter.GetBytes(ID), 0, PropertyValue, 4, 4);
     Buffer.BlockCopy(TypedPropertyValue.GetBytes(), 0, PropertyValue, 9, TypedPropertyValue.GetBytes().Length);
     return(PropertyValue);
 }
Exemple #2
0
 /// <inheritdoc />
 public override byte[] GetBytes()
 {
     byte[] PropertyValue = new byte[ValueSize];
     Buffer.BlockCopy(BitConverter.GetBytes(ValueSize), 0, PropertyValue, 0, 4);
     Buffer.BlockCopy(BitConverter.GetBytes(NameSize), 0, PropertyValue, 4, 4);
     Buffer.BlockCopy(Encoding.Unicode.GetBytes(Name), 0, PropertyValue, 9, 4);
     Buffer.BlockCopy(TypedPropertyValue.GetBytes(), 0, PropertyValue, 9 + (int)NameSize, TypedPropertyValue.GetBytes().Length);
     return(PropertyValue);
 }