public void ToXml(Object parent, System.Xml.XmlElement baseElem, String fieldName, int detailLevel)
 {
     System.Xml.XmlElement recordElem = VarValue.AppendChild(baseElem, "Structure");
     if (fieldName != null)
     {
         VarValue.AppendAttribute(recordElem, "debug.field", fieldName);
         fieldName = fieldName.ToLowerInvariant();
     }
     if (detailLevel > 0)
     {
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".MessageText"))
         {
             VarValue.AppendAttribute(recordElem, "MessageText", ssMessageText, detailLevel, TypeKind.Text);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "MessageText");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".MessageType"))
         {
             VarValue.AppendAttribute(recordElem, "MessageType", ssMessageType, detailLevel, TypeKind.EntityReference);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "MessageType");
         }
     }
     else
     {
         VarValue.AppendDeferredEvaluationElement(recordElem);
     }
 }
 public void ToXml(Object parent, System.Xml.XmlElement baseElem, String fieldName, int detailLevel)
 {
     System.Xml.XmlElement recordElem = VarValue.AppendChild(baseElem, "Entity");
     if (fieldName != null)
     {
         VarValue.AppendAttribute(recordElem, "debug.field", fieldName);
         fieldName = fieldName.ToLowerInvariant();
     }
     if (detailLevel > 0)
     {
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Id"))
         {
             VarValue.AppendAttribute(recordElem, "Id", ssId, detailLevel, TypeKind.Integer);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Id");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Label"))
         {
             VarValue.AppendAttribute(recordElem, "Label", ssLabel, detailLevel, TypeKind.Text);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Label");
         }
     }
     else
     {
         VarValue.AppendDeferredEvaluationElement(recordElem);
     }
 }
示例#3
0
 public void ToXml(Object parent, System.Xml.XmlElement baseElem, String fieldName, int detailLevel)
 {
     System.Xml.XmlElement recordElem = VarValue.AppendChild(baseElem, "Structure");
     if (fieldName != null)
     {
         VarValue.AppendAttribute(recordElem, "debug.field", fieldName);
         fieldName = fieldName.ToLowerInvariant();
     }
     if (detailLevel > 0)
     {
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Name"))
         {
             VarValue.AppendAttribute(recordElem, "Name", ssName, detailLevel, TypeKind.Text);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Name");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".JobTitle"))
         {
             VarValue.AppendAttribute(recordElem, "JobTitle", ssJobTitle, detailLevel, TypeKind.Text);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "JobTitle");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Phone"))
         {
             VarValue.AppendAttribute(recordElem, "Phone", ssPhone, detailLevel, TypeKind.PhoneNumber);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Phone");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Email"))
         {
             VarValue.AppendAttribute(recordElem, "Email", ssEmail, detailLevel, TypeKind.Email);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Email");
         }
     }
     else
     {
         VarValue.AppendDeferredEvaluationElement(recordElem);
     }
 }
示例#4
0
 public void ToXml(Object parent, System.Xml.XmlElement baseElem, String fieldName, int detailLevel)
 {
     System.Xml.XmlElement recordElem = VarValue.AppendChild(baseElem, "Structure");
     if (fieldName != null)
     {
         VarValue.AppendAttribute(recordElem, "debug.field", fieldName);
         fieldName = fieldName.ToLowerInvariant();
     }
     if (detailLevel > 0)
     {
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Number"))
         {
             VarValue.AppendAttribute(recordElem, "Number", ssNumber, detailLevel, TypeKind.Text);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Number");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".Index"))
         {
             VarValue.AppendAttribute(recordElem, "Index", ssIndex, detailLevel, TypeKind.Integer);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "Index");
         }
         if (!VarValue.FieldIsOptimized(parent, fieldName + ".IsCurrent"))
         {
             VarValue.AppendAttribute(recordElem, "IsCurrent", ssIsCurrent, detailLevel, TypeKind.Boolean);
         }
         else
         {
             VarValue.AppendOptimizedAttribute(recordElem, "IsCurrent");
         }
     }
     else
     {
         VarValue.AppendDeferredEvaluationElement(recordElem);
     }
 }