Partilhar via


ProvideLanguageExtensionAttribute Constructor (String, String)

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

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

Syntax

'Declaração
Public Sub New ( _
    languageServiceGuid As String, _
    extension As String _
)
public ProvideLanguageExtensionAttribute(
    string languageServiceGuid,
    string extension
)

Parameters

  • languageServiceGuid
    Type: System.String
    [in] A string containing the GUID of the language service.
  • extension
    Type: System.String
    [in] A string containing the file extension to associate with the language service.

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.

Examples

using Microsoft.VisualStudio.Shell;

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

.NET Framework Security

See Also

Reference

ProvideLanguageExtensionAttribute Class

ProvideLanguageExtensionAttribute Overload

Microsoft.VisualStudio.Shell Namespace