LanguageService.MainThreadId Property
Returns the id of the thread this language service is running on.
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)
Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'Declaration
Public ReadOnly Property MainThreadId As Integer
public int MainThreadId { get; }
public:
property int MainThreadId {
int get ();
}
member MainThreadId : int with get
function get MainThreadId () : int
Property Value
Type: Int32
Returns a thread id.
Remarks
The thread id is initialized when the LanguageService is constructed. Use this method if you need to know the ID of the thread the language service is running in.
.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.