/// <summary>
 /// Parse the PtypMultipleBinary structure.
 /// </summary>
 /// <param name="s">A stream containing the PtypMultipleBinary structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     HelpMethod help = new HelpMethod();
     this.Count = help.ReadCount(this.countWide, s);
     this.undefinedCount = ReadUshort();
     List<PtypBinary> tempvalue = new List<PtypBinary>();
     for (int i = 0; i < this.Count.GetHashCode(); )
     {
         PtypBinary binary = new PtypBinary(CountWideEnum.twoBytes);
         binary.Parse(s);
         tempvalue.Add(binary);
         i = i + 2 + binary.Count.GetHashCode();
     }
     this.Value = tempvalue.ToArray();
 }
        /// <summary>
        /// The method to return the object of PropertyValue.
        /// </summary>
        /// <param name="dataType">The Property data type.</param>
        /// <param name="s">A stream containing the PropertyValue structure</param>
        /// <param name="ptypMultiCountSize">The Count wide size of ptypMutiple type.</param>
        /// <returns>The object of PropertyValue.</returns>
        public object ReadPropertyValue(PropertyDataType dataType, Stream s, CountWideEnum ptypMultiCountSize = CountWideEnum.twoBytes)
        {
            base.Parse(s);
            object propertyValue;
            switch (dataType)
            {
                case PropertyDataType.PtypInteger16:
                    {
                        PtypInteger16 tempPropertyValue = new PtypInteger16();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypInteger32:
                    {
                        PtypInteger32 tempPropertyValue = new PtypInteger32();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypFloating32:
                    {
                        PtypFloating32 tempPropertyValue = new PtypFloating32();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypFloating64:
                    {
                        PtypFloating64 tempPropertyValue = new PtypFloating64();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypCurrency:
                    {
                        PtypCurrency tempPropertyValue = new PtypCurrency();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypFloatingTime:
                    {
                        PtypFloatingTime tempPropertyValue = new PtypFloatingTime();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypErrorCode:
                    {
                        PtypErrorCode tempPropertyValue = new PtypErrorCode();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypBoolean:
                    {
                        PtypBoolean tempPropertyValue = new PtypBoolean();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypInteger64:
                    {
                        PtypInteger64 tempPropertyValue = new PtypInteger64();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypString:
                    {
                        PtypString tempPropertyValue = new PtypString();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypString8:
                    {
                        PtypString8 tempPropertyValue = new PtypString8();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypTime:
                    {
                        PtypTime tempPropertyValue = new PtypTime();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypGuid:
                    {
                        PtypGuid tempPropertyValue = new PtypGuid();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypServerId:
                    {
                        PtypServerId tempPropertyValue = new PtypServerId();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypRestriction:
                    {
                        PtypRestriction tempPropertyValue = new PtypRestriction();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypRuleAction:
                    {
                        PtypRuleAction tempPropertyValue = new PtypRuleAction();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypUnspecified:
                    {
                        PtypUnspecified tempPropertyValue = new PtypUnspecified();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypNull:
                    {
                        PtypNull tempPropertyValue = new PtypNull();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypBinary:
                    {
                        PtypBinary tempPropertyValue = new PtypBinary(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleInteger16:
                    {
                        PtypMultipleInteger16 tempPropertyValue = new PtypMultipleInteger16(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleInteger32:
                    {
                        PtypMultipleInteger32 tempPropertyValue = new PtypMultipleInteger32(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleFloating32:
                    {
                        PtypMultipleFloating32 tempPropertyValue = new PtypMultipleFloating32(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleFloating64:
                    {
                        PtypMultipleFloating64 tempPropertyValue = new PtypMultipleFloating64(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleCurrency:
                    {
                        PtypMultipleCurrency tempPropertyValue = new PtypMultipleCurrency(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleFloatingTime:
                    {
                        PtypMultipleFloatingTime tempPropertyValue = new PtypMultipleFloatingTime(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleInteger64:
                    {
                        PtypMultipleInteger64 tempPropertyValue = new PtypMultipleInteger64(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleString:
                    {
                        PtypMultipleString tempPropertyValue = new PtypMultipleString(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleString8:
                    {
                        PtypMultipleString8 tempPropertyValue = new PtypMultipleString8(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleTime:
                    {
                        PtypMultipleTime tempPropertyValue = new PtypMultipleTime(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleGuid:
                    {
                        PtypMultipleGuid tempPropertyValue = new PtypMultipleGuid(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypMultipleBinary:
                    {
                        PtypMultipleBinary tempPropertyValue = new PtypMultipleBinary(ptypMultiCountSize);
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;
                    }
                case PropertyDataType.PtypObject_Or_PtypEmbeddedTable:
                    {
                        PtypObject_Or_PtypEmbeddedTable tempPropertyValue = new PtypObject_Or_PtypEmbeddedTable();
                        tempPropertyValue.Parse(s);
                        propertyValue = tempPropertyValue;
                        break;

                    }
                default:
                    propertyValue = null;
                    break;
            }
            return propertyValue;
        }