Delete

Namespace: Digi21.DigiNG.IO
Assembly: Digi21.DigiNG

Deletes entities from the drawing file.

Overloads

Method Description
Delete(Entity) Deletes one entity.
Delete(IEnumerable<Entity>) Deletes multiple entities.

Each implementation determines how the entity is deleted. Bin, for example, marks it as deleted and writes it back: the entity remains in the file with Deleted set to true. See each class's page.

Delete(Entity)

void Delete(Entity entity);
Parameter Description
entity Entity to delete from the file.

Delete(IEnumerable<Entity>)

void Delete(IEnumerable<Entity> entities);
Parameter Description
entities File entities to delete.

Exceptions

Exception When
ArgumentNullException entity is null. Delete(IEnumerable<Entity>) does not check whether entities is null in Bin or DrawingFile.
InvalidOperationException The entity belongs to another file, or the file is opened read-only in implementations checking CanWrite (such as Bin).