Show / Hide Table of Contents

Class ObservableWrap<T, TCollection>

Clase base para los envoltorios observables de colecciones.

Inheritance
object
NotifyPropertyChangeBase
NotifyPropertyChanged
ObservableWrapBase
ObservableWrap<T, TCollection>
ObservableCollectionWrap<T>
ObservableDictionaryWrap<TKey, TValue>
ObservableListWrap<T>
Implements
INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
INotifyCollectionChanged
ICollection<T>
IEnumerable<T>
IEnumerable
Inherited Members
ObservableWrapBase.CollectionChanged
ObservableWrapBase.RaiseCollectionChanged(NotifyCollectionChangedEventArgs)
ObservableWrapBase.IndexOf(object)
ObservableWrapBase.RefreshItem(object)
ObservableWrapBase.Contains(object)
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 abstract class ObservableWrap<T, TCollection> : ObservableWrapBase, INotifyPropertyChangeBase, IRefreshable, INotifyPropertyChanged, INotifyCollectionChanged, ICollection<T>, IEnumerable<T>, IEnumerable where TCollection : ICollection<T>
Type Parameters
Name Description
T

Tipo de elementos de la colección.

TCollection

Tipo de colección.

Constructors

| Edit this page View Source

ObservableWrap()

Inicializa una nueva instancia de la clase ObservableWrap<T, TCollection>.

Declaration
protected ObservableWrap()
| Edit this page View Source

ObservableWrap(TCollection)

Inicializa una nueva instancia de la clase ObservableWrap<T, TCollection>.

Declaration
protected ObservableWrap(TCollection collection)
Parameters
Type Name Description
TCollection collection

Properties

| Edit this page View Source

Count

Obtiene la cuenta de elementos contenidos dentro de la colección.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

IsReadOnly

Obtiene un valor que indica si la colección es de solo lectura.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
bool
| Edit this page View Source

UnderlyingCollection

Obtiene acceso directo a la colección subyacente envuelta por este ObservableWrap<T, TCollection>.

Declaration
public TCollection? UnderlyingCollection { get; }
Property Value
Type Description
TCollection

Methods

| Edit this page View Source

Add(T)

Agrega un nuevo elemento al final de la colección.

Declaration
public void Add(T item)
Parameters
Type Name Description
T item

Elemento a agregar.

| Edit this page View Source

Clear()

Limpia la colección.

Declaration
public void Clear()
| Edit this page View Source

Contains(T)

Determina si la secuencia subyacente contiene al elemento especificado.

Declaration
public virtual bool Contains(T item)
Parameters
Type Name Description
T item

Elemento a buscar dentro de la secuencia.

Returns
Type Description
bool

true si la secuencia contiene al elemento especificado, false en caso contrario.

| Edit this page View Source

CopyTo(T[], int)

Copia el contenido de esta colección sobre un arreglo.

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array

Destino de la copia.

int arrayIndex

Índice donde empezar a copiar elementos.

| Edit this page View Source

GetEnumerator()

Obtiene un enumerador que itera sobre la colección.

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
IEnumerator<T>

Un enumerador que puede ser utilizado para iterar sobre la colección.

| Edit this page View Source

OnGetEnumerator()

Obtiene un enumerador que itera sobre la colección.

Declaration
protected override IEnumerator OnGetEnumerator()
Returns
Type Description
IEnumerator

Un enumerador que puede ser utilizado para iterar sobre la colección.

Overrides
ObservableWrapBase.OnGetEnumerator()
| Edit this page View Source

Refresh()

Obliga a notificar un cambio en la colección.

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

Remove(T)

Quita un elemento de la colección.

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T item

Elemento a quitar.

Returns
Type Description
bool

true si el elemento ha sido quitado exitosamente de la colección, false en caso contrario. También se devuelve false si el elemento no existía en la ICollection<T> original.

| Edit this page View Source

Replace(TCollection)

Elimina todos los elementos de la colección subyacente y los reemplaza con los elementos de la colección especificada.

Declaration
public void Replace(TCollection newCollection)
Parameters
Type Name Description
TCollection newCollection

