IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Engine.Internal.ServerUtilities Class Reference

A collection of utility methods used to create, retrieve and release TcpChannels. More...

Static Public Member Functions

static TcpChannel GetTcpChannel ()
 Get a default channel. If one does not exist, then one is created and registered. More...
 
static TcpChannel GetTcpChannel (string name, int port)
 Get a channel by name, casting it to a TcpChannel. Otherwise, create, register and return a TcpChannel with that name, on the port provided as the second argument. More...
 
static TcpChannel GetTcpChannel (string name, int port, int limit)
 Get a channel by name, casting it to a TcpChannel. Otherwise, create, register and return a TcpChannel with that name, on the port provided as the second argument. More...
 
static void SafeReleaseChannel (IChannel channel)
 Unregisters the IChannel from the ChannelServices registry. More...
 

Static Private Member Functions

static TcpChannel CreateTcpChannel (string name, int port, int limit)
 Create a TcpChannel with a given name on a given port. More...
 

Static Private Attributes

static Logger log = InternalTrace.GetLogger(typeof(ServerUtilities))
 

Detailed Description

A collection of utility methods used to create, retrieve and release TcpChannels.

Member Function Documentation

static TcpChannel NUnit.Engine.Internal.ServerUtilities.CreateTcpChannel ( string  name,
int  port,
int  limit 
)
inlinestaticprivate

Create a TcpChannel with a given name on a given port.

Parameters
nameThe name of the channel to create.
portThe port number of the channel to create.
limitThe rate limit of the channel to create.
Returns
A TcpChannel configured with the given name and port.
static TcpChannel NUnit.Engine.Internal.ServerUtilities.GetTcpChannel ( )
inlinestatic

Get a default channel. If one does not exist, then one is created and registered.

Returns
The specified TcpChannel or null if it cannot be found and created

Referenced by NUnit.Engine.Internal.Tests.ServerUtilityTests.CanGetTcpChannelOnSpecifiedPort(), NUnit.Engine.Internal.Tests.ServerUtilityTests.CanGetTcpChannelOnUnspecifiedPort(), and NUnit.Agent.NUnitTestAgent.Main().

static TcpChannel NUnit.Engine.Internal.ServerUtilities.GetTcpChannel ( string  name,
int  port 
)
inlinestatic

Get a channel by name, casting it to a TcpChannel. Otherwise, create, register and return a TcpChannel with that name, on the port provided as the second argument.

Parameters
nameThe name of the channel
portThe port to use if the channel must be created
Returns
The specified TcpChannel or null if it cannot be found and created
static TcpChannel NUnit.Engine.Internal.ServerUtilities.GetTcpChannel ( string  name,
int  port,
int  limit 
)
inlinestatic

Get a channel by name, casting it to a TcpChannel. Otherwise, create, register and return a TcpChannel with that name, on the port provided as the second argument.

Parameters
nameThe name of the channel
portThe port to use if the channel must be created
limitThe client connection limit or negative for the default
Returns
The specified TcpChannel or null if it cannot be found and created
static void NUnit.Engine.Internal.ServerUtilities.SafeReleaseChannel ( IChannel  channel)
inlinestatic

Unregisters the IChannel from the ChannelServices registry.

Parameters
channelThe channel to unregister.

Referenced by NUnit.Engine.Internal.Tests.ServerUtilityTests.ReleaseChannels().

Member Data Documentation

Logger NUnit.Engine.Internal.ServerUtilities.log = InternalTrace.GetLogger(typeof(ServerUtilities))
staticprivate

The documentation for this class was generated from the following file: