/// <summary> /// Sets the property's value without performing an exact type check on the given value. The value must still be asssignable to /// <see cref="PropertyAccessorData.PropertyType"/>, though. /// </summary> /// <param name="value">The value to be set. For simple value properties, /// this is the value to be set. For related objects, this is the related object. For related object collections, /// this is an <see cref="ObjectList{T}"/>, where "T" is the related objects' type.</param> /// <exception cref="InvalidTypeException"> /// The given <paramref name="value"/> is not assignable to the property because of its type. /// </exception> /// <exception cref="InvalidOperationException">The property is a related object collection; such properties cannot be set.</exception> /// <exception cref="ClientTransactionsDifferException">The <see cref="DomainObject"/> cannot be used in the current <see cref="DomainObjects.ClientTransaction"/>.</exception> /// <exception cref="ObjectInvalidException">The object is invalid in the associated <see cref="ClientTransaction"/>.</exception> public void SetValueWithoutTypeCheck(object value) { CheckTransactionalStatus(ClientTransaction); PropertyData.GetStrategy().SetValueWithoutTypeCheck(this, ClientTransaction, value); }
/// <summary> /// Gets the property's original value without performing a type check. /// </summary> /// <returns>The original value of the encapsulated property in the current transaction.</returns> /// <exception cref="ClientTransactionsDifferException">The <see cref="DomainObject"/> cannot be used in the current <see cref="DomainObjects.ClientTransaction"/>.</exception> /// <exception cref="ObjectInvalidException">The object is invalid in the associated <see cref="ClientTransaction"/>.</exception> public object GetOriginalValueWithoutTypeCheck() { CheckTransactionalStatus(ClientTransaction); return(PropertyData.GetStrategy().GetOriginalValueWithoutTypeCheck(this, ClientTransaction)); }