/// <summary> /// Register the import export service. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="validator">Validator for the importexport service.</param> /// <param name="isReusable">Whether or not the service is reusable.</param> /// <param name="mappers">The mappers that can be used for importing/exporting the type.</param> public void Register <T>(IValidator validator, bool isReusable, params IMapper <T>[] mappers) where T : class, new() { IImportExportService <T> ioService = new ImportExportService <T>(); ioService.Init(validator, mappers); Register <T>(ioService); }
/// <summary> /// Register the import export service. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="validator">Validator for the importexport service.</param> /// <param name="supportedFormats">Formats supported. e.g. "csv,xml,ini".</param> /// <param name="isReusable">Whether or not the service is reusable.</param> public void Register <T>(IValidator validator, string[] supportedFormats, bool isReusable) where T : class, new() { IImportExportService <T> ioService = new ImportExportService <T>(); ioService.Init(validator, supportedFormats); Register <T>(ioService); }