public Subnode GetObjectProperty(PropertyID propertyID)
        {
            PtypObjectRecord objRecord = GetObjectRecordProperty(propertyID);
            Subnode          subnode   = m_subnodeBTree.GetSubnode(objRecord.Nid);

            return(subnode);
        }
        public void SetObjectProperty(PropertyID propertyID, NodeID subnodeID, int size)
        {
            PtypObjectRecord objRecord = new PtypObjectRecord(subnodeID, (uint)size);

            byte[] propertyBytes = objRecord.GetBytes();

            SetExternalProperty(propertyID, PropertyTypeName.PtypObject, propertyBytes);
        }
        public PtypObjectRecord GetObjectRecordProperty(PropertyID propertyID)
        {
            PropertyContextRecord record = GetRecordByPropertyID(propertyID);

            if (record != null)
            {
                if (record.wPropType == PropertyTypeName.PtypObject)
                {
                    if (record.IsExternal)
                    {
                        if (record.IsHeapID)
                        {
                            byte[]           buffer    = this.GetHeapItem(record.HeapID);
                            PtypObjectRecord objRecord = new PtypObjectRecord(buffer);
                            return(objRecord);
                        }
                        else
                        {
                            throw new InvalidPropertyException("Unexpected object record");
                        }
                    }
                    else
                    {
                        // this should never happen
                        throw new InvalidPropertyException("Unexpected record data type found");
                    }
                }
                else
                {
                    throw new InvalidPropertyException("Unexpected PC data type found");
                }
            }
            else
            {
                return(null);
            }
        }