public unsafe void GetSigFromToken()
        {
            var provider = new SymReaderMetadataProvider1();
            var adapter  = new SymReaderMetadataAdapter(provider);

            var buffer = new char[15];

            for (int i = 0; i < buffer.Length; i++)
            {
                buffer[i] = 'x';
            }

            int   actualLength;
            byte *signature;

            Assert.Equal(HResult.S_OK, adapter.GetSigFromToken(1, &signature, &actualLength));
            Assert.True(signature == SymReaderMetadataProvider1.SignaturePtr);
            Assert.Equal(2, actualLength);
        }
        public unsafe void GetTypeRefProps()
        {
            var provider = new SymReaderMetadataProvider1();
            var adapter  = new SymReaderMetadataAdapter(provider);

            var buffer = new char[15];

            for (int i = 0; i < buffer.Length; i++)
            {
                buffer[i] = 'x';
            }

            fixed(char *bufferPtr = buffer)
            {
                int actualLength;

                Assert.Equal(HResult.S_OK, adapter.GetTypeRefProps(1, null, bufferPtr + 2, 4, &actualLength));
                AssertEx.Equal(new char[] { 'x', 'x', 'T', 'R', 'N', '\0', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x' }, buffer);
                Assert.Equal(3, actualLength);
            }
        }
        public unsafe void GetTypeDefProps()
        {
            var provider = new SymReaderMetadataProvider1();
            var adapter  = new SymReaderMetadataAdapter(provider);

            var buffer = new char[15];

            for (int i = 0; i < buffer.Length; i++)
            {
                buffer[i] = 'x';
            }

            fixed(char *bufferPtr = buffer)
            {
                int            actualLength;
                TypeAttributes attributes;

                Assert.Equal(HResult.S_OK, adapter.GetTypeDefProps(1, bufferPtr + 2, 4, &actualLength, &attributes, null));
                AssertEx.Equal(new char[] { 'x', 'x', 'T', 'D', 'N', '\0', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x' }, buffer);
                Assert.Equal(3, actualLength);
                Assert.Equal(TypeAttributes.BeforeFieldInit, attributes);
            }
        }