TryGetPropertyGeneric<T> method
bool
TryGetPropertyGeneric<T>(
- PropertyDefinitionBase propertyDefinition,
- OutParam<
T> propertyValueOutParam
Implementation
bool TryGetPropertyGeneric<T>(PropertyDefinitionBase propertyDefinition,
OutParam<T> propertyValueOutParam) {
PropertyDefinition propDef = propertyDefinition as PropertyDefinition;
if (propDef != null) {
return this
.PropertyBag
.TryGetPropertyTypeGeneric<T>(propDef, propertyValueOutParam);
} else {
ExtendedPropertyDefinition extPropDef =
propertyDefinition as ExtendedPropertyDefinition;
if (extPropDef != null) {
return this
.TryGetExtendedProperty<T>(extPropDef, propertyValueOutParam);
} else {
// Other subclasses of PropertyDefinitionBase are not supported.
throw new NotSupportedException("""string.Format(
Strings.OperationNotSupportedForPropertyDefinitionType,
propertyDefinition.GetType().Name)""");
}
}
}