Class EntitySelection
Provides a container for entity selections capable of undo/redo operations and notification of changes.
Inheritance
System.Object
EntitySelection
Implements
System.Collections.Specialized.INotifyCollectionChanged
System.Collections.Generic.IEnumerable<IPersistEntity>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Xbim.Presentation
Assembly: Xbim.Common.dll
Syntax
public class EntitySelection : INotifyCollectionChanged, IEnumerable<IPersistEntity>, IEnumerable
Constructors
| Improve this Doc View SourceEntitySelection(Boolean)
Initialises an empty selection;
Declaration
public EntitySelection(bool keepLogging = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | keepLogging | Set to True to enable activity logging for undo/redo operations. |
Methods
| Improve this Doc View SourceAdd(IEnumerable<IPersistEntity>)
Declaration
public void Add(IEnumerable<IPersistEntity> entity)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> | entity |
Add(IPersistEntity)
Declaration
public void Add(IPersistEntity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| IPersistEntity | entity |
AddRange(IEnumerable<IPersistEntity>)
Declaration
public IEnumerable<IPersistEntity> AddRange(IEnumerable<IPersistEntity> entities)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> | entities |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> |
Clear()
Declaration
public void Clear()
GetEnumerator()
Declaration
public IEnumerator<IPersistEntity> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<IPersistEntity> |
Redo()
Declaration
public void Redo()
Remove(IEnumerable<IPersistEntity>)
Declaration
public void Remove(IEnumerable<IPersistEntity> entity)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> | entity |
Remove(IPersistEntity)
Declaration
public void Remove(IPersistEntity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| IPersistEntity | entity |
SetRange(IEnumerable<IPersistEntity>)
Declaration
public IEnumerable<IPersistEntity> SetRange(IEnumerable<IPersistEntity> entities)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> | entities |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IPersistEntity> |
Toggle(IPersistEntity)
Toggles the selection state of an IPersistEntity
Declaration
public bool Toggle(IPersistEntity item)
Parameters
| Type | Name | Description |
|---|---|---|
| IPersistEntity | item | the IPersistEntity to add or remove from the selection |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if added; false if removed |
Undo()
Declaration
public void Undo()
Events
| Improve this Doc View SourceCollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
| Type | Description |
|---|---|
| System.Collections.Specialized.NotifyCollectionChangedEventHandler |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator |
Implements
System.Collections.Specialized.INotifyCollectionChanged
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable