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;
}