/// <summary>
 /// Parse the TypedPropertyValue structure.
 /// </summary>
 /// <param name="s">A stream containing the TypedPropertyValue structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.PropertyType = (PropertyDataType)ReadUshort();
     PropertyValue propertyValue = new PropertyValue();
     this.PropertyValue = propertyValue.ReadPropertyValue(this.PropertyType, s, countWide);
 }
 /// <summary>
 /// Parse the FlaggedPropertyValueWithType structure.
 /// </summary>
 /// <param name="s">A stream containing the FlaggedPropertyValueWithType structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.PropertyType = (PropertyDataType)ReadUshort();
     this.Flag = ReadByte();
     if (this.Flag == 0x00)
     {
         PropertyValue propertyValue = new PropertyValue();
         this.PropertyValue = propertyValue.ReadPropertyValue(this.PropertyType, s, countWide);
     }
     else if (this.Flag == 0x0A)
     {
         PropertyValue propertyValue = new PropertyValue();
         this.PropertyValue = propertyValue.ReadPropertyValue(PropertyDataType.PtypErrorCode, s, countWide);
     }
     else
     {
         this.PropertyValue = null;
     }
 }
 /// <summary>
 /// Parse the TaggedPropertyValue structure.
 /// </summary>
 /// <param name="s">A stream containing the TaggedPropertyValue structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.PropertyTag = new PropertyTag();
     this.PropertyTag.Parse(s);
     PropertyValue propertyValue = new PropertyValue();
     this.PropertyValue = propertyValue.ReadPropertyValue(this.PropertyTag.PropertyType, s, countWide);
 }
        /// <summary>
        /// Parse the AddressBookPropertyValue structure.
        /// </summary>
        /// <param name="s">An stream containing AddressBookPropertyValue structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            bool hasValue = (propertyDataType == PropertyDataType.PtypString) || (propertyDataType == PropertyDataType.PtypString8) ||
                            (propertyDataType == PropertyDataType.PtypBinary) || (propertyDataType == PropertyDataType.PtypMultipleInteger16) ||
                            (propertyDataType == PropertyDataType.PtypMultipleInteger32) || (propertyDataType == PropertyDataType.PtypMultipleFloating32) ||
                            (propertyDataType == PropertyDataType.PtypMultipleFloating64) || (propertyDataType == PropertyDataType.PtypMultipleCurrency) ||
                            (propertyDataType == PropertyDataType.PtypMultipleFloatingTime) || (propertyDataType == PropertyDataType.PtypMultipleInteger64) ||
                            (propertyDataType == PropertyDataType.PtypMultipleString) || (propertyDataType == PropertyDataType.PtypMultipleString8) ||
                            (propertyDataType == PropertyDataType.PtypMultipleTime) || (propertyDataType == PropertyDataType.PtypMultipleGuid) ||
                            (propertyDataType == PropertyDataType.PtypMultipleBinary);
            if (hasValue)
            {
                this.HasValue = ReadBoolean();
            }
            else
            {
                this.HasValue = null;
            }

            if ((HasValue == null) || ((HasValue != null) && (HasValue == true)))
            {

                PropertyValue propertyValue = new PropertyValue();
                this.PropertyValue = propertyValue.ReadPropertyValue(this.propertyDataType, s, this.countWide);
            }
        }