Пример #1
0
        /// <summary>
        /// Read
        /// </summary>
        public virtual void Read(global::Microsoft.Bond.IProtocolReader reader)
        {
            if (!reader.HasCapability(global::Microsoft.Bond.Protocol.Tagged))
            {
                ReadUntagged(reader);
            }
            else
            {
                bool isPartialStruct;

                if (reader.HasCapability((global::Microsoft.Bond.Protocol)global::Microsoft.Bond.ProtocolInternal.CloneableBonded))
                {
                    reader = reader.Clone();
                }

                Read(reader, out isPartialStruct);

                if (isPartialStruct)
                {
                    global::Microsoft.Bond.ReadHelper.SkipPartialStruct(reader);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// ReadUntagged
        /// </summary>
        protected void ReadUntagged(global::Microsoft.Bond.IProtocolReader reader)
        {
            bool canOmitFields = reader.HasCapability(global::Microsoft.Bond.Protocol.CanOmitFields);

            Reset();


            reader.ReadStructBegin();

            if (!canOmitFields || !reader.ReadFieldOmitted())
            {
                this.blobValue = this.blobValue.FromData(global::Microsoft.Bond.ReadHelper.ReadBlob(reader, global::Microsoft.Bond.BondDataType.BT_LIST));
            }
            else
            {
                throw new BondException("Missing required field \"blobValue\", id=10");
            }
            reader.ReadStructEnd();
        }   // ~ReadUntagged()