/// <summary> /// Print an objectgraph to a string. /// </summary> /// <param name="objectToPrint">What to print.</param> /// <param name="rootname">The name of the root as it is printed.</param> public string PrintObject(object objectToPrint, string rootname = null) { var introSpector = new IntroSpector(Configuration, harvestCache); var tokens = introSpector.PrintObject(objectToPrint, rootname); var formatter = Configuration.OutputFormatter; return(formatter.Print(tokens)); }
/// <summary> /// Print an object graph to a string. /// </summary> /// <param name="objectToPrint">What to print.</param> /// <param name="rootname">The name of the root as it is printed.</param> public string PrintObject(object objectToPrint, string rootname) { var introSpector = new IntroSpector(Configuration, harvestCache); var tokens = introSpector.PrintObject(objectToPrint, rootname); var formatter = Configuration.OutputFormatter; var result = formatter.Print(tokens); return result; }