I like the conditional operator, and use it a lot.
This example is a little confusing, because the nature of the operator is not clear from the layout and usage.
At the very least I like to make the choice and alternatives clear by using this formatting:
choice
? true-case
: false-case
But if we apply that to your code it reveals the lack of clarity in using the construct this way:
return
this.Script == null
? false
: parameter == "Step"
? true
: parameter == "Element"
? this.ElementSelectedInLibrary != null && this.SelectedStep != null
: parameter == "Choice"
? this.SelectedElement != null
: parameter == "Jump"
? this.SelectedStep != null
: parameter == "Conditional jump"
? false
: false.Throw("Unknown Add parameter {0} in XAML.".F(parameter));
This feels to me like we're trying to use the conditional operator like a switch statement, where a switch statement, or better yet a design pattern like the Command Pattern would be much clearer.