Opc.Ua.Com.Server.ComAeNamespaceMapper.GetAttributes C# (CSharp) Method

GetAttributes() public method

Gets the list of categories for the specified event types.
public GetAttributes ( uint categoryId ) : List
categoryId uint
return List
        public List<AeEventAttribute> GetAttributes(uint categoryId)
        {
            AeEventCategory category = null;

            if (!m_categories.TryGetValue(categoryId, out category))
            {
                return null;
            }

            List<AeEventAttribute> attributes = new List<AeEventAttribute>();

            AeEventCategory subType = category;

            while (subType != null)
            {
                for (int ii = 0; ii < subType.Attributes.Count; ii++)
                {
                    AeEventAttribute attribute = subType.Attributes[ii];

                    if (attribute.OverriddenDeclaration == null)
                    {
                        if (!attribute.Hidden)
                        {
                            attributes.Add(attribute);
                        }
                    }
                }

                AeEventCategory superType = null;

                if (!m_eventTypes.TryGetValue(subType.SuperTypeId, out superType))
                {
                    break;
                }

                subType = superType;
            }

            attributes.Sort(CompareAttributes);
            return attributes;
        }