Questions tagged [stateprinter]

StatePrinter is a .NET library for string representation of arbitrary objects

StatePrinter is a .NET library for string representation of arbitrary objects as well as tooling for using these in Unit Tests.

It is available under the Apache 2 license.

3 questions
2
votes
1 answer

C# Print TableEntity Properties, but ignore those properties with attribute [IgnoreProperty]

I am trying to print out an object that implements TableEntity class, without those that should be Ignored regarding the persistence. The approach I generally use to print out objects is to use the StatePrinter. public class MyEntity :…
Noah Ispas
  • 170
  • 2
  • 12
1
vote
2 answers

Using StatePrinter from VB rather than C# to implement ToString

I'm trying to follow the promising suggestion posted here to try StatePrinter as a shortcut to rolling my own ToString methods. I agree with the OP that it is a shame that VS still can't generate this method for me. I've got a fairly large project,…
Anne Gunn
  • 2,347
  • 1
  • 28
  • 42
1
vote
1 answer

Configure StatePrinter to only follow the declared types?

I'm using Stateprinter to print/compare my types. It works quite nicely, however, it does compare the actual type of each (sub) object instead of the declared type of the subobject. An example: class X { string Foo; int Bar; } interface IMyData…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337