ProvideLanguageExtensionAttribute Constructor (String, String)
Initializes a new instance of the ProvideLanguageExtensionAttribute attribute, using the specified language service GUID.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
声明
Public Sub New ( _
languageServiceGuid As String, _
extension As String _
)
用法
Dim languageServiceGuid As String
Dim extension As String
Dim instance As New ProvideLanguageExtensionAttribute(languageServiceGuid, _
extension)
public ProvideLanguageExtensionAttribute(
string languageServiceGuid,
string extension
)
public:
ProvideLanguageExtensionAttribute(
String^ languageServiceGuid,
String^ extension
)
new :
languageServiceGuid:string *
extension:string -> ProvideLanguageExtensionAttribute
public function ProvideLanguageExtensionAttribute(
languageServiceGuid : String,
extension : String
)
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
ProvideLanguageExtensionAttribute Members