internal StreamingConnection(StreamingCore core, CredentialProvider provider, HttpWebRequest usedRequest, Stream strm, int timeoutSec)
 {
     if (core == null)
     {
         throw new ArgumentNullException("core");
     }
     if (provider == null)
     {
         throw new ArgumentNullException("provider");
     }
     if (usedRequest == null)
     {
         throw new ArgumentException("usedRequest");
     }
     if (strm == null)
     {
         throw new ArgumentNullException("strm");
     }
     this.timeoutValue   = timeoutSec;
     this.parentCore     = core;
     this.Provider       = provider;
     this.receiveStream  = strm;
     this.usedRequest    = usedRequest;
     this.streamReceiver = new Thread(StreamingThread);
     this.streamReceiver.Start();
     // タイムアウト用タイマー
     timeoutTimer = new Timer(TimeoutCountUp, null, 1000, 1000);
 }
 internal StreamingConnection(StreamingCore core, CredentialProvider provider, HttpWebRequest usedRequest, Stream strm, int timeoutSec)
 {
     if (core == null)
         throw new ArgumentNullException("core");
     if (provider == null)
         throw new ArgumentNullException("provider");
     if (usedRequest == null)
         throw new ArgumentException("usedRequest");
     if (strm == null)
         throw new ArgumentNullException("strm");
     this.timeoutValue = timeoutSec;
     this.parentCore = core;
     this.Provider = provider;
     this.receiveStream = strm;
     this.usedRequest = usedRequest;
     this.streamReceiver = new Thread(StreamingThread);
     this.streamReceiver.Start();
     // タイムアウト用タイマー
     timeoutTimer = new Timer(TimeoutCountUp, null, 1000, 1000);
 }
 static UserStreamsConnection()
 {
     streamingCore = new StreamingCore();
     streamingCore.OnExceptionThrown += new Action<Exception>(streamingCore_OnExceptionThrown);
     streamingCore.OnDisconnected += new Action<StreamingConnection>(streamingCore_OnDisconnected);
     ThreadHelper.Halt += () =>
     {
         try
         {
             streamingCore.Dispose();
         }
         catch { }
         try
         {
             pumpThread.Abort();
         }
         catch { }
     };
     StartPump();
 }