Exemplo n.º 1
0
 public TcpClient(TcpZkEndPoint endpoint, ISerializer serializer = null)
 {
     if (null == serializer)
     {
         serializer = new DefaultSerializer();
     }
     Proxy = TcpProxy.CreateProxy <TInterface>(endpoint, serializer);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 public static TInterface CreateProxy <TInterface>(TcpZkEndPoint endpoint) where TInterface : class
 {
     return(ProxyFactory.CreateProxy <TInterface>(typeof(TcpChannel), typeof(TcpZkEndPoint), endpoint));
 }
Exemplo n.º 5
0
 public TcpClient(TcpZkEndPoint endpoint)
 {
     Proxy = TcpProxy.CreateProxy <TInterface>(endpoint);
 }