Example #1
0
        private void TypeStartBlob(EAutoPreprocessCode processCode, ECacheState cacheState)
        {
            if (expectingIndex >= 0)
            {
                throw new Exception("Could not parse type, expecting FieldValue but got Blob");
            }

            depth++;
        }
Example #2
0
        private void ReadBlobHeader()
        {
            cacheState  = (ECacheState)source.ReadByte();
            processCode = (EAutoPreprocessCode)source.ReadByte();

            bytesAvailable = source.ReadInt32();
            spareAvailable = source.ReadInt32();

            if (!BlobUtil.IsValidCacheState(cacheState) || !BlobUtil.IsValidProcess(processCode))
            {
                throw new InvalidBlobException("Invalid blob header");
            }

            TakeBytes(BlobHeaderLength);
            UnpackBlobIfNeeded();
        }
Example #3
0
 public static bool IsValidCacheState(ECacheState cachestate)
 {
     return (cachestate >= ECacheState.eCacheEmpty && cachestate <= ECacheState.eCachePtrIsCopyOnWritePlaintextVersion);
 }
Example #4
0
 private void XmlStartBlob(EAutoPreprocessCode processCode, ECacheState cacheState)
 { 
     xmlOut.WriteStartElement("blob");
 }
Example #5
0
        private void ReadBlobHeader()
        {
            cacheState = (ECacheState)source.ReadByte();
            processCode = (EAutoPreprocessCode)source.ReadByte();

            bytesAvailable = source.ReadInt32();
            spareAvailable = source.ReadInt32();

            if (!BlobUtil.IsValidCacheState(cacheState) || !BlobUtil.IsValidProcess(processCode))
            {
                throw new InvalidBlobException("Invalid blob header");
            }

            TakeBytes(BlobHeaderLength);
            UnpackBlobIfNeeded();
        }
Example #6
0
 public static bool IsValidCacheState(ECacheState cachestate)
 {
     return(cachestate >= ECacheState.eCacheEmpty && cachestate <= ECacheState.eCachePtrIsCopyOnWritePlaintextVersion);
 }
Example #7
0
        public volatile ECacheState State; //{ get; private set; }

        /// <summary>
        /// Constructor
        /// </summary>
        public DataSourceCache()
        {
            State = ECacheState.Busy;
        }
Example #8
0
 private void XmlStartBlob(EAutoPreprocessCode processCode, ECacheState cacheState)
 {
     xmlOut.WriteStartElement("blob");
 }