コード例 #1
0
 public static SingletonHttpClient GetInstance()
 {
     if (instance == null)
     {
         handler = new HttpClientHandler()
         {
             CookieContainer = new CookieContainer(), UseProxy = false
         };
         instance = new SingletonHttpClient(handler);
     }
     return(instance);
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Synthesize"/> class.
        /// </summary>
        public Synthesize()
        {
            var cookieContainer = new CookieContainer();

            client = SingletonHttpClient.GetInstance();
        }