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
TThe 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
geoObjectIGeoObjectImplthe object being changed
oldValueTthe value of the property before the change
isAttributebooltrue if only an attribute changes and not the geometry, see OnlyAttributeChanged
propertyNamestringthe 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()