다음을 통해 공유


Source.SetUserData Method

Sets the given user data property to the given value.

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

Syntax

‘선언
Public Sub SetUserData ( _
    ByRef key As Guid, _
    data As Object _
)
‘사용 방법
Dim instance As Source
Dim key As Guid
Dim data As Object

instance.SetUserData(key, data)
public void SetUserData(
    ref Guid key,
    Object data
)
public:
void SetUserData(
    Guid% key, 
    Object^ data
)
member SetUserData : 
        key:Guid byref * 
        data:Object -> unit 
public function SetUserData(
    key : Guid, 
    data : Object
)

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

Source Members

Microsoft.VisualStudio.Package Namespace