Table of Contents

Method SetPropertyAndValidate

Namespace
Innova.Data.Entity
Assembly
Innova.Data.dll

SetPropertyAndValidate<T>(ref T, T, Action, string)

Sets the property value and performs validation.

protected virtual bool SetPropertyAndValidate<T>(ref T storage, T value, Action onChanged, string propertyName = null)

Parameters

storage T

The reference to the property storage.

value T

The new value to set.

onChanged Action

The action to be executed when the property value changes.

propertyName string

The name of the property.

Returns

bool

True if the property value was changed; otherwise, false.

Type Parameters

T

The type of the property.

SetPropertyAndValidate<T>(ref T, T, string)

Sets the property value and performs validation.

protected virtual bool SetPropertyAndValidate<T>(ref T storage, T value, string propertyName = null)

Parameters

storage T

The reference to the property storage.

value T

The new value to set.

propertyName string

The name of the property.

Returns

bool

True if the property value was changed; otherwise, false.

Type Parameters

T

The type of the property.