public TcpClient(TcpZkEndPoint endpoint, ISerializer serializer = null) { if (null == serializer) { serializer = new DefaultSerializer(); } Proxy = TcpProxy.CreateProxy <TInterface>(endpoint, serializer); }
public TcpChannel(Type serviceType, TcpZkEndPoint endpoint) { if (endpoint == null) throw new ArgumentNullException("endpoint"); if (endpoint.Username == null) throw new ArgumentNullException("endpoint.Username"); if (endpoint.Password == null) throw new ArgumentNullException("endpoint.Password"); Initialize(endpoint.Username, endpoint.Password, serviceType, endpoint.EndPoint, endpoint.ConnectTimeOutMs); }
public TcpChannel(Type serviceType, TcpZkEndPoint endpoint) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } if (endpoint.Username == null) { throw new ArgumentNullException("endpoint.Username"); } if (endpoint.Password == null) { throw new ArgumentNullException("endpoint.Password"); } Initialize(endpoint.Username, endpoint.Password, serviceType, endpoint.EndPoint, endpoint.ConnectTimeOutMs); }
public static TInterface CreateProxy <TInterface>(TcpZkEndPoint endpoint) where TInterface : class { return(ProxyFactory.CreateProxy <TInterface>(typeof(TcpChannel), typeof(TcpZkEndPoint), endpoint)); }
public TcpClient(TcpZkEndPoint endpoint) { Proxy = TcpProxy.CreateProxy <TInterface>(endpoint); }