StatePrinter
StatePrinter copied to clipboard
Weird output of data structure
curly style output of
public class TagsCollection
{
public Dictionary<string, List<string>> Pages = new Dictionary<string, List<string>>();
public void Add(string tag, string url)
{
List<string> urls;
if (!Pages.TryGetValue(tag, out urls))
Pages.Add(tag, urls = new List<string>());
urls.Add(url);
}
}
becomes
var expected = @"new TagsCollection()
{
Pages[""Design""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""SOLID""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[1] = ""BookReviews\Adaptive Code via CS.md""
Pages[""Single_Responsibility_Principle""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""Design_Pattern""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""Decorator""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""Wrapper""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""Cache""] = new List<String>()
Pages[0] = ""Articles\Design\MalleableCodeUsingDecorators.md""
Pages[""Book_Review""] = new List<String>()
Pages[0] = ""BookReviews\Adaptive Code via CS.md""
}";
this bug may very well have been solved in 3.0 - need to check