[This is preliminary documentation and subject to change.]
The ChoonConvert namespace provides interfaces to allow converters to be built that work within chconv and other containers.
To be recognised by chconv a converter must implement IConvertCommon and either IConvertTo or IConvertFrom. It should then be compiled to an assembly which is put in the same folder as the chconv utility.
A utility that needs to call converters should be modelled on chconv. It should discover any assemblies in its directory that support the above interfaces and call methods on these to convert files.
Class | Description |
---|---|
ConvertException |
Exception class to encapsulate exceptions thrown from the API. API apps should catch this exception |
ConvertParam | Conversion parameter for Params. Stores and allows auto-discovery of parameters specific to a converter. |
Interface | Description |
---|---|
IConvertCommon |
Implement this interface in a converter (as well as either IConvertTo or IConvertFrom The properties of this are common to 'from' and 'to' converters |
IConvertFrom |
Implement this in a converter from a non-ChoonML format to ChoonML. The calling application will discover an instance of this (and IConvertCommon) and register that this is a converter. |
IConvertTo |
Implement this in a converter from ChoonML format to a non-ChoonML format. The calling application will discover an instance of this (and IConvertCommon) and register that this is a converter. |