Click or drag to resize

ValidatableViewModelBase Class

Represents a base class with an implemented validation
Inheritance Hierarchy

Namespace:  Cauldron.XAML.ViewModels
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax

The ValidatableViewModelBase type exposes the following members.

Constructors
  NameDescription
Public methodValidatableViewModelBase
Initializes a new instance of ValidatableViewModelBase
Public methodValidatableViewModelBase(Guid)
Initializes a new instance of ValidatableViewModelBase
Top
Properties
  NameDescription
Public propertyDispatcher
Gets the Dispatcher this IDispatcher is associated with.
(Inherited from ViewModelBase.)
Public propertyErrors
Gets or sets the error info strings
Public propertyHasErrors
Gets a value that indicates if the ViewModel has errors after validation
Public propertyId
Gets the unique Id of the view model
(Inherited from ViewModelBase.)
Public propertyIsDisposed
Gets a value indicating if the object has been disposed or not
(Inherited from DisposableBase.)
Public propertyIsLoading
Gets or sets a value that indicates if the viewmodel is loading
(Inherited from ViewModelBase.)
Public propertyIsValidating
Gets a value that indicates that the properties are currently being validated.
Public propertyMessageDialog
Gets the message dialog
(Inherited from ViewModelBase.)
Public propertyNavigator
Gets the window navigator
(Inherited from ViewModelBase.)
Top
Methods
  NameDescription
Protected methodAfterRaiseNotifyPropertyChanged
Occures after the event PropertyChanged has been invoked
(Inherited from ViewModelBase.)
Protected methodBeforeRaiseNotifyPropertyChanged
Occured before the PropertyChanged event is invoked.
(Overrides ViewModelBaseBeforeRaiseNotifyPropertyChanged(String).)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from DisposableBase.)
Protected methodDispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from DisposableBase.)
Protected methodFinalize
Destructors are used to destruct instances of classes.
(Inherited from DisposableBase.)
Public methodGetErrors
Gets the validation errors for a specified property or for the entire entity.
Protected methodOnDispose (Overrides ViewModelBaseOnDispose(Boolean).)
Public methodOnException
Centralized error handling
(Inherited from ViewModelBase.)
Protected methodOnIsLoadingChanged
Occures when the value of the IsLoading property has changed.
(Inherited from ViewModelBase.)
Protected methodOnIsValidatingChanged
Occures if the IsValidating property has changed its value
Protected methodOnValidation
Occures on validation
Public methodRaiseNotifyBehaviourInvoke
Invokes the BehaviourInvoke event
(Inherited from ViewModelBase.)
Public methodRaisePropertyChanged
Invokes the PropertyChanged event
(Inherited from ViewModelBase.)
Public methodValidateAsync
Starts a validation on all properties
Public methodValidateAsync(String)
Starts a validation on a property defined by name.
Public methodValidateAsync(PropertyInfo, String)
Starts a validation on a property defined by name.
Top
Events
  NameDescription
Public eventBehaviourInvoke
Occures if a behaviour should be invoked
(Inherited from ViewModelBase.)
Public eventDisposed
Occures if the object has been disposed
(Inherited from DisposableBase.)
Public eventErrorsChanged
Occures if the count of the errors has changed
Public eventIsLoadingChanged
Occures if the IsLoading property has changed.
(Inherited from ViewModelBase.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from ViewModelBase.)
Public eventValidating
Occures if a property is veing validated.
Top
Extension Methods
  NameDescription
Public Extension MethodCode exampleAs(Type)Overloaded.
Converts a type using the implicit or explicit operators. If both fails it will try to convert the value with ChangeType(Object, Type).
(Defined by ExtensionsConvertions.)
Public Extension MethodCode exampleAs(Type, Type)Overloaded.
Converts a type using the implicit or explicit operators. If both fails it will try to convert the value with ChangeType(Object, Type).
(Defined by ExtensionsConvertions.)
Public Extension MethodCode exampleAsTOverloaded.
Performs a cast between compatible reference types. If a convertion is not possible then null is returned. As a last resort it will use ChangeType(Object, Type).

Tries to use the implicit and explicit operators if exists when convertion with 'as' returns null.

(Defined by ExtensionsConvertions.)
Public Extension MethodCode exampleCreateTypeT
Creates a new Type that implements the properties of an interface defined by T and copies all value of anon to the new object.
(Defined by ExtensionsInterception.)
Public Extension MethodGetPropertyNonPublicValueT
Searches for the specified property, using the specified binding constraints and returns its value.

Default BindingFlags are Instance and NonPublic

(Defined by ExtensionsReflection.)
Public Extension MethodGetPropertyValue(String, BindingFlags)Overloaded.
Searches for the specified property, using the specified binding constraints and returns its value.
(Defined by ExtensionsReflection.)
Public Extension MethodGetPropertyValueT(String)Overloaded.
Searches for the specified property, using the specified binding constraints and returns its value.

Default BindingFlags are Instance and Public

(Defined by ExtensionsReflection.)
Public Extension MethodGetPropertyValueT(String, BindingFlags)Overloaded.
Searches for the specified property, using the specified binding constraints and returns its value.
(Defined by ExtensionsReflection.)
Public Extension MethodMapToT
Maps all properties and fields of an instance to another instance. The Clone() method is used to copy an instance if exist.

Mapping fails on jagged and multidimensional array. Classes without parameterless constructor will stay null.

(Defined by ExtensionsCloning.)
Public Extension MethodRun
Handles neccessary setting of the IsLoading flag if implemented and the error handling
(Defined by Extensions.)
Public Extension MethodRunAsync
Handles neccessary setting of the IsLoading flag and the error handling
(Defined by Extensions.)
Public Extension MethodRunDispatcherAsync
Runs the action asyncronously using the Dispatcher on the lowest priority. Handles neccessary setting of the IsLoading flag and the error handling.
(Defined by Extensions.)
Public Extension MethodToLong
Tries to convert a Object to an Int64. Returns MinValue if target cannot be parsed.
(Defined by ExtensionsConvertions.)
Public Extension MethodToStringEx(String)Overloaded.
Converts the value of this instance to its equivalent string representation, using the specified format.

The following custom formatter are already added: ByteSizeFormatter, MetricUnitFormatter

(Defined by Extensions.)
Public Extension MethodToStringEx(String, CultureInfo)Overloaded.
Converts the value of this instance to its equivalent string representation, using the specified format.

The following custom formatter are already added: ByteSizeFormatter, MetricUnitFormatter

(Defined by Extensions.)
Public Extension MethodTryDispose
Tries to performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This will dispose an object if it implements the IDisposable interface.

(Defined by Extensions.)
Top
See Also