Load setting in DependencyRegister file

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I want to load setting on DependencyRegister file in plugin.
it was working in older version, but not working in nopCommerce 4.10.

There is any other way to inject EngineContext in DependencyRegister file.

Any help will be appreciated.

Thank You
5 years ago
rajupaladiya wrote:
I want to load setting on DependencyRegister file in plugin.
it was working in older version, but not working in nopCommerce 4.10.

There is any other way to inject EngineContext in DependencyRegister file.

Any help will be appreciated.

Thank You


Hello raju

there is another way to using ITypeFinder but here in this get the System.MissingMethodException: 'No parameterless constructor defined for this object.' error.


var types = typeFinder.FindClassesOfType<ISettingService>(true);

if (types.Count() == 1)
{
   var _settingService = Activator.CreateInstance(types.First()) as ISettingService;
   var pluginSettings = _settingService.LoadSetting<PluginSettings>();
}

if you will get any solution then post here...
Thank you in advance
5 years ago
Hi Sagar,
I go thorugh this forum post. I'll check and update you this is working or not.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.