Exemplo n.º 1
0
        public static Type GetProxyType <T>()
        {
            Type             type    = typeof(T);
            HttpProxyBuilder builder = new HttpProxyBuilder(type);

            builder.Build();
            PROXY_TYPES.GetOrAdd(type, builder.proxyType);
            return(builder.proxyType);
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            IClient client = HttpProxyBuilder.GetProxy <IClient>();
            string  result = client.GetBanner(2, 1);

            Console.WriteLine(result);

            Console.WriteLine(new String('-', 20));
            result = client.GetBanner(1, 1);
            Console.WriteLine(result);


            Console.WriteLine(new String('-', 20));
            result = client.GetActivityList(2, 0, 1, 1, 10);
            Console.WriteLine(result);

            Console.ReadKey();
        }