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
'Dichiarazione
Public Sub SetUserData ( _
ByRef key As Guid, _
data As Object _
)
'Utilizzo
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.