c# - Roslyn: Why do many SymbolDisplay methods have equivalent instance counterparts on ISymbol? -
just curious, noticed there seem 2 ways of doing same thing when comes stringifying symbols in roslyn. can either do:
// symbol type isymbol var symboltext = symbol.todisplaystring();
or
var symboltext = symboldisplay.todisplaystring(symbol);
it's same story tominimaldisplaystring
, todisplayparts
, , tominimaldisplayparts
. why did roslyn team decide add both of these apis instead of making symboldisplay
static methods internal?
the symboldisplay class in csharp namespace. actual implementation formats symbol in c# display style. when call symbol.todisplaystring() getting symbol formatting in symbol's declaring language, may vb , not c#.
Comments
Post a Comment