Compartir a través de


IVsProvideTargetedToolboxItems.AddNewTypesForNewFramework Method

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaración
Function AddNewTypesForNewFramework ( _
    szHighestExistingTFMWithSameID As String, _
    szNewTFM As String, _
    pAdder As IVsAddToolboxItems _
) As Integer
'Uso
Dim instance As IVsProvideTargetedToolboxItems
Dim szHighestExistingTFMWithSameID As String
Dim szNewTFM As String
Dim pAdder As IVsAddToolboxItems
Dim returnValue As Integer

returnValue = instance.AddNewTypesForNewFramework(szHighestExistingTFMWithSameID, _
    szNewTFM, pAdder)
int AddNewTypesForNewFramework(
    string szHighestExistingTFMWithSameID,
    string szNewTFM,
    IVsAddToolboxItems pAdder
)
int AddNewTypesForNewFramework(
    [InAttribute] String^ szHighestExistingTFMWithSameID, 
    [InAttribute] String^ szNewTFM, 
    [InAttribute] IVsAddToolboxItems^ pAdder
)
abstract AddNewTypesForNewFramework : 
        szHighestExistingTFMWithSameID:string * 
        szNewTFM:string * 
        pAdder:IVsAddToolboxItems -> int 
function AddNewTypesForNewFramework(
    szHighestExistingTFMWithSameID : String, 
    szNewTFM : String, 
    pAdder : IVsAddToolboxItems
) : int

Parameters

  • szHighestExistingTFMWithSameID
    Type: System.String
    [in] TFM with the same ID.

Return Value

Type: System.Int32

Remarks

This method is called by the toolbox when the active designer belongs to a project targeting a framework which the toolbox has never seen before (ignoring profile differences) and whose version is greater than that of any framework with the same ID that the toolbox has seen before. The toolbox calls on each package identified as an item provider by an existing toolbox. The item should determine the set of new types added between szHighestExistingTFMWithSameID and szNewTFM, and add toolbox items for those types using pAdder. If the toolbox has not yet seen any framework with the same ID as the new framework, szHighestExistingTFMWithSameID will be an empty string.

This method must set the type name and assembly name metadata on the items it adds. It is not necessary to set the item provider GUID, as that will be set automatically.

.NET Framework Security

See Also

Reference

IVsProvideTargetedToolboxItems Interface

IVsProvideTargetedToolboxItems Members

Microsoft.VisualStudio.Shell.Interop Namespace