Table of Contents

Struct IGeoObjectImpl.Changing<T>

Namespace
CADability.GeoObject
Assembly
CADability.dll

A performance optimized version of IGeoObjectImpl.Changing, without reflection and minimal allocations.

protected readonly struct IGeoObjectImpl.Changing<T> : IDisposable

Type Parameters

T

The type of the value being changed.

Implements
Inherited Members

Constructors

Changing(IGeoObjectImpl, T, bool, string)

Starts a change of geoObject. Changes may be nested; if this is the outermost change and someone listens, FireWillChange(GeoObjectChange) is called with a GeoObjectChange that names the property and its old value, so that undo can set the property back. Dispose the struct when the change is done. Usually created through Create<T>(IGeoObjectImpl, T, string) or Create<T>(IGeoObjectImpl, T, string).

public Changing(IGeoObjectImpl geoObject, T oldValue, bool isAttribute, string propertyName = null)

Parameters

geoObject IGeoObjectImpl

the object being changed

oldValue T

the value of the property before the change

isAttribute bool

true if only an attribute changes and not the geometry, see OnlyAttributeChanged

propertyName string

the name of the property being changed; supplied by the compiler when omitted

Methods

Dispose()

Ends the change. When this was the outermost change, FireDidChange(GeoObjectChange) is called, which raises DidChangeEvent and FeedBackChangedEvent.

public void Dispose()