Пример #1
0
        /// <summary>
        /// Creates a client for accessing the service specified by the service URL
        /// with the given binding.
        /// </summary>
        /// <param name="serverName">Logical name of the server. This name is used to retrieve configuration information.</param>
        /// <param name="serviceUrlAppSettingsKey">The key in the appSettings section of the configuration file where the service URL is located.</param>
        /// <returns></returns>
        public virtual TClient CreateClient(string serverName, string serviceUrlAppSettingsKey)
        {
            Binding binding = BindingFactory.CreateBindingFromConfiguration(serverName);

            return(CreateClient(binding, serviceUrlAppSettingsKey, Credentials));
        }