TryGetExtendedProperty<T> method

bool TryGetExtendedProperty<T>(
  1. ExtendedPropertyDefinition propertyDefinition,
  2. OutParam<T> propertyValueOutParam
)
Try to get the value of a specified extended property in this instance. The property definition. The property value.

Implementation

bool TryGetExtendedProperty<T>(ExtendedPropertyDefinition propertyDefinition,
    OutParam<T> propertyValueOutParam) {
  ExtendedPropertyCollection? propertyCollection =
      this.GetExtendedProperties();

  if ((propertyCollection != null) &&
      propertyCollection.TryGetValue<T>(
          propertyDefinition, propertyValueOutParam)) {
    return true;
  } else {
    propertyValueOutParam.param = null;
    return false;
  }
}