예제 #1
0
        public bool BeginReadSize(out EndObject endObject, out int length)
        {
            length = ReadInt();

#if DEBUG
            if (length < -1)
            {
                throw new Exception("Something went wrong!");
            }
#endif

            if (length == -1)
            {
                endObject = default;
                return(false);
            }

            endObject = (EndObject)(StreamPosition + length);
            return(true);
        }
예제 #2
0
 public void EndObject(EndObject endObject)
 {
     SetPosition((long)endObject);
 }