public void TestGetClassDumpAttribute_NotInCache4()
        {
            var dumpAttribute = ClassMetadataResolver.GetClassDumpData(typeof(Test4));

            Assert.AreEqual(typeof(Test4Meta), dumpAttribute.Metadata);
            Assert.AreEqual(new DumpAttribute(false), dumpAttribute.DumpAttribute);
        }
        public void TestGetClassDumpAttribute_NotInCache3()
        {
            var dumpAttribute = ClassMetadataResolver.GetClassDumpData(typeof(Test3));

            Assert.AreEqual(typeof(Test3Meta), dumpAttribute.Metadata);
            Assert.AreEqual(DumpAttribute.Default, dumpAttribute.DumpAttribute);
        }
        public void TestGetClassDumpAttribute_InCache()
        {
            ClassMetadataRegistrar.RegisterMetadata();

            var dumpAttribute = ClassMetadataResolver.GetClassDumpData(typeof(Exception));

            Assert.AreSame(typeof(ExceptionDumpMetadata), dumpAttribute.Metadata);
            Assert.AreSame(DumpAttribute.Default, dumpAttribute.DumpAttribute);
        }
Exemple #4
0
 public DumpState GetBaseTypeDumpState()
 => new DumpState(
     _dumper,
     Instance,
     CurrentType.BaseType,
     ClassMetadataResolver.GetClassDumpData(CurrentType.BaseType),
     InstanceDumpAttribute,
     DumpScript,
     false);