//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.ComponentModel.Design {
using System;
using System.Collections;
using System.ComponentModel;
using Microsoft.Win32;
///
/// Provides a set of useful methods for binding objects to user code.
///
[System.Runtime.InteropServices.ComVisible(true)]
public interface IEventBindingService {
///
/// This creates a name for an event handling method for the given component
/// and event. The name that is created is guaranteed to be unique in the user's source
/// code.
///
string CreateUniqueMethodName(IComponent component, EventDescriptor e);
///
/// Retrieves a collection of strings. Each string is the name of a method
/// in user code that has a signature that is compatible with the given event.
///
ICollection GetCompatibleMethods(EventDescriptor e);
///
/// For properties that are representing events, this will return the event
/// that the property represents.
///
EventDescriptor GetEvent(PropertyDescriptor property);
///
/// Converts a set of event descriptors to a set of property descriptors.
///
PropertyDescriptorCollection GetEventProperties(EventDescriptorCollection events);
///
///
/// Converts a single event to a property.
///
///
PropertyDescriptor GetEventProperty(EventDescriptor e);
///
/// Displays the user code for the designer. This will return true if the user
/// code could be displayed, or false otherwise.
///
bool ShowCode();
///
/// Displays the user code for the designer. This will return true if the user
/// code could be displayed, or false otherwise.
///
bool ShowCode(int lineNumber);
///
/// Displays the user code for the given event. This will return true if the user
/// code could be displayed, or false otherwise.
///
bool ShowCode(IComponent component, EventDescriptor e);
}
}