I have been looking for a solution, which let find the ternary operators like
true ? DoIt() : DoItNot();
with the roslyn analyzer library.
I came up with following solution, but this returns only the "standard" if-else-Expressions.
var ifStatement = tree.GetRoot().DescendantNodes().OfType<IfStatementSyntax>().First();
I did search for another
, but I didn´t find what I am looking for.
So I would be very pleased if someone has a solution for my problem.