/// <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 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 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 PropertyRow structure. /// </summary> /// <param name="s">A stream containing the PropertyRow structure</param> public override void Parse(Stream s) { base.Parse(s); this.Flag = ReadByte(); List<object> tempPropArray = new List<object>(); foreach (PropertyTag tempPropTag in PropTags) { object rowPropValue = null; if (this.Flag == 0x00) { if (tempPropTag.PropertyType != PropertyDataType.PtypUnspecified) { PropertyValue propValue = new PropertyValue(tempPropTag.PropertyType); propValue.Parse(s); rowPropValue = propValue; } else { TypedPropertyValue typePropValue = new TypedPropertyValue(); typePropValue.Parse(s); rowPropValue = typePropValue; } } else if (Flag == 0x01) { if (tempPropTag.PropertyType != PropertyDataType.PtypUnspecified) { FlaggedPropertyValue flagPropValue = new FlaggedPropertyValue(tempPropTag.PropertyType); flagPropValue.Parse(s); rowPropValue = flagPropValue; } else { FlaggedPropertyValueWithType flagPropValue = new FlaggedPropertyValueWithType(); flagPropValue.Parse(s); rowPropValue = flagPropValue; } } tempPropArray.Add(rowPropValue); } this.ValueArray = tempPropArray.ToArray(); }
/// <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); } }