Open.Core.PropertyRef.GetFromModel C# (CSharp) Method

GetFromModel() public static method

Retrieves the PropertyRef from an IModel.
public static GetFromModel ( object obj, string propertyName ) : PropertyRef
obj object The model object.
propertyName string The name of the property.
return PropertyRef
        public static PropertyRef GetFromModel(object obj, string propertyName)
        {
            IModel model = obj as IModel;
            return model == null ? null : model.GetPropertyRef(propertyName);
        }