Autogenerated Services

Overview

The XML configuration file has two elements autoService and autoServiceCustom to configure bindings for interfaces, for which the implementations are auto-generated.

Element autoService allows specifying interface implementation completely in configuration. Element autoServiceCustom allows specifying an implementation of interface IoC.Configuration.ConfigurationFile.ICustomAutoServiceCodeGenerator in child element autoServiceCodeGenerator that generates the implementation of autogenerated interface implementation.

Element autoService is easier to setup, however autoServiceCustom allows more control over the generated implementation. The motivation for adding autoServiceCustom was to provide auto-implemented interface implementations based on C# attributes applied to interfaces and interface methods and properties.

Elements autoService and autoServiceCustom can appear in any order under iocConfiguration/dependencyInjection/autoGeneratedServices and iocConfiguration/pluginsSetup/pluginSetup/dependencyInjection/autoGeneratedServices elements.