public static string GetComments(ServiceObject owner, PropertyDefinitionBase propDef) { ExtendedPropertyDefinition exPropDef = propDef as ExtendedPropertyDefinition; if (exPropDef != null) { return(GetComments(KnownExtendedProperties.Instance().GetKnownExtendedPropertyInfo( exPropDef))); } return(string.Empty); }
public static string GetAlternateNames(PropertyDefinitionBase propDef) { ExtendedPropertyDefinition exPropDef = propDef as ExtendedPropertyDefinition; if (exPropDef != null) { return(GetAlternateNames(KnownExtendedProperties.Instance().GetKnownExtendedPropertyInfo( exPropDef))); } return(string.Empty); }
/// <summary> /// Get property information for a schema property or extended property /// using a ServiceObject and a PropertyDefinitionBase. /// </summary> /// <param name="owner">The ServiceObject whose owns the property to interpret.</param> /// <param name="propDef">Property definition used to get type and value information /// from.</param> public PropertyInterpretation(ServiceObject owner, PropertyDefinitionBase propDef) { Name = GetPropertyName(propDef); Value = GetPropertyValue(owner, propDef, out TypeName); SmartView = GetSmartView(owner, propDef); ExtendedPropertyDefinition exPropDef = propDef as ExtendedPropertyDefinition; if (exPropDef != null) { KnownExtendedPropertyInfo?propInfo = KnownExtendedProperties.Instance().GetKnownExtendedPropertyInfo( exPropDef); if (propInfo.HasValue) { AlternateNames = GetAlternateNames(propInfo.Value); Comments = GetComments(propInfo.Value); } } }