projects
/
WebThing.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
924fc4d
)
Flesh out life cycle of a plugin
author
Chip Black
<bytex64@bytex64.net>
Mon, 8 Jun 2009 08:13:04 +0000
(
03:13
-0500)
committer
Chip Black
<bytex64@bytex64.net>
Mon, 8 Jun 2009 08:16:54 +0000
(
03:16
-0500)
WebThingPlugin.cs
patch
|
blob
|
history
diff --git
a/WebThingPlugin.cs
b/WebThingPlugin.cs
index
56caa4c
..
6ad3e9d
100644
(file)
--- a/
WebThingPlugin.cs
+++ b/
WebThingPlugin.cs
@@
-9,13
+9,20
@@
namespace bytex64.WebThing {
public WebThingPlugin() {
string classname = this.GetType().FullName;
public WebThingPlugin() {
string classname = this.GetType().FullName;
- if (Config.PluginOptions.ContainsKey(classname))
+ if (Config.PluginOptions.ContainsKey(classname))
{
Options = Config.PluginOptions[classname];
Options = Config.PluginOptions[classname];
- else
+ } else {
Options = new Dictionary<string,string>();
Options = new Dictionary<string,string>();
+ Config.PluginOptions[classname] = Options;
+ }
}
}
+ // Plugin life cycle
public virtual void Init(WebThing wt) {}
public virtual void Init(WebThing wt) {}
+ public virtual void Deinit(WebThing wt) {}
+
+ // WebView life cycle
public virtual void InitWebView(WebView wv) {}
public virtual void InitWebView(WebView wv) {}
+ public virtual void DeinitWebView(WebView wv) {}
}
}
}
}