Compartir a través de


Source.SetUserData Method

Sets the given user data property to the given value.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Declaración
Public Sub SetUserData ( _
    ByRef key As Guid, _
    data As Object _
)
public void SetUserData(
    ref Guid key,
    Object data
)

Parameters

  • key
    Type: System.Guid%
    The GUID of the user data property to set the value for.
  • data
    Type: System.Object
    An object representing the value to set.

Remarks

This method obtains the IVsUserData interface from the IVsTextLines object (which was passed to the Source class constructor), and then calls the SetData method with the given GUID and value.

See the GetUserData method for the GUIDs that are supported.

.NET Framework Security

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace