Show / Hide Table of Contents

Class ObservableListWrap

Wraps a list to provide notifications when the collection's content changes.

Inheritance
object
NotifyPropertyChangeBase
NotifyPropertyChanged
ObservableWrapBase
ObservableListWrap
Implements
INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
IList
ICollection
IEnumerable
INotifyCollectionChanged
Inherited Members
ObservableWrapBase.CollectionChanged
ObservableWrapBase.RaiseCollectionChanged(NotifyCollectionChangedEventArgs)
ObservableWrapBase.GetEnumerator()
ObservableWrapBase.RefreshItem(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
Assembly: MCART.Mvvm.dll
Syntax
public class ObservableListWrap : ObservableWrapBase, INotifyPropertyChangeBase, IRefreshable, INotifyPropertyChanged, IList, ICollection, IEnumerable, INotifyCollectionChanged

Constructors

| Edit this page View Source

ObservableListWrap()

Initializes a new instance of the ObservableListWrap class.

Declaration
public ObservableListWrap()
| Edit this page View Source

ObservableListWrap(IList)

Initializes a new instance of the ObservableListWrap class.

Declaration
public ObservableListWrap(IList list)
Parameters
Type Name Description
IList list

List to use as the underlying list.

Properties

| Edit this page View Source

Count

Gets the number of elements contained in the collection.

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

IsFixedSize

Gets a value indicating whether this list has a fixed size.

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

IsReadOnly

Gets a value indicating whether this list is read-only.

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

IsSynchronized

Gets a value indicating whether access to this ICollection is synchronized (thread safe).

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

this[int]

Provides indexed access to the contents of this ObservableListWrap.

Declaration
public object? this[int index] { get; set; }
Parameters
Type Name Description
int index

Index of the element to get or set.

Property Value
Type Description
object

The element at the specified index in the collection.

| Edit this page View Source

SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

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

UnderlyingList

Gets direct access to the underlying list managed by this ObservableListWrap.

Declaration
public IList? UnderlyingList { get; }
Property Value
Type Description
IList

Methods

| Edit this page View Source

Add(object?)

Adds an item to this ObservableListWrap.

Declaration
public int Add(object? value)
Parameters
Type Name Description
object value

Value to add to this ObservableListWrap.

Returns
Type Description
int

The index at which the item was added.

| Edit this page View Source

Clear()

Removes all items from this ObservableListWrap.

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

Contains(object?)

Determines whether this ObservableListWrap contains a specified value.

Declaration
public override bool Contains(object? value)
Parameters
Type Name Description
object value

Value to check for.

Returns
Type Description
bool

true if this ObservableListWrap contains the specified value; otherwise false.

Overrides
ObservableWrapBase.Contains(object)
| Edit this page View Source

CopyTo(Array, int)

Copies the elements of this ObservableListWrap to an array, starting at a particular array index.

Declaration
public void CopyTo(Array array, int index)
Parameters
Type Name Description
Array array

Destination array for the copy.

int index

Index in the destination array at which to start copying.

| Edit this page View Source

IndexOf(object?)

Returns the index of a specific item in this ObservableListWrap.

Declaration
public override int IndexOf(object? value)
Parameters
Type Name Description
object value

Value whose index to get in this ObservableListWrap.

Returns
Type Description
int

The index of the item in this ObservableListWrap.

Overrides
ObservableWrapBase.IndexOf(object)
| Edit this page View Source

Insert(int, object?)

Inserts an item into this ObservableListWrap at the specified index.

Declaration
public void Insert(int index, object? value)
Parameters
Type Name Description
int index

The index at which to insert the item.

object value

Value to insert into this ObservableListWrap.

| Edit this page View Source

OnGetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
protected override IEnumerator OnGetEnumerator()
Returns
Type Description
IEnumerator

An enumerator that can be used to iterate through the collection.

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

Refresh()

Forces notification that the list has changed.

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

RefreshAt(int)

Forces a refresh of the item at the specified index.

Declaration
public void RefreshAt(int index)
Parameters
Type Name Description
int index

Index of the item to refresh.

| Edit this page View Source

Remove(object?)

Removes an item from this ObservableListWrap.

Declaration
public void Remove(object? value)
Parameters
Type Name Description
object value

Value to remove from this ObservableListWrap.

| Edit this page View Source

RemoveAt(int)

Removes the item at the specified index from this ObservableListWrap.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
int index

Index of the item to remove.

| Edit this page View Source

Substitute(IList)

Replaces the underlying list with a new one.

Declaration
public void Substitute(IList newList)
Parameters
Type Name Description
IList newList

List to set as the underlying list.

Implements

INotifyPropertyChangeBase
IRefreshable
INotifyPropertyChanged
IList
ICollection
IEnumerable
INotifyCollectionChanged

Extension Methods

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)
ListExtensions.Locked(IList, Action<IList>)
ListExtensions.RemoveOf<T>(IList)
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>)
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