Ejemplo n.º 1
0
        public static void EnsureAnnotation(this XElement element)
        {
            var sfa = element.Annotation <XmlFileAnnotation>();

            if (sfa == null)
            {
                sfa = new XmlFileAnnotation();
                element.AddAnnotation(sfa);
            }
        }
Ejemplo n.º 2
0
        public static void SetTextRange(this XElement element, ElementTextRange textRange)
        {
            var sfa = element.Annotation <XmlFileAnnotation>();

            if (sfa == null)
            {
                sfa = new XmlFileAnnotation();
                element.AddAnnotation(sfa);
            }
            sfa.TextRange = textRange;
        }
Ejemplo n.º 3
0
 public static void EnsureAnnotation(this XElement element)
 {
     var sfa = element.Annotation<XmlFileAnnotation>();
     if (sfa == null)
     {
         sfa = new XmlFileAnnotation();
         element.AddAnnotation(sfa);
     }
 }
Ejemplo n.º 4
0
 public static void SetTextRange(this XElement element, ElementTextRange textRange)
 {
     var sfa = element.Annotation<XmlFileAnnotation>();
     if (sfa == null)
     {
         sfa = new XmlFileAnnotation();
         element.AddAnnotation(sfa);
     }
     sfa.TextRange = textRange;
 }