Last active
January 9, 2017 20:53
-
-
Save controlflow/17e1c71de33cbb9bb48936522680f389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override string Text | |
{ | |
get | |
{ | |
if ((myValue == ConstantExpressionValue.TRUE && | |
(ConditionalAndExpressionNavigator.GetByLeftOperand(myExpression) != null || | |
ConditionalAndExpressionNavigator.GetByRightOperand(myExpression) != null)) | |
|| | |
(myValue == ConstantExpressionValue.FALSE && | |
(ConditionalOrExpressionNavigator.GetByRightOperand(myExpression) != null || | |
ConditionalOrExpressionNavigator.GetByLeftOperand(myExpression) != null))) | |
{ | |
return "Remove expression"; | |
} | |
return string.Format("Replace expression with '{0}'", StringValue); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override string Text | |
{ | |
get | |
{ | |
switch (myValue) | |
{ | |
case ConstantExpressionValue.TRUE | |
when ConditionalAndExpressionNavigator.GetByLeftOperand(myExpression) != null | |
|| ConditionalAndExpressionNavigator.GetByRightOperand(myExpression) != null: | |
case ConstantExpressionValue.FALSE | |
when ConditionalOrExpressionNavigator.GetByRightOperand(myExpression) != null | |
|| ConditionalOrExpressionNavigator.GetByLeftOperand(myExpression) != null: | |
return "Remove expression"; | |
default: | |
return string.Format("Replace expression with '{0}'", StringValue); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment