//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Reflection;
using System.Security.Permissions;
///
///
/// Provides a description
/// of an event.
///
///
[HostProtection(SharedState = true)]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class EventDescriptor : MemberDescriptor {
///
///
/// Initializes a new instance of the class with the
/// specified name and attribute
/// array.
///
///
protected EventDescriptor(string name, Attribute[] attrs)
: base(name, attrs) {
}
///
///
/// Initializes a new instance of the class with the name and attributes in
/// the specified
/// .
///
///
protected EventDescriptor(MemberDescriptor descr)
: base(descr) {
}
///
///
/// Initializes a new instance of the class with
/// the name in the specified and the
/// attributes in both the and the
/// array.
///
///
protected EventDescriptor(MemberDescriptor descr, Attribute[] attrs)
: base(descr, attrs) {
}
///
///
/// When overridden in a derived
/// class,
/// gets the type of the component this event is bound to.
///
///
public abstract Type ComponentType { get; }
///
///
/// When overridden in a derived
/// class, gets the type of delegate for the event.
///
///
public abstract Type EventType { get; }
///
///
/// When overridden in a derived class, gets a value
/// indicating whether the event delegate is a multicast
/// delegate.
///
///
public abstract bool IsMulticast { get; }
///
///
/// When overridden in
/// a derived class,
/// binds the event to the component.
///
///
public abstract void AddEventHandler(object component, Delegate value);
///
///
/// When
/// overridden
/// in a derived class, unbinds the delegate from the
/// component
/// so that the delegate will no
/// longer receive events from the component.
///
///
public abstract void RemoveEventHandler(object component, Delegate value);
}
}