NUnit.Util.TestAgency.FindAvailableRemoteAgent(NUnit.Util.AgentType)

Here are the examples of the csharp api NUnit.Util.TestAgency.FindAvailableRemoteAgent(NUnit.Util.AgentType) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : TestAgency.cs
with MIT License
from roozbehid

public TestAgent GetAgent(AgentType type, int waitTime)
		{
			if ( type == AgentType.Default )
				type = defaultAgentType;

			if ( (type & supportedAgentTypes) == 0 )
				throw new ArgumentException( 
					string.Format( "AgentType {0} is not supported by this agency", type ),
					"type" );

			AgentRecord r = FindAvailableRemoteAgent(type);
			if ( r == null )
				r = CreateRemoteAgent(type, waitTime);

			return new TestAgent( this, r.Process.Id, r.Agent );
		}