Пример #1
0
 public static bool IsBasic(XNode el) {
   Anot res = el.Annotation<Anot>(); if (res == null) return false;
   return res.isBasic;
 }
Пример #2
0
 /*public static string GetAnotName(XNode el) {
   Anot res = el.Annotation<Anot>();
   return res == null || string.IsNullOrEmpty(res.Name) ? null : res.Name;
 }
 public static void SetAnotName(XNode el, string name) {
   GetAnot(el).Name = name;
 }*/
 public static Anot GetAnot(XNode el) {
   Anot res = el.Annotation<Anot>();
   if (res == null) el.AddAnnotation(res = new Anot());
   return res;
 }