Es scheint, dass die früheren Entwickler des aktuellen Projekts, an dem ich arbeite, beschlossen haben, einen funktionierenden, aber nicht handhabbaren Code zu erstellen.
Im gesamten Code finde ich mehrfach bedingte ternäre Ausdrücke. Es wird zu einem Kopfschmerz zu übersetzen und neu zu schreiben / Refactor sie sein.
Kennt jemand ein kostenloses Tool, Standalone oder als Add-in für VS 2008, das ternäre Ausdrücke zerlegen kann? Für CodeRush ist bei diesem Projekt kein Budget vorhanden. Ich werde weiterhin neu codieren, wenn nötig, aber ich versuche, ein wenig Hoffnung hier zu haben.
Hier ist ein Beispiel für dieses Problem:
sNoteType = objSelection.Items[1].Selected ?
objSelection.Items[0].Selected ?
objSelection.Items[3].Selected ?
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "BA " :
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LS " :
objSelection.Items[3].Selected ?
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "BA " :
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "FD " :
objSelection.Items[0].Selected ?
objSelection.Items[3].Selected ?
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "BA " :
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LS " :
objSelection.Items[3].Selected ?
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "BA " :
objSelection.Items[4].Selected ?
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "LT " :
objSelection.Items[5].Selected ?
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty + "EV " :
objSelection.Items[2].Selected ?
string.Empty + "OV " :
string.Empty;