Table of Contents

Class ValidatableViewModelBase

Namespace
Artemis.UI.Shared
Assembly
Artemis.UI.Shared.dll

Represents the base class for Artemis view models that are interested in validation and the activated event

public abstract class ValidatableViewModelBase : ReactiveValidationObject, IReactiveNotifyPropertyChanged<IReactiveObject>, IHandleObservableErrors, IReactiveObject, IEnableLogger, IValidatableViewModel, IDisposable, IActivatableViewModel
Inheritance
object
ReactiveObject
ReactiveValidationObject
ValidatableViewModelBase
Implements
IReactiveNotifyPropertyChanged<IReactiveObject>
IHandleObservableErrors
IReactiveObject
IEnableLogger
IValidatableViewModel
IActivatableViewModel
Derived
Inherited Members
ReactiveValidationObject.Dispose()
ReactiveValidationObject.HasErrors
ReactiveValidationObject.ValidationContext
ReactiveValidationObject.ErrorsChanged
ReactiveObject.SuppressChangeNotifications()
ReactiveObject.AreChangeNotificationsEnabled()
ReactiveObject.DelayChangeNotifications()
ReactiveObject.Changing
ReactiveObject.Changed
ReactiveObject.ThrownExceptions
ReactiveObject.PropertyChanging
ReactiveObject.PropertyChanged

Properties

Activator

public ViewModelActivator Activator { get; }

Property Value

ViewModelActivator

DisplayName

Gets or sets the display name of the view model

public string? DisplayName { get; set; }

Property Value

string

Methods

OnPropertyChanged(PropertyChangedEventArgs)

Raises the property changed event for the provided property.

protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)

Parameters

args PropertyChangedEventArgs

The event arguments containing the name of the property that changed.

OnPropertyChanging(PropertyChangingEventArgs)

Raises the property changing event for the provided property.

protected virtual void OnPropertyChanging(PropertyChangingEventArgs args)

Parameters

args PropertyChangingEventArgs

The event arguments containing the name of the property that is changing.

RaiseAndSetIfChanged<TRet>(ref TRet, TRet, string?)

RaiseAndSetIfChanged fully implements a Setter for a read-write property on a ReactiveObject, using CallerMemberName to raise the notification and the ref to the backing field to set the property.

[NotifyPropertyChangedInvocator]
public TRet RaiseAndSetIfChanged<TRet>(ref TRet backingField, TRet newValue, string? propertyName = null)

Parameters

backingField TRet

A Reference to the backing field for this property.

newValue TRet

The new value.

propertyName string

The name of the property, usually automatically provided through the CallerMemberName attribute.

Returns

TRet

The newly set value, normally discarded.

Type Parameters

TRet

The type of the return value.