private void CheckBusinessObjectCorrectType(IBusinessObject value)
{
if (value != null && !this.ClassDef.ClassType.IsInstanceOfType(value))
{
string errorMessage = string.Format
("You cannot set the Business Object to the '{0}' identified as '{1}' "
+ "since it is not of the appropriate type ('{2}') for this '{3}'", value.ClassDef.ClassNameFull,
value.ToString(), this.ClassDef.ClassNameFull, this.GetType().FullName);
throw new HabaneroDeveloperException(errorMessage, errorMessage);
}
}