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

35 lines
1.5 KiB
C#

//------------------------------------------------------------------------------
// <copyright file="ICancelAddNew.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
/// <devdoc>
/// Interface implemented by a list that allows the addition of a new item
/// to be either cancelled or committed.
///
/// Note: In some scenarios, specifically Windows Forms complex data binding,
/// the list may recieve CancelNew or EndNew calls for items other than the
/// new item. These calls should be ignored, ie. the new item should only be
/// cancelled or committed when that item's index is specified.
/// </devdoc>
public interface ICancelAddNew
{
/// <devdoc>
/// If a new item has been added to the list, and <paramref name="itemIndex"/> is the position of that item,
/// then this method should remove it from the list and cancel the add operation.
/// </devdoc>
void CancelNew(int itemIndex);
/// <devdoc>
/// If a new item has been added to the list, and <paramref name="itemIndex"/> is the position of that item,
/// then this method should leave it in the list and complete the add operation.
/// </devdoc>
void EndNew(int itemIndex);
}
}