Table of Contents

Class MultiPropertyChangedCommand

Namespace
NanoByte.Common.Undo
Assembly
NanoByte.Common.dll

An undo command that handles multiple changed properties.

[RequiresUnreferencedCode("Performs reflection to get and set property values.")]
public class MultiPropertyChangedCommand : PreExecutedCommand, IUndoCommand
Inheritance
object
MultiPropertyChangedCommand
Implements
Inherited Members
Extension Methods

Constructors

MultiPropertyChangedCommand(object[], PropertyDescriptor, object?[], object?)

Initializes the command after the properties were first changed.

public MultiPropertyChangedCommand(object[] targets, PropertyDescriptor property, object?[] oldValues, object? newValue)

Parameters

targets object[]

The objects the property belongs to.

property PropertyDescriptor

The property that was changed.

oldValues object[]

The property's old values.

newValue object

The property's current value.

Properties

Property

The property that was changed.

public PropertyDescriptor Property { get; }

Property Value

PropertyDescriptor

Targets

The objects the property belongs to.

public IReadOnlyList<object> Targets { get; }

Property Value

IReadOnlyList<object>

Methods

OnRedo()

Set the changed property value again.

protected override void OnRedo()

OnUndo()

Restore the original property values.

protected override void OnUndo()