Friends, maybe someone knows good references for .NET plugin based program
architecture. E.g I want to be able to "put" class library(dll) in some
place (where I do not the name of the class, but only structure [maybe
abstract???]) and use it "plug-and-play" in main procedure without
recompilation
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us " 5 3038
Hi Tamir,
From my understanding, plugin based architecture always involves a plugin
host which is always an executable file (exe) and not dll. Ok, maybe i don't
get what you meant :(
I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but only structure [maybe abstract???]) and use it "plug-and-play" in main procedure without recompilation
--> ??? confuse a bit
Cheers.
"Tamir Khason" wrote:
Friends, maybe someone knows good references for .NET plugin based program architecture. E.g I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but only structure [maybe abstract???]) and use it "plug-and-play" in main procedure without recompilation
-- Tamir Khason You want dot.NET? Just ask: "Please, www.dotnet.us "
1.Define your Interface
2.Implement this interface in your concrete class
3.Create your host applicatrion and declare avariable of type Interface
4.Use reflection to create the 'Real' object
(you can put the name of the object and the assembly path in the config
file)
5.Use the Interface.
"Tamir Khason" <ta**********@t con-NOSPAM.co.il> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Friends, maybe someone knows good references for .NET plugin based program architecture. E.g I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but only structure [maybe abstract???]) and use it "plug-and-play" in main procedure without recompilation
-- Tamir Khason You want dot.NET? Just ask: "Please, www.dotnet.us "
Tnx
couple of problems with this architecture:
Following:
interface IInterface1
{}
interface IInterface2: Interface1
{}
class MayClass:IInter face2
{}
While doing enumeration thow dlls (public and non abstract) we check for
type of IInterface1 so
Type typeInterface = myType.GetInter face("BaseNames pace.IInterface 1", true);
returns some type (IInterface1). go on:
MyPlugin.Instan ce =
(IInterface1)Ac tivator.CreateI nstance(pluginA ssembly.GetType (pluginType.ToS tring()));
//
returns error Can not cast. Wich means that class(MyClass inherited from
Interface2, wich inherited from interface1 and not be cased to interface1)
Please advice, it looks stupid that class inh from base interface can not be
cased to it.
TNX
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Jonathan Yong" <da*******@some place.com> wrote in message
news:uz******** ******@TK2MSFTN GP09.phx.gbl... Try this two articles:
http://www.codeproject.com/csharp/PluginsInCSharp.asp
http://www.codeproject.com/csharp/plugins.asp
Tamir Khason wrote: Friends, maybe someone knows good references for .NET plugin based program architecture. E.g I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but only structure [maybe abstract???]) and use it "plug-and-play" in main procedure without recompilation
Tamir Khason <ta**********@t con-NOSPAM.co.il> wrote: Tnx couple of problems with this architecture: Following: interface IInterface1 {} interface IInterface2: Interface1 {} class MayClass:IInter face2 {}
While doing enumeration thow dlls (public and non abstract) we check for type of IInterface1 so Type typeInterface = myType.GetInter face("BaseNames pace.IInterface 1", true);
returns some type (IInterface1). go on:
MyPlugin.Instan ce =
(IInterface1)Ac tivator.CreateI nstance(pluginA ssembly.GetType (pluginType.ToS tring())); //
returns error Can not cast. Wich means that class(MyClass inherited from Interface2, wich inherited from interface1 and not be cased to interface1)
Please advice, it looks stupid that class inh from base interface can not be cased to it.
Chances are you've got the problem listed here: http://www.pobox.com/~skeet/csharp/plugin.html
Otherwise, could you post a short but complete program which
demonstrates the problem?
See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: serge calderara |
last post by:
Dear all,
I have a really strange beaviour in my application.
First of all I have a single plugin interface named
IPlugIn which as been build in a separate project library
named PLugin.dll (this contains only the interface)
Then I have a PlugInManager project which has as reference
the library Plugin.dll and implements the IPlugIn
interface. In addition to that PluginManager project has
|
by: Aaron Queenan |
last post by:
COM has many facilities to assist with creating an application with Plugin
support, for example, component categories to determine what components to
load, the OLE specification and interfaces to allow negotiation of menus and
screen real estate.
Does .NET have any inherent Plugin support or specifications? Is there any
recommended way to add Plugin support to a .NET application?
Thanks,
Aaron Queenan.
|
by: Chua Wen Ching |
last post by:
Hi there,
I had some doubts on creatings plugins.
As most example on the internet shows how to write plugins onto a plugin
host which is normally a windows form program.
1) Can i replace plugin host as class libraries instead of windows forms
program?
|
by: Julia |
last post by:
Can some one please explain me the following:
"In your plugin config section, use the assembly name like "Class, Assembly,
Culture, Version, PublicKeyToken" so that you can just use
Type.GetType(name) and instantiate it with GetConstructor(null).Invoke(null)
or use the Type from Type.GetType() to do
type.Assembly.CreateInstance(type.FullName)."
This was published by Heath Stewart in a response to an article regarding
an application...
|
by: Matt |
last post by:
I'm hoping someone can steer me in the right direction to try to do the
following:
I am developing an application where we receive files from customers. Right
now we receive a variety of formats. I was looking at writing some type of
base application that would allow me to add-in either new assemblies or
plugins, don't know how or which way, for different scenarios. We may
just recieve a text file so an assembly would handle...
| |
by: Joe_Black |
last post by:
Hi all,
I want to create an MDI app that allows reporting on XML data files
downloaded from the equipment that we manufacture, this MDI app will
have several default reports but due to the nature of the data different
people will want to see it in different ways.
What I would like to do is have several standard reports/graphing MDI
Children that come as standard, then allow the user to apply a plugin
that will allow them to view their...
|
by: Oldman |
last post by:
How do you conditionally reference an assembly based off of the build
configuration? Imagine a scenario where I want to have an Sql Release Server
build and an Oracle Release Build and the only difference between them is a
reference to a different assembly.
Is it possible to do this in VS2005?
|
by: Paciente8159 AKA Klayman |
last post by:
Hi,
I have a couple of doubts reggarding a plugin based application in C++?
I want to build a c++ plugin based app. I have searched alot of things
in the net but I still don't know how to start this.
For example:
I want the plugin to be able to expose functions and HANDLES (for
synchronization with WaitForSingleObject for example).
|
by: anglozaxxon |
last post by:
I'm making a program that consists of a main engine + plugins. Both
are in Python. My question is, how do I go about importing arbitrary
code and have it be able to use the engine's functions, classes, etc?
First, here's how it's laid out on the filesystem:
-mainstarterscript.py
-<engine>
-__init__.py
-
-<plugin>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |