Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

58 lines
1.7 KiB
C#

//------------------------------------------------------------------------------
// <copyright file="ListViewDataItem.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Web;
using System.Web.UI;
namespace System.Web.UI.WebControls {
public class ListViewDataItem : ListViewItem {
private int _dataItemIndex;
private int _displayIndex;
private object _dataItem;
public ListViewDataItem(int dataItemIndex, int displayIndex)
: base(ListViewItemType.DataItem) {
_dataItemIndex = dataItemIndex;
_displayIndex = displayIndex;
}
public override object DataItem {
get {
return _dataItem;
}
set {
_dataItem = value;
}
}
public override int DataItemIndex {
get {
return _dataItemIndex;
}
}
public override int DisplayIndex {
get {
return _displayIndex;
}
}
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "1#")]
protected override bool OnBubbleEvent(object source, EventArgs e) {
if (e is CommandEventArgs) {
ListViewCommandEventArgs args = new ListViewCommandEventArgs(this, source, (CommandEventArgs)e);
RaiseBubbleEvent(this, args);
return true;
}
return false;
}
}
}