Beispiel #1
0
 /// <summary>
 /// Append an element to this. The element will have the value of the EavValue. File and page references 
 /// can optionally be resolved.
 /// </summary>
 public static void AppendValue(this XElement element, XName name, EavValue value, ResourceReferenceExport resourceReferenceOption)
 {
     if (value == null)
     {
         element.Append(name, "[]");
     }
     else if (value.Value == null)
     {
         element.Append(name, "[]");
     }
     else if (resourceReferenceOption.IsResolve())
     {
         element.Append(name, value.ResolveValueReference());
     }
     else if (value.Value == string.Empty)
     {
         element.Append(name, "[\"\"]");
     }
     else
     {
         element.Append(name, value.Value);
     }
 }