/// <summary> /// Gets the tag collection. /// </summary> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkTagModelCollection GetTagCollection(XElement xmlData) { HLinkTagModelCollection t = new HLinkTagModelCollection(); var theERElement = from _ORElementEl in xmlData.Elements(ns + "tagref") select _ORElementEl; if (theERElement.Any()) { // load tag references foreach (XElement theLoadORElement in theERElement) { HLinkTagModel t2 = new HLinkTagModel { HLinkKey = GetAttribute(theLoadORElement.Attribute("hlink")), }; t.Add(t2); } } // Return sorted by the default text t.Sort(T => T.DeRef.GetDefaultText); return(t); }
/// <summary> /// Gets the tag collection. /// </summary> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkTagModelCollection GetTagCollection(XElement xmlData) { HLinkTagModelCollection t = new HLinkTagModelCollection { Title = "Tag Collection" }; var theERElement = from _ORElementEl in xmlData.Elements(ns + "tagref") select _ORElementEl; if (theERElement.Any()) { // load tag references foreach (XElement theLoadORElement in theERElement) { HLinkTagModel t2 = new HLinkTagModel { HLinkKey = GetHLinkKey(theLoadORElement), }; t.Add(t2); } } // Return sorted by the default text t.Sort(T => T.DeRef.ToString()); return(t); }