How application that support plug-in ?

1. application knows some fixed interfaces.
2. plug-in class must implement the fixed interface.
3. using reflection mechanism to dynamic load plug-in.

so, the step:
1. define fixed interface.
2. develope plug-in class  that implement the fixed interface.
3. main application dynamic load the plug-in.

e.g.

Develope Application support plug-in// ---------------- Fixed plugIn Interface--------------------
Develope Application support plug-innamespace PlugIn
}

 

Develope Application support plug-in// ------- PlugIn Module ------------
Develope Application support plug-inusing PlugIn;
Develope Application support plug-in
Develope Application support plug-innamespace PlugInModule
}

 

Develope Application support plug-in// ------------ Main Application ----------
Develope Application support plug-in  private void PlugIn_Click(object sender, EventArgs e)
        }



Develope Application support plug-in

That's all!
Fine Day!

相关文章: