Skip to main content
Version: 4.2

DiffFieldCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

A mutable collection of fields that refreshes its owning viewer when items change.

public class DiffFieldCollection : Collection<DiffField>

Null items and duplicate item instances are rejected. Item property changes are observed automatically.

Example:

var viewer = new DiffViewer();
viewer.Fields.Add(new DiffField { Name = "Stage" });
viewer.Fields[0].Text = "Sales stage"; // Refreshes the owning viewer.

Constructors​

Instance member DiffFieldCollection()​

Initializes a new instance of DiffFieldCollection.

Methods​

Protected member ClearItems()​

Removes all items and their change subscriptions.

Protected member InsertItem(index, item)​

Inserts an item and starts observing its property changes.

ParameterTypeDescription
indexInt32Zero-based insertion position.
itemDiffFieldNon-null item not already in this collection.

Protected member RemoveItem(index)​

Removes an item and stops observing it.

ParameterTypeDescription
indexInt32Zero-based position to remove.

Protected member SetItem(index, item)​

Replaces an item and transfers property-change observation.

ParameterTypeDescription
indexInt32Zero-based position to replace.
itemDiffFieldNon-null replacement item.