TSF.UmlToolingFramework.Wrappers.EA.Model.getAttributeTagByGUID C# (CSharp) Метод

getAttributeTagByGUID() публичный Метод

public getAttributeTagByGUID ( string GUID ) : AttributeTag
GUID string
Результат AttributeTag
        public AttributeTag getAttributeTagByGUID(string GUID)
        {
            AttributeTag attributeTag = null;
            string getAttributes = @"select elementid from t_attributetag
                                    where ea_guid like '"+ GUID +"'";
            XmlDocument xmlElementIDs = this.SQLQuery(getAttributes);
            XmlNode elementNode = xmlElementIDs.SelectSingleNode(formatXPath("//elementid"));
            if (elementNode != null)
            {
            int objectID ;
            if (int.TryParse(elementNode.InnerText,out objectID))
            {
                Attribute owner = this.getAttributeByID(objectID);
                if(owner != null)
                {
                    foreach (TaggedValue taggedValue in owner.taggedValues)
                    {
                        if (taggedValue.ea_guid.Equals(GUID,StringComparison.InvariantCultureIgnoreCase))
                        {
                            attributeTag = taggedValue as AttributeTag;
                        }
                    }
                }
            }
            }
            return attributeTag;
        }