コード例 #1
0
 protected virtual void OnBytesMoved(int bytesMoved, bool isRead)
 {
     if (BytesMoved != null)
     {
         var args = new ProgressStreamReportEventArgs(bytesMoved, innerStream.Length, innerStream.Position, isRead);
         BytesMoved(this, args);
     }
 }
コード例 #2
0
 protected virtual void OnBytesWritten(int bytesMoved)
 {
     if (BytesWritten != null)
     {
         var args = new ProgressStreamReportEventArgs(bytesMoved, innerStream.Length, innerStream.Position, false);
         BytesWritten(this, args);
     }
 }
コード例 #3
0
ファイル: FileUploader.cs プロジェクト: sunal/Unity-Csharp
 private void BytesReadCallback(object sender, ProgressStreamReportEventArgs args)
 {
     Progress = (double)args.StreamPosition / args.StreamLength;
 }