Partager via


IVsUserContext.RemoveAttributeIncludeChildren Method

Removes an attribute or keyword from the context bag and from any associated subcontext bags.

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

Syntax

'Déclaration
Function RemoveAttributeIncludeChildren ( _
    szName As String, _
    szValue As String _
) As Integer
'Utilisation
Dim instance As IVsUserContext
Dim szName As String
Dim szValue As String
Dim returnValue As Integer

returnValue = instance.RemoveAttributeIncludeChildren(szName, _
    szValue)
int RemoveAttributeIncludeChildren(
    string szName,
    string szValue
)
int RemoveAttributeIncludeChildren(
    [InAttribute] String^ szName, 
    [InAttribute] String^ szValue
)
abstract RemoveAttributeIncludeChildren : 
        szName:string * 
        szValue:string -> int 
function RemoveAttributeIncludeChildren(
    szName : String, 
    szValue : String
) : int

Parameters

  • szName
    Type: System.String
    [in] Attribute name or keyword. If you are removing an attribute, then specify the name of the attribute. If you are removing a lookup keyword or an F1 keyword, then enter the term keyword.
  • szValue
    Type: System.String
    [in] Attribute or keyword value. If you are removing an attribute, then specify the value of the attribute. If you are removing a lookup keyword or F1 keyword, then enter the actual text of the keyword.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From context.idl:

HRESULT IVsUserContext::RemoveAttributeIncludeChildren(
   [in] LPCOLESTR szName,
   [in] LPCOLESTR szValue
);

Calling IVsUserContext.RemoveAttributeIncludeChildren(szName, nulla null reference (Nothing in Visual Basic)) removes all values for a given attribute from the context bag and any associated subcontext bags. Calling IVsUserContext.RemoveAttributeIncludeChildren(nulla null reference (Nothing in Visual Basic), nulla null reference (Nothing in Visual Basic)) removes all attributes from the context and subcontext bags.

Use the RemoveAttribute method to only remove attributes or keywords from the context bag (that is, excluding the subcontext bag).

.NET Framework Security

See Also

Reference

IVsUserContext Interface

IVsUserContext Members

Microsoft.VisualStudio.Shell.Interop Namespace