Поделиться через


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.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Декларация
Public Overridable Function QueryInvalidEncoding ( _
    format As __VSTFF, _
    <OutAttribute> ByRef errorMessage As String _
) As Boolean
public virtual bool QueryInvalidEncoding(
    __VSTFF format,
    out string errorMessage
)

Parameters

  • 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

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace