public virtual void SetProperty(string name, object value)
{
switch (name)
{
case "DisplayName":
this.DisplayName = (string)value;
break;
case "TrashDisabled":
this.TrashDisabled = (bool)value;
break;
case "Hidden":
this.Hidden = (bool)value;
break;
case ALLOWEDCHILDTYPES:
this.AllowedChildTypes = ((System.Collections.IEnumerable)value).Cast<ContentType>();
//this.ContentTypes = ((IEnumerable<Node>)value).Cast<ContentType>();
break;
case "BrowseApplication":
this.BrowseApplication = value as Node;
break;
case "EnableLifespan":
this.EnableLifespan = (bool)value;
break;
case "ValidFrom":
this.ValidFrom = value == null ? DateTime.MinValue : (DateTime)value;
break;
case "ValidTill":
this.ValidTill = value == null ? DateTime.MinValue : (DateTime)value;
break;
case "Workspace":
case "WorkspaceName":
case "WorkspacePath":
case "WorkspaceTitle":
case "Approvable":
case "Publishable":
case "Versions":
case "CheckedOutTo":
//do nothing, these props are readonly
break;
default:
base[name] = value;
break;
}
}