ProvideLanguageExtensionAttribute ProvideLanguageExtensionAttribute ProvideLanguageExtensionAttribute Constructors

Definition

Overloads

ProvideLanguageExtensionAttribute(String, String) ProvideLanguageExtensionAttribute(String, String) ProvideLanguageExtensionAttribute(String, String)

Initializes a new instance of the ProvideLanguageExtensionAttribute attribute, using the specified language service GUID.

ProvideLanguageExtensionAttribute(Type, String) ProvideLanguageExtensionAttribute(Type, String) ProvideLanguageExtensionAttribute(Type, String)

Initializes a new instance of the ProvideLanguageExtensionAttribute attribute, using the type of your language service class.

Remarks

These constructors are used to specify the language service GUID and the file extension.

ProvideLanguageExtensionAttribute(String, String) ProvideLanguageExtensionAttribute(String, String) ProvideLanguageExtensionAttribute(String, String)

Initializes a new instance of the ProvideLanguageExtensionAttribute attribute, using the specified language service GUID.

public ProvideLanguageExtensionAttribute (string languageServiceGuid, string extension);
new Microsoft.VisualStudio.Shell.ProvideLanguageExtensionAttribute : string * string -> Microsoft.VisualStudio.Shell.ProvideLanguageExtensionAttribute
Public Sub New (languageServiceGuid As String, extension As String)
Parameters
languageServiceGuid
String String String

[in] A string containing the GUID of the language service.

extension
String String String

[in] A string containing the file extension to associate with the language service.

Examples

using Microsoft.VisualStudio.Shell;  

namespace MyLanguagePackage  
{  
    [ProvideLanguageExtension("{B614A40A-80D9-4FAC-A6AD-FC2868FFF7CD}", ".myext")]  
    public class MyLanguagePackage : Package  
    {  
    }  
}  

Remarks

The format of the GUID string is "{B614A40A-80D9-4FAC-A6AD-FC2868FFF7CD}", substituting your own language service's GUID value for the one shown.

The file extension should always have the leading period.

ProvideLanguageExtensionAttribute(Type, String) ProvideLanguageExtensionAttribute(Type, String) ProvideLanguageExtensionAttribute(Type, String)

Initializes a new instance of the ProvideLanguageExtensionAttribute attribute, using the type of your language service class.

public ProvideLanguageExtensionAttribute (Type languageService, string extension);
new Microsoft.VisualStudio.Shell.ProvideLanguageExtensionAttribute : Type * string -> Microsoft.VisualStudio.Shell.ProvideLanguageExtensionAttribute
Public Sub New (languageService As Type, extension As String)
Parameters
languageService
Type Type Type

[in] The type of the language service class.

extension
String String String

[in] A string containing the file extension to associate with the language service.

Examples

using Microsoft.VisualStudio.Shell;  

namespace MyLanguagePackage  
{  
    [ProvideLanguageExtension(typeof(MyLanguageService), ".myext")]  
    public class MyLanguagePackage : Package  
    {  
    }  
}  

Remarks

Use the typeof operator to get the type of your language class. The following example shows how this operator is used.

The file extension should always have the leading period.

Applies to