public static bool IsBasic(XNode el) { Anot res = el.Annotation<Anot>(); if (res == null) return false; return res.isBasic; }
/*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; }