Inheritance: CallingConventionSignature, IHasTypeSignature
Exemplo n.º 1
0
        public MemberSignature ImportMemberSignature(MemberSignature signature)
        {
            var fieldSignature = signature as FieldSignature;
            if (fieldSignature != null)
                return ImportFieldSignature(fieldSignature);

            var methodSignature = signature as MethodSignature;
            if (methodSignature != null)
                return ImportMethodSignature(methodSignature);

            throw new NotSupportedException();
        }
Exemplo n.º 2
0
        private static void VerifyMatching(MemberSignature original, MemberSignature expected, params MemberSignature[] fails)
        {
            Assert.IsTrue(_comparer.MatchMemberSignatures(original, expected), "The original signature did not match the expected.");
            Assert.IsTrue(_comparer.MatchMemberSignatures(expected, original), "The expected signature did not match the original.");

            foreach (var fail in fails)
            {
                Assert.IsFalse(_comparer.MatchMemberSignatures(original, fail), original + " matched " + fail);
                Assert.IsFalse(_comparer.MatchMemberSignatures(fail, original), fail + " matched " + original);
            }
        }