コード例 #1
0
        private static IEnumerable <VerificationResult> Verify(TestCase testCase)
        {
            EcmaModule module     = TestDataLoader.GetModuleForTestAssembly(testCase.ModuleName);
            var        typeHandle = (TypeDefinitionHandle)MetadataTokens.EntityHandle(testCase.MetadataToken);
            var        type       = (EcmaType)module.GetType(typeHandle);
            var        verifier   = new Verifier((ILVerifyTypeSystemContext)type.Context);

            return(verifier.Verify(module.PEReader, typeHandle));
        }
コード例 #2
0
        private static IEnumerable <VerificationResult> Verify(TestCase testCase)
        {
            EcmaModule module       = TestDataLoader.GetModuleForTestAssembly(testCase.ModuleName);
            var        methodHandle = (MethodDefinitionHandle)MetadataTokens.EntityHandle(testCase.MetadataToken);
            var        method       = (EcmaMethod)module.GetMethod(methodHandle);
            var        verifier     = new Verifier((ILVerifyTypeSystemContext)method.Context, new VerifierOptions()
            {
                IncludeMetadataTokensInErrorMessages = true
            });

            return(verifier.Verify(module.PEReader, methodHandle));
        }