Opc.Ua.Com.Server.ComDaBrowseCache.GetAvailableProperties C# (CSharp) Method

GetAvailableProperties() public method

Gets the available properties for the specified item.
public GetAvailableProperties ( Session session, string itemId ) : IList
session Opc.Ua.Client.Session The session.
itemId string The item id.
return IList
        public IList<DaProperty> GetAvailableProperties(Session session, string itemId)
        {
            // no properties for the root.
            if (String.IsNullOrEmpty(itemId))
            {
                return null;
            }

            // find the element.
            BrowseElement element = Lookup(session, itemId);

            if (element == null)
            {
                return null;
            }

            // check which supported properties are available for the element.
            List<DaProperty> availableProperties = new List<DaProperty>();

            for (int ii = 0; ii < s_SupportedProperties.Length; ii++)
            {
                DaValue value = GetPropertyValue(element, s_SupportedProperties[ii].PropertyId);

                if (value != null && value.Error != ResultIds.E_INVALID_PID)
                {
                    availableProperties.Add(s_SupportedProperties[ii]);
                }
            }

            // return the list.
            return availableProperties;
        }