Show / Hide Table of Contents

Class EntityViewModel<T>

Base class for a ViewModelBase whose backing fields are part of an entity model.

Inheritance
object
NotifyPropertyChangeBase
NotifyPropertyChanged
ViewModelBase
EntityViewModel<T>
Implements
INotifyPropertyChangeBase
IRefreshable
IEntityViewModel<T>
IEntityViewModel
INotifyPropertyChanged
Inherited Members
ViewModelBase.IsBusy
ViewModelBase.Observe<T>(Expression<Func<T>>, Action)
ViewModelBase.Observe(Expression<Func<object>>[], Action)
ViewModelBase.Observe(string, Action)
ViewModelBase.Observe(string[], Action)
ViewModelBase.ObserveFrom<T>(T, Expression<Func<T, object>>, Action)
ViewModelBase.ObserveFrom(INotifyPropertyChanged, PropertyInfo, Action)
ViewModelBase.BusyOp(Action)
ViewModelBase.BusyOp(Task)
ViewModelBase.BusyOp<T>(Func<T>)
ViewModelBase.BusyOp<T>(Task<T>)
NotifyPropertyChanged.PropertyChanged
NotifyPropertyChanged.Notify(params string[])
NotifyPropertyChanged.Notify(string)
NotifyPropertyChanged.RaisePropertyChangeEvent(in string, in PropertyChangeNotificationType)
NotifyPropertyChanged.OnDoChange<T>(ref T, T, string)
NotifyPropertyChangeBase.OnInitialize(NotifyPropertyChangeBase.IPropertyBroadcastSetup)
NotifyPropertyChangeBase.Subscribe(PropertyInfo, PropertyChangeObserver)
NotifyPropertyChangeBase.Subscribe(PropertyChangeObserver)
NotifyPropertyChangeBase.Subscribe(Expression<Func<object>>, PropertyChangeObserver)
NotifyPropertyChangeBase.Unsubscribe(PropertyChangeObserver)
NotifyPropertyChangeBase.Unsubscribe(PropertyInfo)
NotifyPropertyChangeBase.Unsubscribe(Expression<Func<object>>)
NotifyPropertyChangeBase.Change<T>(ref T, T, string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.Mvvm.dll
Syntax
public class EntityViewModel<T> : ViewModelBase, INotifyPropertyChangeBase, IRefreshable, IEntityViewModel<T>, IEntityViewModel, INotifyPropertyChanged
Type Parameters
Name Description
T

The entity type used as the internal backing store for this ViewModel.

Properties

| Edit this page View Source

Entity

The entity instance managed by this ViewModel.

Declaration
public virtual T Entity { get; set; }
Property Value
Type Description
T

Methods

| Edit this page View Source

Refresh()

Notifies that properties of this EntityViewModel<T> have changed.

Declaration
public override void Refresh()
Overrides
NotifyPropertyChangeBase.Refresh()
| Edit this page View Source

Update(T)

Copies values from the provided T into the entity instance held by this ViewModel.

Declaration
public virtual void Update(T entity)
Parameters
Type Name Description
T entity

The entity containing new values to apply to the current Entity instance.

Operators

| Edit this page View Source

implicit operator T(EntityViewModel<T>)

Implicitly converts an EntityViewModel<T> to T.

Declaration
public static implicit operator T(EntityViewModel<T> vm)
Parameters
Type Name Description
EntityViewModel<T> vm

The EntityViewModel<T> to convert.

Returns
Type Description
T

Implements

INotifyPropertyChangeBase
IRefreshable
IEntityViewModel<T>
IEntityViewModel
INotifyPropertyChanged

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowClone<T>(T)
Objects.ShallowCopyTo<T>(T, T)
ObservingCommandBuilder.Create<T>(T, Action)
ObservingCommandBuilder.Create<T>(T, Action<object?>)
ObservingCommandBuilder.Create<T>(T, Func<object?, Task>)
ObservingCommandBuilder.Create<T>(T, Func<Task>)
ObservingCommandBuilder.Create<T, TParam>(T, Action<TParam>)
ObservingCommandBuilder.Create<T, TParam>(T, Func<TParam, Task>)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
NotifyPropertyChangeBaseExtensions.Subscribe<T>(T, Expression<Func<T, object?>>, PropertyChangeObserver)
NotifyPropertyChangeBaseExtensions.Unsubscribe<T>(T, Expression<Func<T, object?>>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX