Skip to content

Commit

Permalink
Remove AdvancedConfig - move InstalledPlugins to the ExtensionsConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Jul 24, 2023
1 parent de93e99 commit 946eb0d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
7 changes: 0 additions & 7 deletions src/Core/Grand.Infrastructure/Configuration/AdvancedConfig.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ public class ExtensionsConfig
/// </summary>
public bool UseRoslynScripts { get; set; }

/// <summary>
///List of installed plugins (comma separated)
/// </summary>
public string InstalledPlugins { get; set; }
}
}
7 changes: 2 additions & 5 deletions src/Core/Grand.Infrastructure/Plugins/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ public static void Load(IMvcCoreBuilder mvcCoreBuilder, IConfiguration configura
{
_config = new ExtensionsConfig();
configuration.GetSection("Extensions").Bind(_config);

var advConfig = new AdvancedConfig();
configuration.GetSection("Advanced").Bind(advConfig);


lock (_synLock)
{
if (mvcCoreBuilder == null)
Expand All @@ -64,7 +61,7 @@ public static void Load(IMvcCoreBuilder mvcCoreBuilder, IConfiguration configura
try
{
var installedPluginSystemNames =
!string.IsNullOrEmpty(advConfig.InstalledPlugins) ? advConfig.InstalledPlugins.Split(",").Select(x=>x.Trim()) :
!string.IsNullOrEmpty(_config.InstalledPlugins) ? _config.InstalledPlugins.Split(",").Select(x=>x.Trim()) :
PluginExtensions.ParseInstalledPluginsFile(CommonPath.InstalledPluginsFilePath);

Log.Information("Creating shadow copy folder and querying for dlls");
Expand Down
11 changes: 5 additions & 6 deletions src/Web/Grand.Web/App_Data/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@
"ClearPluginShadowDirectoryOnStartup": true,

//For develop you should enable if you want to copy plugin dll files to directory /Plugins/bin on application startup
"PluginShadowCopy": true
"PluginShadowCopy": true,

//separator comma
"InstalledPlugins": ""
},

"Performance": {
Expand Down Expand Up @@ -244,11 +247,7 @@
},
"UseSwagger": false,
//Settings only for advanced users
"Advanced": {
//separator comma
"InstalledPlugins": ""
},


"Serilog": {
"Using": [ "Serilog.Sinks.File" ]
//,
Expand Down

0 comments on commit 946eb0d

Please sign in to comment.