Recording complex objects in C#
How to record complex objects in C#
It is possible to control how a complex object would be serialized while being recorded by RevDeBug. It may be accomplished by attaching information about RevDeBug Display methods within the application. Each RevDeBug Display method should be parameterless, and it should return a string representation of complex object. There are no limitations for the contents of the returned string, although user should consider both space that might be required and real-time slot needed for processing and serialization. RevDebug Display method is executed each time an object is stored.
To attach RevDeBug Display method, user must create a new file with .rdbdisplay extension, that should be located in a .NET project. The easiest way to do this is by creating a new text file in a project, and then changing its name and extension. This file’s Build action must be set to AdditionalFiles.Each line within this file will should contain information about a single RevDeBug Display method. User must include type name with a full namespace path and name of a RevDeBug Display method that is separated with dash from type name: Starter.MainWindow-RdbString
RdbDisplay file
RdbDisplay content
where MainWindow is a name of the type, Starter. is full namespace path that leads to the type and RdbString is the name of an parameterless method that returns a string.MainWindow.xaml.cs
namespace Starter
public partial class MainWindow
public Brush RdbRedBrush;
public Brush RdbGrayBrush;
public string RdbString()
return quot;{RdbRedBrush.ToString()} - {RdbGrayBrush.ToString()}";
Copy link