PostSharp6.6//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
System.Object
  PostSharp.Patterns.Recording.OperationCollection

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

The OperationCollection type exposes the following members.

Properties
  NameDescription
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.
Methods
  NameDescription
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.
Events
  NameDescription
Public eventCollectionChanged
Occurs when the collection changes.
Public eventPropertyChanged
Event raised when the value of a property of the current object changes.
Extension Methods
  NameDescription
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.)
Remarks

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

See Also