// 3. Pass type and add custom fields, ignore unattributed properties private static void Three() { ConzapTools.PrintObjects(fruit) .CustomField("Custom field 1", f => "The default descriptiuon is " + f.Description) .Configure(ObjectPrinterOptions.IgnoreUnattributedProperties) .Print(); }
public void ListFruit() { ConzapTools.ClearScreen(); ConzapTools.PrintObjects(Fruits) .Configure(ObjectPrinterOptions.UseOnlyCustomFields) .ItemHeadingFactory(f => f.Type) .Print(); }
// 4. Pass type but ignore certain properties private static void Four() { ConzapTools.PrintObjects(fruit) .IgnoreProperty(f => f.Type) .IgnoreProperty(f => f.Description) .IgnoreProperty(f => f.Id) .IgnoreProperty(f => f.ContainsKernels) .Print(); }
// 2. Pass type and configure to ignore non attributed properties as well as ignore attributes private static void Two() { ConzapTools.PrintObjects(fruit) .Configure(ObjectPrinterOptions.IgnoreUnattributedProperties | ObjectPrinterOptions.IgnoreAttributes) .Print(); }
// 1. Pass type but no field information private static void ObjectPrinting1() { ConzapTools.ClearScreen(); ConzapTools.PrintObjects(fruit).Print(); }