LanguageService.QueryInvalidEncoding Method
Determines if the specified source format is valid or not.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Déclaration
Public Overridable Function QueryInvalidEncoding ( _
format As __VSTFF, _
<OutAttribute> ByRef errorMessage As String _
) As Boolean
'Utilisation
Dim instance As LanguageService
Dim format As __VSTFF
Dim errorMessage As String
Dim returnValue As Boolean
returnValue = instance.QueryInvalidEncoding(format, _
errorMessage)
public virtual bool QueryInvalidEncoding(
__VSTFF format,
out string errorMessage
)
public:
virtual bool QueryInvalidEncoding(
__VSTFF format,
[OutAttribute] String^% errorMessage
)
abstract QueryInvalidEncoding :
format:__VSTFF *
errorMessage:string byref -> bool
override QueryInvalidEncoding :
format:__VSTFF *
errorMessage:string byref -> bool
public function QueryInvalidEncoding(
format : __VSTFF,
errorMessage : String
) : boolean
Parameters
- format
Type: Microsoft.VisualStudio.TextManager.Interop.__VSTFF
[in] The format to test. This is a value from __VSTFF enumeration.
- errorMessage
Type: System.String%
[out] An error string describing why or how the format is invalid. Could be as simple as "The XX format is not supported."
Return Value
Type: System.Boolean
Returns true if the format is not supported by the language service; otherwise, returns false (the format is supported).
Remarks
If you return true to indicate an unsupported format, you must also supply an error message explaining which specific format is unsupported.
The base method always returns false (all encodings are supported) and a null value for errorMessage.
.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.