Esempio n. 1
0
 /// <summary>
 /// Adds an <see cref="ExecutionMessage"/> to the end of the collection.
 /// </summary>
 /// <example>
 /// <code>
 /// ExecutionMessageCollection ToReturn = new ExecutionMessageCollection();
 /// ToReturn.Add(new WarningMessage("Item not found."));
 /// </code>
 /// </example>
 /// <param name="newMessage">The <see cref="ExecutionMessage"/> to be added to the end of the collection.</param>
 public void Add(ExecutionMessage newMessage)
 {
     this.OnExecutionMessageAdd(newMessage);
     this.List.Add(newMessage);
 }
Esempio n. 2
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="ExecutionMessage"/> from the collection.
 /// </summary>
 /// <param name="messageToRemove">The <see cref="ExecutionMessage"/> to remove.</param>
 public void Remove(ExecutionMessage messageToRemove)
 {
     this.List.Remove(messageToRemove);
 }
Esempio n. 3
0
 /// <summary>
 /// Searches for the specified <see cref="ExecutionMessage"/> and returns the zero-based
 /// index of the first occurrence within the entire collection.
 /// </summary>
 /// <param name="seekMessage">The <see cref="ExecutionMessage"/> to locate in the collection.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire collection, if found; otherwise, -1.
 /// </returns>
 public int IndexOf(ExecutionMessage seekMessage)
 {
     return(this.List.IndexOf(seekMessage));
 }
Esempio n. 4
0
 /// <summary>
 /// Inserts an <see cref="ExecutionMessage"/> into the collection at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="newMessage">The <see cref="ExecutionMessage"/> to insert.</param>
 public void Insert(int index, ExecutionMessage newMessage)
 {
     this.OnExecutionMessageAdd(newMessage);
     this.List.Insert(index, newMessage);
 }
Esempio n. 5
0
 /// <summary>
 /// Determines whether the collection contains a specific <see cref="ExecutionMessage"/>.
 /// </summary>
 /// <param name="seekMessage">The <see cref="ExecutionMessage"/> to locate in the collection.</param>
 /// <returns>true if the collection contains the specified ExecutionMessage; otherwise, false.</returns>
 public bool Contains(ExecutionMessage seekMessage)
 {
     return(this.List.Contains(seekMessage));
 }