internal RemoteHost(string hostName, RemoteHostPool remoteHostPool, object sharedLock, int?port = null)
        {
            if (hostName == null)
            {
                throw new ArgumentNullException(nameof(hostName));
            }
            if (remoteHostPool == null)
            {
                throw new ArgumentNullException(nameof(remoteHostPool));
            }
            if (sharedLock == null)
            {
                throw new ArgumentNullException(nameof(sharedLock));
            }

            Lock         = sharedLock;
            HostPool     = remoteHostPool;
            HostName     = hostName;
            FailureCount = 0;
            Log          = remoteHostPool.Log;
            Port         = port;
        }
예제 #2
0
 internal OverriddenRemoteHost(string serviceName, string hostName, RemoteHostPool remoteHostPool) : base(hostName, remoteHostPool, new object())
 {
     ServiceName = serviceName;
 }