ProvideLanguageExtensionAttribute Constructor (Type^, String^)

 

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

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
ProvideLanguageExtensionAttribute(
	Type^ languageService,
	String^ extension
)

Parameters

languageService
Type: System::Type^

[in] The type of the language service class.

extension
Type: System::String^

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

Use the typeof (C# Reference) 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.

using Microsoft.VisualStudio.Shell;

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