/// <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); }
/// <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); }
/// <inheritdoc /> public override String ToString() { StringBuilder builder = new StringBuilder(); builder.Append(base.ToString()); builder.AppendFormat("ValueSize: {0} (0x{0:X})", ValueSize); builder.AppendLine(); builder.AppendFormat("ID: 0x{0:X}", ID); builder.AppendLine(); builder.Append(TypedPropertyValue.ToString()); return(builder.ToString()); }
/// <summary> /// Constructor /// </summary> /// <param name="ID">An unsigned integer that specifies the identity of the property.</param> /// <param name="TypedPropertyValue">A TypedPropertyValue structure</param> public IntegerName(UInt32 ID, TypedPropertyValue TypedPropertyValue) : base() { this.ID = ID; this.TypedPropertyValue = TypedPropertyValue; }
/// <summary> /// /// </summary> /// <param name="Name">A null-terminated Unicode string that specifies the identity of the property</param> /// <param name="TypedPropertyValue">A TypedPropertyValue structure</param> public StringName(String Name, TypedPropertyValue TypedPropertyValue) : base() { this.Name = Name; this.TypedPropertyValue = TypedPropertyValue; }