Registration of the BO Classes

By default, Xafari uses reflection to find all classes of the Business Operations and Implementations in all modules referenced by the app.However, the developer has the ability to register these classes in the custom module explicitly. This way helps to optimize the initialization time because it does not use reflection to find the necessary classes.

To declare the Business Operations and Implementations explicitly, there is the important requirement the module class must satisfy: it should implement ITypesProvider<IBusinessOperation> and ITypesProvider<IOperationService> interfaces. ITypesProvider<T> interface declares GetTypes() method which returns IEnumerable<Type> collection. Each returned type is a heir of the Type specified as a generic argument. The code snippet below shows the explicid declaratiom of the Business Operations and Implementation.