| Visual Basic (Declaration) | |
|---|---|
Public Interface ConverterListener | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public interface ConverterListener | |
| Managed Extensions for C++ | |
|---|---|
public __gc __interface ConverterListener | |
| C++/CLI | |
|---|---|
public interface class ConverterListener | |
If an XML Converter application needs to implement customized error handling then it may implement this interface and register it with the Converter object. This may be done either by assigning a ConverterListener to the ConverterFactory in which case all Converters created from that ConverterFactory will share the same instance, or afterwards to an individual Converter, ConvertToXml or ConvertFromXml object.
using DDTek.XmlConverter;
namespace Custom {
class ReportingListener : ConverterListener {
public void Warning(ConverterException exception) {
Console.WriteLine(exception.Message);
}
public void Error(ConverterException exception) {
Console.WriteLine(exception.Message);
}
public void FatalError(ConverterException exception) {
Console.WriteLine(exception.Message);
}
}
}
Currently, only the EDI converter supports the ConverterListener. If an application registers a ConverterListener with any converter other than an EDI converter, then it will be ignored.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family