Exemplo n.º 1
0
        public void ExcludePropertyByType()
        {
            var config = new PrintingConfig <Person>();

            config.Exclude <int>();

            var printed = config.PrintToString(person);

            AssertPrinting(printed, new[] { "Name", "SleptToday" }, new[] { "Age", "Id" });
        }
Exemplo n.º 2
0
        public void ExcludePropertyByName()
        {
            var config = new PrintingConfig <Person>();

            config.Exclude(x => x.Age);

            var printed = config.PrintToString(person);

            AssertPrinting(printed, new[] { "Id" }, new[] { "Age" });
        }