using System;
using System.Collections.Generic;
namespace Umbraco.ModelsBuilder.Building
{
///
/// Represents a model property.
///
public class PropertyModel
{
///
/// Gets the alias of the property.
///
public string Alias;
///
/// Gets the name of the property.
///
public string Name;
///
/// Gets the description of the property.
///
public string Description;
///
/// Gets the clr name of the property.
///
/// This is just the local name eg "Price".
public string ClrName;
///
/// Gets the Model Clr type of the property values.
///
/// As indicated by the PublishedPropertyType, ie by the IPropertyValueConverter
/// if any, else object. May include some ModelType that will need to be mapped.
public Type ModelClrType;
///
/// Gets the CLR type name of the property values.
///
public string ClrTypeName;
///
/// Gets a value indicating whether this property should be excluded from generation.
///
public bool IsIgnored;
///
/// Gets the generation errors for the property.
///
/// This should be null, unless something prevents the property from being
/// generated, and then the value should explain what. This can be used to generate
/// commented out code eg in PureLive.
public List Errors;
///
/// Adds an error.
///
public void AddError(string error)
{
if (Errors == null) Errors = new List();
Errors.Add(error);
}
}
}