public void Do(IElement element) { if (element.HasAttribute("for")) { IAttribute attribute = element.GetAttribute("for"); IConditionalExpressionNodeWrapper codeExpressionNode = element.AddConditionalExpressionNode(); string conditional = _syntaxProvider.CreateNullCheckExpression(attribute.GetTextValue().Split('.').First()); codeExpressionNode.SetExpressionBody(new ConditionalExpression(conditional, attribute.GetTextValue())); element.ClearInnerText(); } }
public void Do(IElement element) { if(element.HasAttribute("for")) { IAttribute attribute = element.GetAttribute("for"); IConditionalExpressionNodeWrapper codeExpressionNode = element.AddConditionalExpressionNode(); string conditional = _syntaxProvider.CreateNullCheckExpression(attribute.GetTextValue().Split('.').First()); codeExpressionNode.SetExpressionBody(new ConditionalExpression(conditional, attribute.GetTextValue())); element.ClearInnerText(); } }