Show / Hide Table of Contents

Class ValidationSource

Ejecuta validaciones de datos dentro de un IValidatingViewModel.

Inheritance
object
ValidationSource
ValidationSource<T>
Implements
INotifyDataErrorInfo
Inherited Members
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 abstract class ValidationSource : INotifyDataErrorInfo

Properties

| Edit this page View Source

HasErrors

Gets a value that indicates whether the entity has validation errors.

Declaration
public bool HasErrors { get; }
Property Value
Type Description
bool

true if the entity currently has validation errors; otherwise, false.

| Edit this page View Source

this[string]

Obtiene una colección de los errores de validación para la propiedad especificada.

Declaration
public IEnumerable<string> this[string propertyName] { get; }
Parameters
Type Name Description
string propertyName

Nombre de la propiedad para la cual se deben obtener los mensajes de error.

Property Value
Type Description
IEnumerable<string>

Una enumeración de los mensajes de error para la propiedad especificada, o una enumeración vacía si la propiedad no contiene errores.

| Edit this page View Source

PassesValidation

Indica si el objeto a comprobar ha pasado todas las pruebas de validación.

Declaration
public bool PassesValidation { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

CheckErrors()

Ejecuta una comprobación de errores de validación.

Declaration
public bool CheckErrors()
Returns
Type Description
bool

true si todas las validaciones han sido exitosas, false en caso contrario.

| Edit this page View Source

GetErrors()

Enumera los errores de validación para todas las propiedades configuradas del ViewModel observado.

Declaration
public IEnumerable<string> GetErrors()
Returns
Type Description
IEnumerable<string>

Una colección con todos los errores de validación para el ViewModel observado.

| Edit this page View Source

GetErrors(string?)

Enumera los errores de validación para la propiedad propertyName, o todos los errores de validación.

Declaration
public IEnumerable GetErrors(string? propertyName)
Parameters
Type Name Description
string propertyName

Nombre de la propiedad para la cual obtener los errores de validación. Si es una cadena vacía o null, se devolverán los errores de validación de todas las propiedades.

Returns
Type Description
IEnumerable

Una enumeración con todos los errores de validación de la propiedad o de la instancia.

Events

| Edit this page View Source

ErrorsChanged

Occurs when the validation errors have changed for a property or for the entire entity.

Declaration
public event EventHandler<DataErrorsChangedEventArgs>? ErrorsChanged
Event Type
Type Description
EventHandler<DataErrorsChangedEventArgs>

Implements

INotifyDataErrorInfo

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.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX