-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathPluginBase.cs
More file actions
50 lines (42 loc) · 1.68 KB
/
PluginBase.cs
File metadata and controls
50 lines (42 loc) · 1.68 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
47
48
49
/***************************************************************************
*
* $Author: Turley
*
* "THE BEER-WARE LICENSE"
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
*
***************************************************************************/
using System.Windows.Forms;
using Microsoft.Extensions.Logging;
using UoFiddler.Controls.Classes;
using UoFiddler.Controls.Plugin.Interfaces;
namespace UoFiddler.Controls.Plugin
{
public abstract class PluginBase
{
public abstract IPluginHost Host { get; set; }
public abstract string Name { get; }
public abstract string Description { get; }
public abstract string Author { get; }
public abstract string Version { get; }
/// <summary>
/// Per-plugin logger, categorized by the concrete plugin type. Resolved on demand
/// since plugins are instantiated via Activator and cannot take constructor parameters.
/// </summary>
protected ILogger Logger => AppLog.For(GetType());
public abstract void Initialize();
public abstract void Unload();
/// <summary>
/// On Startup called to modify the Plugin ToolStripDropDownButton
/// </summary>
/// <param name="toolStrip"></param>
public virtual void ModifyPluginToolStrip(ToolStripDropDownButton toolStrip) { }
/// <summary>
/// On Startup called to modify the tab pages
/// </summary>
/// <param name="tabControl"></param>
public virtual void ModifyTabPages(TabControl tabControl) { }
}
}