Skip to content

Commit

Permalink
Fixed suggested changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Apr 23, 2024
1 parent 07f9ae1 commit 3f7d726
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/NUnitFramework/framework/Internal/Execution/EventPump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@ public enum EventPumpState
}

/// <summary>
/// EventPump pulls events out of an EventQueue and sends
/// them to a ITestListener. It is used to send events back to
/// EventPump pulls Event instances out of an EventQueue and sends
/// them to a ITestListener. It is used to send these events back to
/// the client without using the CallContext of the test
/// runner thread.
/// </summary>
public class EventPump : EventPumpTemplate<Event, ITestListener>, IDisposable
public sealed class EventPump : EventPump<Event, ITestListener>, IDisposable
{
/// <summary>
/// Constructor for standard EventPump
/// </summary>
/// <param name="eventListener">The EventListener to receive events</param>
/// <param name="events">The event queue to pull events from</param>
public EventPump(ITestListener eventListener, EventQueueTemplate<Event> events)
public EventPump(ITestListener eventListener, EventQueue<Event> events)
: base(eventListener, events, "Standard")
{
}
}

/// <summary>
/// EventPump template pulls events of any type out of an EventQueue and sends
/// EventPump base class pulls events of any type out of an EventQueue and sends
/// them to any listener. It is used to send events back to
/// the client without using the CallContext of the test
/// runner thread.
/// </summary>
public class EventPumpTemplate<TEvent, TListener> : IDisposable
public abstract class EventPump<TEvent, TListener> : IDisposable
where TEvent : IEvent<TListener>
{
private static readonly Logger Log = InternalTrace.GetLogger("EventPump");
Expand All @@ -68,7 +68,7 @@ public class EventPumpTemplate<TEvent, TListener> : IDisposable
/// <summary>
/// The queue that holds our events
/// </summary>
private readonly EventQueueTemplate<TEvent> _events;
private readonly EventQueue<TEvent> _events;

/// <summary>
/// Thread to do the pumping
Expand All @@ -90,7 +90,7 @@ public class EventPumpTemplate<TEvent, TListener> : IDisposable
/// <param name="eventListener">The EventListener to receive events</param>
/// <param name="events">The event queue to pull events from</param>
/// <param name="name">Name of the thread and pump</param>
public EventPumpTemplate(TListener eventListener, EventQueueTemplate<TEvent> events, string name = "Standard")
protected EventPump(TListener eventListener, EventQueue<TEvent> events, string name = "Standard")
{
_eventListener = eventListener;
_events = events;
Expand Down
6 changes: 3 additions & 3 deletions src/NUnitFramework/framework/Internal/Execution/EventQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IEvent<in TListener>
#region Individual Event Classes

/// <summary>
/// NUnit.Core.Event is the abstract base for all stored events.
/// NUnit.Core.Event is the abstract base for all stored standard events.
/// An Event is the stored representation of a call to the
/// ITestListener interface and is used to record such calls
/// or to queue them for forwarding on another thread or at
Expand Down Expand Up @@ -150,7 +150,7 @@ public override void Send(ITestListener listener)
/// Implements a queue of work items for the Event type each of which
/// is queued as a WaitCallback.
/// </summary>
public class EventQueue : EventQueueTemplate<Event>
public sealed class EventQueue : EventQueue<Event>
{
}

Expand All @@ -159,7 +159,7 @@ public class EventQueue : EventQueueTemplate<Event>
/// is queued as a WaitCallback.
/// It can handle any event types.
/// </summary>
public class EventQueueTemplate<T>
public abstract class EventQueue<T>
{
private const int SpinCount = 5;

Expand Down

0 comments on commit 3f7d726

Please sign in to comment.