예제 #1
0
        public static void EnsureAnnotation(this XElement element)
        {
            var sfa = element.Annotation <XmlFileAnnotation>();

            if (sfa == null)
            {
                sfa = new XmlFileAnnotation();
                element.AddAnnotation(sfa);
            }
        }
예제 #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;
        }
예제 #3
0
 public static void EnsureAnnotation(this XElement element)
 {
     var sfa = element.Annotation<XmlFileAnnotation>();
     if (sfa == null)
     {
         sfa = new XmlFileAnnotation();
         element.AddAnnotation(sfa);
     }
 }
예제 #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;
 }