private void ValidateRightSide() { if (Operator == null) { return; } if (PredicateType == ProfileRightSideType.Dynamic) { if (RightPath == null || !RightPath.IsValid) { return; } Type rightSideType = RightPath.GetPropertyType() !; if (!Operator.SupportsType(rightSideType, ConditionParameterSide.Right)) { UpdateRightSideDynamic(null); } } else { if (RightStaticValue == null) { return; } if (!Operator.SupportsType(RightStaticValue.GetType(), ConditionParameterSide.Right)) { UpdateRightSideStatic(null); } } }
private void ValidateRightSide() { Type?leftType = LeftPath?.GetPropertyType(); if (PredicateType == ProfileRightSideType.Dynamic) { if (RightPath == null || !RightPath.IsValid) { return; } Type rightSideType = RightPath.GetPropertyType() !; if (leftType != null && !leftType.IsCastableFrom(rightSideType)) { UpdateRightSideDynamic(null); } } else { if (RightStaticValue != null && (leftType == null || leftType.IsCastableFrom(RightStaticValue.GetType()))) { UpdateRightSideStatic(RightStaticValue); } else { UpdateRightSideStatic(null); } } }