/// <summary> /// Generates an instance of <see cref="CruiseServerClientBase"/> that connects via /// .NET Remoting. /// </summary> /// <param name="address">The address of the server.</param> /// <param name="settings">The start-up settings to use.</param> /// <returns>A <see cref="CruiseServerClientBase"/> instance.</returns> public CruiseServerClientBase GenerateRemotingClient(string address, ClientStartUpSettings settings) { var client = clients.ContainsKey(address) ? clients[address] : null; if (client == null) { if (settings.BackwardsCompatable) { client = new CruiseServerRemotingClient(address); } else { IServerConnection connection = new RemotingConnection(address); connection = BuildUpConnection(connection, settings); client = new CruiseServerClient(connection); } if (UseClientCaching) { clients.Add(address, client); } } return(client); }
/// <summary> /// Generates an instance of <see cref="CruiseServerClientBase"/> that connects via /// .NET Remoting. /// </summary> /// <param name="address">The address of the server.</param> /// <param name="settings">The start-up settings to use.</param> /// <returns>A <see cref="CruiseServerClientBase"/> instance.</returns> public CruiseServerClientBase GenerateRemotingClient(string address, ClientStartUpSettings settings) { var client = clients.ContainsKey(address) ? clients[address] : null; if (client == null) { if (settings.BackwardsCompatable) { client = new CruiseServerRemotingClient(address); } else { IServerConnection connection = new RemotingConnection(address); connection = BuildUpConnection(connection, settings); client = new CruiseServerClient(connection); } if (UseClientCaching) clients.Add(address, client); } return client; }