Ejemplo n.º 1
0
        private void EnsureEndTimestamp(Entry entry, XElement element)
        {
            if (entry.HasTimestamp && _boundary.Boundries.Count > 0)
                if (element.Attribute(AttribEnd) == null)
                    element.Add(new XAttribute(AttribEnd, entry.Timestamp.ToString(DateFormat)));

            if (entry.HasTimestamp)
                if (element.Parent != null && element.Parent.Attribute(AttribEnd) == null)
                    element.Parent.Add(new XAttribute(AttribEnd, entry.Timestamp.ToString(DateFormat)));
                else if (element.Parent != null && element.Parent.Attributes(AttribEnd).Any())
                    element.Parent.Attributes(AttribEnd).First().Value = entry.Timestamp.ToString(DateFormat);
        }
Ejemplo n.º 2
0
 private void EnsureEndTimestamp(Entry entry, XElement element)
 {
     if (entry.HasTimestamp && _boundary.Boundries.Count > 0 && element.Attribute("end") == null)
     {
         element.Add(new XAttribute("end", entry.Timestamp.ToString("yyyy-MM-ddThh:mm:ss")));
     }
     if (entry.HasTimestamp)
     {
         if (element.Parent != null && element.Parent.Attribute("end") == null)
         {
             element.Parent.Add(new XAttribute("end", entry.Timestamp.ToString("yyyy-MM-ddThh:mm:ss")));
             return;
         }
         if (element.Parent != null && element.Parent.Attributes("end").Any<XAttribute>())
         {
             element.Parent.Attributes("end").First<XAttribute>().Value = entry.Timestamp.ToString("yyyy-MM-ddThh:mm:ss");
         }
     }
 }
Ejemplo n.º 3
0
 private static void EnsureStartTimestamp(Entry entry, XElement element)
 {
     if (entry.HasTimestamp)
     {
         element.Add(new XAttribute(AttribStart, entry.Timestamp.ToString(DateFormat)));
         if (element.Parent != null && element.Parent.Attribute(AttribStart) == null)
             element.Parent.Add(new XAttribute(AttribStart, entry.Timestamp.ToString(DateFormat)));
     }
 }
Ejemplo n.º 4
0
 private static void EnsureStartTimestamp(Entry entry, XElement element)
 {
     if (entry.HasTimestamp)
     {
         element.Add(new XAttribute("start", entry.Timestamp.ToString("yyyy-MM-ddThh:mm:ss")));
         if (element.Parent != null && element.Parent.Attribute("start") == null)
         {
             element.Parent.Add(new XAttribute("start", entry.Timestamp.ToString("yyyy-MM-ddThh:mm:ss")));
         }
     }
 }