PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Recording Namespace / Operation­Collection Class

OperationCollection Class

Read-only collection of operations (Operation). The class is exposed on the UndoOperations and RedoOperations properties.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Recording
Assembly:  PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: (
public sealed class OperationCollection : ICollection<Operation>, 
	IEnumerable<Operation>, IEnumerable, INotifyPropertyChanged, INotifyCollectionChanged

The OperationCollection type exposes the following members.

Public propertyCount
Gets the number of elements contained in the ICollection<T>.
Public propertyIsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
Public methodCopyTo
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodTrim(Int32)
Trims the current collection to a given maximal number of operations.
Public methodTrim(RestorePoint)
Trims the current collection to a specified RestorePoint.
Public eventCollectionChanged
Occurs when the collection changes.
Public eventPropertyChanged
Event raised when the value of a property of the current object changes.
Extension Methods
Public Extension MethodToAdvisableCollection<Operation>
Converts an IEnumerable<T> into an AdvisableCollection<T>.
(Defined by Extensions.)
Public Extension MethodToAdvisableDictionary<Operation, TKey, TValue>
Converts an IEnumerable<T> into a AdvisableDictionary<TKey, TValue> given a method returning the item key and a method returning the item value.
(Defined by Extensions.)
Public Extension MethodToAdvisableHashSet<Operation>
Converts an IEnumerable<T> into an AdvisableHashSet<T>.
(Defined by Extensions.)

Additionally to traditional collection members, this class exposes the Trim(Int32) method, which allows to trim the collection of UndoOperations or RedoOperations.

See Also