/// <summary> /// Performs the given operation on the line buffer. This will raise any /// events that were appropriate for the operation. /// </summary> /// <param name="operation">The operation to perform.</param> /// <returns> /// The results to the changes to the buffer. /// </returns> public override LineBufferOperationResults Do(ILineBufferOperation operation) { // Check for null values. if (operation == null) { throw new ArgumentNullException("operation"); } // Break out the operation and call the appropriate function. switch (operation.OperationType) { case LineBufferOperationType.SetText: return(Do((SetTextOperation)operation)); case LineBufferOperationType.InsertText: return(Do((InsertTextOperation)operation)); case LineBufferOperationType.DeleteText: return(Do((DeleteTextOperation)operation)); case LineBufferOperationType.DeleteLines: return(Do((DeleteLinesOperation)operation)); case LineBufferOperationType.InsertLines: return(Do((InsertLinesOperation)operation)); case LineBufferOperationType.ExitLine: return(Do((ExitLineOperation)operation)); default: throw new ArgumentOutOfRangeException( "operation", "Operation implements unknown OperationType."); } }
/// <summary> /// Performs the given operation on the line buffer. /// </summary> /// <param name="operation">The operation.</param> public LineBufferOperationResults Do(ILineBufferOperation operation) { if (operation == null) { throw new ArgumentNullException("operation"); } return(displayContext.LineBuffer.Do(operation)); }
/// <summary> /// Performs the given operation on the line buffer. This will raise any /// events that were appropriate for the operation. /// </summary> /// <param name="operation">The operation to perform.</param> /// <returns>The results to the changes to the buffer.</returns> public abstract LineBufferOperationResults Do(ILineBufferOperation operation);
/// <summary> /// Performs the given operation on the line buffer. This will raise any /// events that were appropriate for the operation. /// </summary> /// <param name="operation">The operation to perform.</param> /// <returns> /// The results to the changes to the buffer. /// </returns> public override LineBufferOperationResults Do(ILineBufferOperation operation) { return(LineBuffer.Do(operation)); }
/// <summary> /// Performs the given operation, raising any events for changing. /// </summary> /// <param name="operation">The operation.</param> public override LineBufferOperationResults Do(ILineBufferOperation operation) { throw new NotImplementedException(); }