예제 #1
0
        public TallyKeepingStream(Stream innerStream, bool ownStream)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.innerStream = innerStream;
            this.ownStream   = ownStream;
            bool flag = false;

            this.readTimer  = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.writeTimer = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
        }
예제 #2
0
        public MD5ReaderStream(Stream innerStream, long streamLength, bool ownStream, RequestContext requestContext)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.md5          = MD5.Create();
            this.innerStream  = innerStream;
            this.ownStream    = ownStream;
            this.streamLength = streamLength;
            bool flag = false;

            this.readTimer      = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.requestContext = requestContext;
        }
예제 #3
0
        public CrcReaderStream(Stream innerStream, bool ownStream, int maxCrcRangeSize, long destinationOffset, long streamLength, RequestContext requestContext)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.maxCrcRangeSize = maxCrcRangeSize;
            this.innerStream     = innerStream;
            this.ownStream       = ownStream;
            this.pageOffset      = (int)(destinationOffset % (long)512);
            bool flag = false;

            this.crcCalcuationTimer = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.streamLength       = streamLength;
            this.requestContext     = requestContext;
        }
예제 #4
0
        public OperationStatus()
        {
            bool flag = false;

            this.tsTimeTrackingStopWatch = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
        }
예제 #5
0
 public void SetElapsedTime(TimeSpan elapsedTime)
 {
     this.OperationStartTime = DateTime.UtcNow - elapsedTime;
     this.duration           = PerfTimerFactory.CreateTimer(false, elapsedTime);
     this.duration.Start();
 }