Udostępnij za pośrednictwem


LanguageService.QueryInvalidEncoding(__VSTFF, String) Method

Definition

Determines if the specified source format is valid or not.

public:
 virtual bool QueryInvalidEncoding(Microsoft::VisualStudio::TextManager::Interop::__VSTFF format, [Runtime::InteropServices::Out] System::String ^ % errorMessage);
 virtual bool QueryInvalidEncoding(Microsoft::VisualStudio::TextManager::Interop::__VSTFF format, [Runtime::InteropServices::Out] std::wstring const & & errorMessage);
public virtual bool QueryInvalidEncoding (Microsoft.VisualStudio.TextManager.Interop.__VSTFF format, out string errorMessage);
abstract member QueryInvalidEncoding : Microsoft.VisualStudio.TextManager.Interop.__VSTFF * string -> bool
override this.QueryInvalidEncoding : Microsoft.VisualStudio.TextManager.Interop.__VSTFF * string -> bool
Public Overridable Function QueryInvalidEncoding (format As __VSTFF, ByRef errorMessage As String) As Boolean

Parameters

format
__VSTFF

[in] The format to test. This is a value from __VSTFF enumeration.

errorMessage
String

[out] An error string describing why or how the format is invalid. Could be as simple as "The XX format is not supported."

Returns

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.

Applies to