IReferenceService Interface

 

Provides an interface for obtaining references to objects within a project by name or type, obtaining the name of a specified object, and for locating the parent of a specified object within a designer project.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

type IReferenceService = interface end

NameDescription
System_CAPS_pubmethodGetComponent(Object)

Gets the component that contains the specified component.

System_CAPS_pubmethodGetName(Object)

Gets the name of the specified component.

System_CAPS_pubmethodGetReference(String)

Gets a reference to the component whose name matches the specified name.

System_CAPS_pubmethodGetReferences()

Gets all available references to project components.

System_CAPS_pubmethodGetReferences(Type)

Gets all available references to components of the specified type.

The IReferenceService interface provides the following methods:

  • The GetReference method returns the component with the specified name, or null if no component with the specified name was found.

  • The GetName method returns the name associated with the specified component.

  • The GetComponent method returns the parent container of the specified component.

  • The GetReferences method returns an array of references to all project components, or all project components of an optionally specified type.

The following example control uses the GetReferences method of the IReferenceService interface to obtain a list of components in the current design mode project of the type of the currently selected component.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: