public override object GetAttributeValue(
FilterContext context,
NodeId typeDefinitionId,
IList<QualifiedName> relativePath,
uint attributeId,
NumericRange indexRange)
{
if (context == null) throw new ArgumentNullException("context");
// check type definition.
if (!Server.TypeTree.IsTypeOf(this.TypeDefinitionId, typeDefinitionId))
{
return null;
}
// lookup extended properties.
if (relativePath == null || relativePath.Count == 1)
{
object value = null;
if (m_values.TryGetValue(relativePath[0], out value))
{
return value;
}
}
// read the attribute value.
DataValue dataValue = ReadAttributeValue(
context,
typeDefinitionId,
relativePath,
attributeId,
indexRange);
if (StatusCode.IsBad(dataValue.StatusCode))
{
return dataValue.StatusCode;
}
// return the value.
return dataValue.Value;
}
#endregion