Condividi tramite


CodeDomEventBindingService.ShowCode Method (IComponent, EventDescriptor, String)

Shows the body of the user code with the given method name and event descriptor.

Namespace:  Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Dichiarazione
Protected Overrides Function ShowCode ( _
    component As IComponent, _
    e As EventDescriptor, _
    methodName As String _
) As Boolean
'Utilizzo
Dim component As IComponent
Dim e As EventDescriptor
Dim methodName As String
Dim returnValue As Boolean

returnValue = Me.ShowCode(component, _
    e, methodName)
protected override bool ShowCode(
    IComponent component,
    EventDescriptor e,
    string methodName
)
protected:
virtual bool ShowCode(
    IComponent^ component, 
    EventDescriptor^ e, 
    String^ methodName
) override
abstract ShowCode : 
        component:IComponent * 
        e:EventDescriptor * 
        methodName:string -> bool 
override ShowCode : 
        component:IComponent * 
        e:EventDescriptor * 
        methodName:string -> bool 
protected override function ShowCode(
    component : IComponent, 
    e : EventDescriptor, 
    methodName : String
) : boolean

Parameters

Return Value

Type: System.Boolean
true if it was possible to open the editor window, otherwise false.

Remarks

This method first calculates the line number of the method by inspecting the code DOM's LinePragma and UserData properties, and then navigates to the line using the Visual Studio text manager.

.NET Framework Security

See Also

Reference

CodeDomEventBindingService Class

CodeDomEventBindingService Members

ShowCode Overload

Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom Namespace