﻿// Decompiled with JetBrains decompiler
// Type: System.Net.UploadProgressChangedEventArgs
// Assembly: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 5ABD58FD-DF31-44FD-A492-63F2B47CC9AF
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll

using System.ComponentModel;
using System.Runtime;

namespace System.Net
{
  /// <summary>
  /// Provides data for the <see cref="E:System.Net.WebClient.UploadProgressChanged"/> event of a <see cref="T:System.Net.WebClient"/>.
  /// </summary>
  public class UploadProgressChangedEventArgs : ProgressChangedEventArgs
  {
    private long m_BytesReceived;
    private long m_TotalBytesToReceive;
    private long m_BytesSent;
    private long m_TotalBytesToSend;

    /// <summary>
    /// Gets the number of bytes received.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.Int64"/> value that indicates the number of bytes received.
    /// </returns>
    public long BytesReceived
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.m_BytesReceived;
      }
    }

    /// <summary>
    /// Gets the total number of bytes in a <see cref="T:System.Net.WebClient"/> data upload operation.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.Int64"/> value that indicates the number of bytes that will be received.
    /// </returns>
    public long TotalBytesToReceive
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.m_TotalBytesToReceive;
      }
    }

    /// <summary>
    /// Gets the number of bytes sent.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.Int64"/> value that indicates the number of bytes sent.
    /// </returns>
    public long BytesSent
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.m_BytesSent;
      }
    }

    /// <summary>
    /// Gets the total number of bytes to send.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.Int64"/> value that indicates the number of bytes that will be sent.
    /// </returns>
    public long TotalBytesToSend
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.m_TotalBytesToSend;
      }
    }

    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    internal UploadProgressChangedEventArgs(int progressPercentage, object userToken, long bytesSent, long totalBytesToSend, long bytesReceived, long totalBytesToReceive)
      : base(progressPercentage, userToken)
    {
      this.m_BytesReceived = bytesReceived;
      this.m_TotalBytesToReceive = totalBytesToReceive;
      this.m_BytesSent = bytesSent;
      this.m_TotalBytesToSend = totalBytesToSend;
    }
  }
}
