Exemplo n.º 1
0
        public override IServiceInfo Create(Service binding)
        {
            string uri = GetUriFromCredentials(binding.Credentials);

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

                String username = GetUsernameFromCredentials(binding.Credentials);
                String password = GetPasswordFromCredentials(binding.Credentials);

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

                if (host != null)
                {
                    uri = new UriInfo(DefaultUriScheme, host, port, username, password, database).ToString();
                }
            }
            return(Create(binding.Name, uri));
        }
Exemplo n.º 2
0
 public UriServiceInfo(String id, String uriString) :
     base(id)
 {
     Info = new UriInfo(uriString);
 }
Exemplo n.º 3
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);
 }