Colección con los elementos a agregar a la colección subyacente.

| Edit this page View Source

Substitute(TCollection?)

Sustituye la colección subyacente por una nueva.

Declaration
public void Substitute(TCollection? newCollection)
Parameters
Type Name Description
TCollection newCollection

Colección a establecer como la colección subyacente.

Implements

INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
INotifyCollectionChanged
ICollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

CollectionExtensions.AddRangeAsync<T>(ICollection<T>, IAsyncEnumerable<T>)
CollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
CollectionExtensions.PopFirst<T>(ICollection<T>)
CollectionExtensions.Pop<T>(ICollection<T>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>, TItem)
CollectionExtensions.RemoveAll<T>(ICollection<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Action<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>?, in Action<T>?)
CollectionExtensions.RemoveOf<TItem, TRemove>(ICollection<TItem>)
MvvmCollectionExtensions.ToObservable<T>(ICollection<T>)
CollectionHelpers.WithIndex<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T, TProp>(IEnumerable<T>, Func<T, TProp>)
EnumerableExtensions.Copy<T>(IEnumerable<T>)
EnumerableExtensions.ExceptFor<T>(IEnumerable<T>, params T[])
EnumerableExtensions.FindIndexOf<T>(IEnumerable<T>, T)
EnumerableExtensions.FirstOf<T>(IEnumerable<T>, Type)
EnumerableExtensions.IsPropertyEqual<T>(IEnumerable<T>, Func<T, object>)
EnumerableExtensions.IsQuorum<T>(IEnumerable<T>, int, out T)
EnumerableExtensions.NonDefaults<T>(IEnumerable<T?>)
EnumerableExtensions.OfType<T>(IEnumerable<T>, Type)
EnumerableExtensions.OrNull<T>(IEnumerable<T>)
EnumerableExtensions.PickAsync<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>, in Random)
EnumerableExtensions.Quorum<T>(IEnumerable<T>, int)
EnumerableExtensions.Range<T>(IEnumerable<T>, int, int)
EnumerableExtensions.Rotate<T>(IEnumerable<T>, int)
EnumerableExtensions.SelectAsync<TIn, TOut>(IEnumerable<TIn>, Func<TIn, Task<TOut>>)
EnumerableExtensions.Shift<T>(IEnumerable<T>, int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int, in int, in Random)
EnumerableExtensions.ToExtendedListAsync<T>(IEnumerable<T>)
EnumerableExtensions.ToExtendedList<T>(IEnumerable<T>)
EnumerableExtensions.ToListAsync<T>(IEnumerable<T>)
EnumerableExtensions.YieldAsync<T>(IEnumerable<T>, Func<T, Task>)
CollectionHelpers.ToTypes(IEnumerable)
EnumerableExtensions.Contains(IEnumerable, object?)
EnumerableExtensions.ContainsAll(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAll(IEnumerable, params object?[])
EnumerableExtensions.ContainsAny(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAny(IEnumerable, params object?[])
EnumerableExtensions.Count(IEnumerable)
EnumerableExtensions.FirstOf<T>(IEnumerable)
EnumerableExtensions.GroupByType(IEnumerable)
EnumerableExtensions.IsAnyOf(IEnumerable, Type)
EnumerableExtensions.IsAnyOf<T>(IEnumerable)
EnumerableExtensions.ItemsEqual(IEnumerable, IEnumerable)
EnumerableExtensions.NotNull(IEnumerable?)
EnumerableExtensions.NullCount(IEnumerable)
EnumerableExtensions.ToGeneric(IEnumerable)
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)
ObservingCommandBuilder.Create<T>(T, Action)
ObservingCommandBuilder.Create<T>(T, Action<object?>)
ObservingCommandBuilder.Create<T>(T, Func<object?, Task>)
ObservingCommandBuilder.Create<T>(T, Func<Task>)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
EnumerableExtensions.Locked<T>(T, Action<T>)
EnumerableExtensions.Locked<T, TResult>(T, Func<T, TResult>)
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