コード例 #1
0
ファイル: MdBinaryReaderGen.cs プロジェクト: wffy/corert
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ScopeDefinitionHandleCollection values)
        {
            values = new ScopeDefinitionHandleCollection(reader, offset);
            uint count;

            offset = reader.DecodeUnsigned(offset, out count);
            for (uint i = 0; i < count; ++i)
            {
                offset = reader.SkipInteger(offset);
            }
            return(offset);
        } // Read
コード例 #2
0
        public static ScopeDefinitionHandle Single(this ScopeDefinitionHandleCollection collection)
        {
            Debug.Assert(collection.Count == 1);
            var  enumerator = collection.GetEnumerator();
            bool hasNext    = enumerator.MoveNext();

            Debug.Assert(hasNext);
            var result = enumerator.Current;

            Debug.Assert(!enumerator.MoveNext());
            return(result);
        }
コード例 #3
0
ファイル: MdBinaryReaderGen.cs プロジェクト: tijoytom/corert
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ScopeDefinitionHandleCollection values)
        {
            values = new ScopeDefinitionHandleCollection(reader, offset);
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            for (uint i = 0; i < count; ++i)
            {
                offset = reader.SkipInteger(offset);
            }
            return offset;
        } // Read