CmisSync.Lib.Streams.BandwidthNotifyingStream.BandwidthNotifyingStream C# (CSharp) Méthode

BandwidthNotifyingStream() public méthode

public BandwidthNotifyingStream ( Stream s ) : System
s Stream
Résultat System
        public BandwidthNotifyingStream(Stream s) : base(s) {
            this.blockingDetectionTimer = new Timer(2000);
            this.blockingDetectionTimer.Elapsed += delegate(object sender, ElapsedEventArgs args) {
                this.BitsPerSecond = (long)((this.bytesTransmittedSinceLastSecond * 8) / this.blockingDetectionTimer.Interval);
                this.bytesTransmittedSinceLastSecond = 0;
            };
            this.blockingDetectionTimer.Start();
        }