Click here to Skip to main content
12,401,832 members (61,406 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads

Stats

365.1K views
14.1K downloads
255 bookmarked
Posted

Plugin Architecture using C#

, 3 Aug 2003 CPOL
How to make plugins to work with .NET
Dynamic.dll
PluginWindowTest.exe
Dynamic2.exe
Dynamic2.dll
PlugIn.dll
DynamicWnd
App.ico
DynamicWnd.csproj.user
obj
Debug
TempPE
temp
bin
Debug
Dynamic2
App.ico
Dynamic2.csproj.user
obj
Debug
TempPE
temp
bin
Debug
Dynamic
App.ico
Dynamic.csproj.user
obj
Debug
TempPE
temp
bin
Debug
PlugIn
PlugIn.csproj.user
obj
Debug
TempPE
temp
bin
Debug
PlugInTest
App.ico
PlugInTest.csproj.user
obj
Debug
TempPE
temp
bin
Debug
PluginWindowTest
App.ico
PluginWindowTest.csproj.user
obj
Debug
TempPE
temp
bin
Debug
using System;
using PlugIn;

namespace Dynamic
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class PlugIn : IPlugin
	{
		private string m_strName;
		private IPluginHost m_Host;
		
		public PlugIn()
		{
			m_strName = "Dynamic";
		}
		
		public Int32 Add(Int32 a, Int32 b)
		{return a + b;}
		
		public string Name
		{get{return m_strName;}set{m_strName=value;}}
		
		public void Show()
		{ 
			Main1 mn = new Main1();
			mn.ShowDialog();
		}

		public IPluginHost Host
		{
			get{return m_Host;}
			set
			{
				m_Host=value;
				m_Host.Register(this);
			}
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

shokisingh
Team Leader
India India
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 4 Aug 2003
Article Copyright 2003 by shokisingh
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid