Debian Codegraph @

docs/samples/dotnet/proxy.cs

raw
1 /*******************************************************************************
2 * libproxy - A library for proxy configuration
3 * Copyright (C) 2009 Dominique Leuenberger <[email protected]>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 ******************************************************************************/
19
20 using System;
21 using libproxy;
22
23 public class proxy {
24 public static int Main (string[] args)
25 {
26 if (args.Length > 0) {
27 ProxyFactory pf = new ProxyFactory();
28 string[] Proxies = pf.GetProxies(args[0]);
29 Console.WriteLine(Proxies[0]);
30 pf = null;
31 return 0;
32 } else {
33 Console.WriteLine("Please start the program with one parameter");
34 Console.WriteLine("Example: proxy.exe http://libproxy.googlecode.com/");
35 return 1;
36 }
37 }
38 }