Class ViewModelCommon.SetValueOptions
Configuration objectect to configure the behavior of the property set methods.
Inherited Members
Namespace: BionicCode.Utilities.Net
Assembly: BionicCode.Utilities.Net.Common.dll
Syntax
public class SetValueOptions
Constructors
| Improve this Doc View SourceSetValueOptions(Boolean, Boolean, Boolean)
Declaration
public SetValueOptions(bool isRejectInvalidValueEnabled, bool isThrowExceptionOnValidationErrorEnable, bool isRejectEqualValuesEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | isRejectInvalidValueEnabled | Controls how the invalid property value is stored. Use this to ensure that the view model in a valid state. See IsRejectInvalidValueEnabled. |
| Boolean | isThrowExceptionOnValidationErrorEnable | Controls if throwing an ArgumentException on a failed validation is enabled. See IsThrowExceptionOnValidationErrorEnabled. |
| Boolean | isRejectEqualValuesEnabled | Controls if the equality check before setting the value is enabled. See IsRejectEqualValuesEnabled. |
Properties
| Improve this Doc View SourceDefault
Gets the default behavior for the property set methods.
By default the configuration sets IsRejectEqualValuesEnabled to true, IsThrowExceptionOnValidationErrorEnabled to false and IsRejectInvalidValueEnabled to false.
Declaration
public static ViewModelCommon.SetValueOptions Default { get; }
Property Value
| Type | Description |
|---|---|
| ViewModelCommon.SetValueOptions | An instance configured with the default values. |
IsRejectEqualValuesEnabled
Gets if the equality check before setting the value is enabled.
Declaration
public bool IsRejectEqualValuesEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | If |
IsRejectInvalidValueEnabled
Gets how the invalid property value is stored. Use this to ensure that the view model in a valid state.
Declaration
public bool IsRejectInvalidValueEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | If |
IsThrowExceptionOnValidationErrorEnabled
Gets if throwing an ArgumentException on a failed validation is enabled.
Use this when ValidatesOnExceptions on a Binding is set to true
Declaration
public bool IsThrowExceptionOnValidationErrorEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|