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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -