Partager via


IVsUserData Interface

Definition

Allows a caller to use a GUID to set or get user data (properties).

public interface class IVsUserData
public interface class IVsUserData
__interface IVsUserData
[System.Runtime.InteropServices.Guid("978A8E17-4DF8-432A-9623-D530A26452BC")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsUserData
[System.Runtime.InteropServices.Guid("978A8E17-4DF8-432A-9623-D530A26452BC")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsUserData
[<System.Runtime.InteropServices.Guid("978A8E17-4DF8-432A-9623-D530A26452BC")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsUserData = interface
[<System.Runtime.InteropServices.Guid("978A8E17-4DF8-432A-9623-D530A26452BC")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsUserData = interface
Public Interface IVsUserData
Derived
Attributes

Remarks

The IVsUserData interface is a generic grouping of properties, the most important of which is the buffer's moniker. This interface is used to set or retrieve properties (data) from the buffer. A GUID indexes the properties, which are then returned in a VARIANT.

Using IVsUserData is not a particularly efficient way to get and set user data. For quick access (idle time, loops, time-critical code, and so on), it is recommended that you cache the data instead.

Notes to Implementers

Implement in cases where text buffer objects need to get or set user data.

Methods

GetData(Guid, Object)

Returns user data from a buffer.

SetData(Guid, Object)

Sets user data to a buffer.

Applies to