private ConditionalExpression GetConditionalResourceExpression(IAttribute fromAttribute)
        {
            string targetResource = fromAttribute.GetTextValue();
            string nullCheck      = _syntaxProvider.CreateNullCheckExpression(targetResource);
            string uriExpression  = _syntaxProvider.CreateUriExpression(targetResource);

            return(new ConditionalExpression(nullCheck, uriExpression));
        }
 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();
     }
 }