Sdl.Web.Common/Models/ModelTypeRegistry.cs
/// <summary>
/// Gets the semantic property names for a given Model Type and property name.
/// </summary>
/// <param name="modelType">The Model Type.</param>
/// <param name="propertyName">The property name.</param>
/// <returns>The semantic property names or <c>null</c> if no semantic property names have been registered for the given property.</returns>
Gets the semantic property names for a given Model Type and property name.
Gets the semantic property names for a given Model Type and property name .
public static string[] GetSemanticPropertyNames(Type modelType, string propertyName)
        {
            SemanticInfo semanticInfo = GetSemanticInfo(modelType);
            IList<string> semanticPropertyNames;
            if (semanticInfo.SemanticProperties.TryGetValue(propertyName, out semanticPropertyNames))
            {
                return semanticPropertyNames.ToArray();
            }
            return null;
        }
public static string [ ] GetSemanticPropertyNames ( Type modelType , string propertyName ) { SemanticInfo semanticInfo = GetSemanticInfo ( modelType ) ; IList < string > semanticPropertyNames ; if ( semanticInfo . SemanticProperties . TryGetValue ( propertyName , out semanticPropertyNames ) ) { return semanticPropertyNames . ToArray ( ) ; } return null ; }
Gets the semantic property names for a given Model Type and property name.
Gets the semantic property names for a given Model Type and property name .
// No Tracer here to reduce trace noise.
The semantic property names or null
The semantic property names or null
modelType
Type
The Model Type.
The Model Type .
propertyName
string
The property name.
The property name .