forked from yavordimitrov/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevToolsPlugin.cs
More file actions
46 lines (40 loc) · 1.37 KB
/
Copy pathDevToolsPlugin.cs
File metadata and controls
46 lines (40 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Linq;
using System.Web.Routing;
using SmartStore.Core.Logging;
using SmartStore.Core.Plugins;
using SmartStore.Services.Common;
using SmartStore.Services.Configuration;
namespace SmartStore.DevTools
{
public class DevToolsPlugin : BasePlugin, IConfigurable
{
private readonly ISettingService _settingService;
public DevToolsPlugin(ISettingService settingService)
{
this._settingService = settingService;
this.Logger = NullLogger.Instance;
}
public ILogger Logger { get; set; }
public void GetConfigurationRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues)
{
actionName = "Configure";
controllerName = "DevTools";
routeValues = new RouteValueDictionary() { { "area", "SmartStore.DevTools" } };
}
public override void Install()
{
_settingService.SaveSetting(new ProfilerSettings());
base.Install();
Logger.Information(string.Format("Plugin installed: SystemName: {0}, Version: {1}, Description: '{2}'", PluginDescriptor.SystemName, PluginDescriptor.Version, PluginDescriptor.FriendlyName));
}
/// <summary>
/// Uninstall plugin
/// </summary>
public override void Uninstall()
{
_settingService.DeleteSetting<ProfilerSettings>();
base.Uninstall();
}
}
}