public override IServiceInfo Create(Service binding)
        {
            var uri      = GetUriFromCredentials(binding.Credentials);
            var username = GetUsernameFromCredentials(binding.Credentials);
            var password = GetPasswordFromCredentials(binding.Credentials);

            if (uri == null)
            {
                var host = GetHostFromCredentials(binding.Credentials);
                var port = GetPortFromCredentials(binding.Credentials);

                var database = GetStringFromCredentials(binding.Credentials, "name");

                if (host != null)
                {
                    uri = new UriInfo(DefaultUriScheme, host, port, username, password, database).ToString();
                }
            }

            return(Create(binding.Name, uri, username, password));
        }
Exemple #2
0
 public UriServiceInfo(string id, string uriString)
     : base(id)
 {
     Info = new UriInfo(uriString);
 }
Exemple #3
0
 public UriServiceInfo(string id, string uriString, string username, string password)
     : base(id)
 {
     Info = new UriInfo(uriString, username, password);
 }
Exemple #4
0
 public UriServiceInfo(string id, string scheme, string host, int port, string username, string password, string path)
     : base(id)
 {
     Info = new UriInfo(scheme, host, port, username, password, path);
 }
Exemple #5
0
 public UriServiceInfo(string id, string uriString, bool urlEncodedCredentials = false)
     : base(id)
 {
     Info = new UriInfo(uriString, urlEncodedCredentials);
 }