Somewhere in the C ++ era, I created a library that included a string representation of the history of computing. Having a mathematical expression like:
TScalar Compute(TScalar a, TScalar b, TScalar c)
{
return ( a + b ) * c;
}
I could display this string representation:
r = Compute(VerbalScalar("a", 1), VerbalScalar("b", 2), VerbalScalar("c", 3));
Assert.AreEqual(9, r.Value);
Assert.AreEqual("(a+b)*c==(1+2)*3", r.History );
Overloading the C ++ operator allows replacing a simple type with a complex, self-tuning object with an internal tree view of everything that happens with the objects.
Now I would like to have the same opportunity for NET strings, but instead of variable names, I would like to see a stack trace of all the places in the code that affected the string.
And I want it to work with existing code and existing compiled assemblies.
I also want all this to connect to the visual studio debugger, so I could set a breakpoint and see everything that happened with the string.
?
, , , , .