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
'宣告
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProvideLanguageExtensionAttribute Class