Example #1
0
 public INodeEndpointClient GetNodeEndpointClient(string targetEndpointUrl, EndpointVersionType type, string endpointUsername)
 {
     if (!string.IsNullOrEmpty(endpointUsername))
     {
         string testPassword, prodPassword;
         if (!EndpointUserDao.GetEnpointUserPasswordsByUsername(endpointUsername, out testPassword, out prodPassword))
         {
             throw new ArgumentException(string.Format("The node endpoint user \"{0}\" could not be found.", endpointUsername));
         }
         INodeEndpointClient client = NodeEndpointClientFactory.Make(targetEndpointUrl, type, endpointUsername, testPassword, prodPassword);
         return(client);
     }
     else
     {
         return(NodeEndpointClientFactory.Make(targetEndpointUrl, type));
     }
 }