public bool IsDefaultValue(IBusinessObject obj, PropertyBase property)
        {
            var domainObject = ArgumentUtility.CheckNotNullAndType <IDomainObject> ("obj", obj);

            ArgumentUtility.CheckNotNull("property", property);

            if (domainObject.GetState() != StateType.New)
            {
                return(false);
            }

            var propertyDefinition = domainObject.ID.ClassDefinition.ResolveProperty(property.PropertyInfo);

            if (propertyDefinition != null)
            {
                var properties = new PropertyIndexer(domainObject);
                return(!properties[propertyDefinition.PropertyName].HasBeenTouched);
            }

            return(_innerDefaultValueStrategy.IsDefaultValue(obj, property));
        }
Ejemplo n.º 2
0
        public bool IsDefaultValue(IBusinessObject obj)
        {
            ArgumentUtility.CheckNotNull("obj", obj);

            return(_defaultValueStrategy.IsDefaultValue(obj, this));
        }