示例#1
0
        public void Load(Application app)
        {
            app.ThrowIfNull("app");

            this.Storage = new PartialStorage(this.GetType().FullName, app.Configuration);

            this.OnLoaded(new PluginEventArgs(app));
        }
示例#2
0
        public void Unload(Application app)
        {
            if(!this.CanUnload(app)) {
                throw new NotImplementedException();
            }

            app.ThrowIfNull("app");

            this.OnUnloaded(new PluginEventArgs(app));

            this.Storage.Dispose();
        }
示例#3
0
 public PluginEventArgs(Application app)
 {
     app.ThrowIfNull("app");
     this.Application = app;
 }
示例#4
0
 public virtual bool CanUnload(Application app)
 {
     return true;
 }