Пример #1
0
 public static HttpProxy GetInstance(int port, Loger loger = null)
 {
     if (HttpProxy.instance == null)
     {
         lock (_syncRoot)
         {
             if (HttpProxy.instance == null)
             {
                 HttpProxy.instance = new HttpProxy(port, loger);
             }
         }
     }
     return HttpProxy.instance;
 }
Пример #2
0
 /// </baseFields>
 /// <constructors>
 private HttpProxy(int port, Loger loger)
 {
     this.port = port;
     this.loger = loger == null ? new Loger() : loger;
     loger.WriteLine("Hello, HttpProxy work in port:"+ port);
 }