次の方法で共有


ProvideLanguageServiceAttribute.EnableAsyncCompletion Property

Definition

Determines whether the language supports background parsing.

public:
 property bool EnableAsyncCompletion { bool get(); void set(bool value); };
public:
 property bool EnableAsyncCompletion { bool get(); void set(bool value); };
public bool EnableAsyncCompletion { get; set; }
member this.EnableAsyncCompletion : bool with get, set
Public Property EnableAsyncCompletion As Boolean

Property Value

Returns true if background parsing is allowed; otherwise, returns false.

Examples

[ProvideLanguageService(typeof(MyLanguageService),           // Required  
                        MyConstants.languageName,            // Required  
                        MyConstants.languageNameResourceID,  // Required  
    // Optional language service properties  
    EnableAsyncCompletion = true,  // Background parsing supported  
                       )]  

Remarks

Whenever a completion list needs to be displayed, a parsing operation is started to determine what goes in the completion list. To maintain the responsiveness of the user interface, the parsing operation should be performed on a background thread. If a language service supports background parsing, set the EnableAsyncCompletion property to true.

Note

The managed package framework (MPF) examines this property anytime it starts a potentially lengthy parse and not just for completion lists.

This property is specific to the managed package framework (MPF).

The default is true when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\  
  [Language Name]\  
    EnableAsyncCompletion = reg_dword: 0x00000001  

Applies to