Udostępnij za pośrednictwem


ProvideLanguageCodeExpansionAttribute.SearchPaths Property

Definition

Gets or sets a semicolon-delimited string containing the default paths to search for snippets.

public:
 property System::String ^ SearchPaths { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ SearchPaths { Platform::String ^ get(); void set(Platform::String ^ value); };
public string SearchPaths { get; set; }
member this.SearchPaths : string with get, set
Public Property SearchPaths As String

Property Value

Returns a semicolon-delimited string containing the paths to search for snippets.

Examples

[ProvideCodeExpansion(typeof(MyLanguageService),            // Required  
                        MyConstants.languageName,           // Required  
                        MyConstants.languageNameResourceID, // Required  
                        MyConstants.languageIdentifier,     // Required  
                        MyConstants.snippetsIndexFilePath,  // Required  
    // Optional code expansion properties  
    SearchPaths = @"%InstallRoot%\MyLanguage\Snippets\%LCID%\Snippets;" +  
                  @"\%MyDocs%\Code Snippets\MyLanguage\My Code Snippets";  
                     )]  

Remarks

The paths specified by this option are a semi-colon-delimited list and are used to look for snippets if the index file cannot be found. The search paths can contain certain substitution variables; see Support for Code Snippets in a Legacy Language Service for details.

This property is available to any language service implementation.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\CodeExpansions\  
  [Language Name]\  
    Paths\  
      (Default)       = reg_sz:  
      [Language Name] = reg_sz: [SearchPaths]  

Applies to