//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Security.Permissions;
///
/// Provides data for an event that signals the adding of a new object
/// to a list, allowing any event handler to supply the new object. If
/// no event handler supplies a new object to use, the list should create
/// one itself.
///
[HostProtection(SharedState = true)]
public class AddingNewEventArgs : EventArgs
{
private object newObject = null;
///
/// Initializes a new instance of the class,
/// with no new object defined.
///
public AddingNewEventArgs() : base() {
}
///
/// Initializes a new instance of the class,
/// with the specified object defined as the default new object.
///
public AddingNewEventArgs(object newObject) : base() {
this.newObject = newObject;
}
///
/// Gets or sets the new object that will be added to the list.
///
public object NewObject {
get {
return newObject;
}
set {
newObject = value;
}
}
}
}