Sharpen.ProxySelector.Select C# (CSharp) Method

Select() public method

public Select ( Uri uri ) : Proxy[]
uri System.Uri
return Proxy[]
		public Proxy[] Select (Uri uri)
		{
			// TODO
			return new Proxy [] { new Proxy () };
		}
	}

Usage Example

Example #1
0
		/// <summary>Determine the proxy server (if any) needed to obtain a URL.</summary>
		/// <remarks>Determine the proxy server (if any) needed to obtain a URL.</remarks>
		/// <param name="proxySelector">proxy support for the caller.</param>
		/// <param name="u">location of the server caller wants to talk to.</param>
		/// <returns>proxy to communicate with the supplied URL.</returns>
		/// <exception cref="Sharpen.ConnectException">
		/// the proxy could not be computed as the supplied URL could not
		/// be read. This failure should never occur.
		/// </exception>
		public static Proxy ProxyFor(ProxySelector proxySelector, Uri u)
		{
			try
			{
				return proxySelector.Select(u.ToURI())[0];
			}
			catch (URISyntaxException e)
			{
				ConnectException err;
				err = new ConnectException(MessageFormat.Format(JGitText.Get().cannotDetermineProxyFor
					, u));
				Sharpen.Extensions.InitCause(err, e);
				throw err;
			}
		}