﻿// Decompiled with JetBrains decompiler
// Type: System.Web.UI.WebControls.GridViewPageEventArgs
// Assembly: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// MVID: 7E68A73E-4066-4F24-AB0A-F147209F50EC
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Web.dll

using System;
using System.ComponentModel;
using System.Runtime;

namespace System.Web.UI.WebControls
{
  /// <summary>
  /// Provides data for the <see cref="E:System.Web.UI.WebControls.GridView.PageIndexChanging"/> event.
  /// </summary>
  public class GridViewPageEventArgs : CancelEventArgs
  {
    private int _newPageIndex;

    /// <summary>
    /// Gets or sets the index of the new page to display in the <see cref="T:System.Web.UI.WebControls.GridView"/> control.
    /// </summary>
    /// 
    /// <returns>
    /// The index of the new page to display in the <see cref="T:System.Web.UI.WebControls.GridView"/> control.
    /// </returns>
    /// <exception cref="T:System.ArgumentOutOfRangeException">The <see cref="P:System.Web.UI.WebControls.GridViewPageEventArgs.NewPageIndex"/> property is less than zero.</exception>
    public int NewPageIndex
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this._newPageIndex;
      }
      set
      {
        if (value < 0)
          throw new ArgumentOutOfRangeException("value");
        this._newPageIndex = value;
      }
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.GridViewPageEventArgs"/> class.
    /// </summary>
    /// <param name="newPageIndex">The index of the new page to display. </param>
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    public GridViewPageEventArgs(int newPageIndex)
    {
      this._newPageIndex = newPageIndex;
    }
  }
}
