Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: Runtime Compilation - Worth It? Pin
Eric Astor10-Apr-03 6:51
Eric Astor10-Apr-03 6:51 
GeneralRe: Runtime Compilation - Worth It? Pin
Frank Hileman10-Apr-03 8:28
Frank Hileman10-Apr-03 8:28 
GeneralRe: Runtime Compilation - Worth It? Pin
Eric Astor10-Apr-03 10:01
Eric Astor10-Apr-03 10:01 
GeneralRe: Runtime Compilation - Worth It? Pin
Frank Hileman10-Apr-03 11:18
Frank Hileman10-Apr-03 11:18 
QuestionSockets with Server but what event? Pin
gekoscan13-Jan-03 11:28
gekoscan13-Jan-03 11:28 
GeneralRemoting (events/delegates) Pin
leppie13-Jan-03 9:40
leppie13-Jan-03 9:40 
GeneralRe: Remoting (events/delegates) Pin
James T. Johnson14-Jan-03 8:19
James T. Johnson14-Jan-03 8:19 
GeneralRe: Remoting (events/delegates) Pin
leppie14-Jan-03 10:08
leppie14-Jan-03 10:08 
James T. Johnson wrote:
I think the recommended solution is to create a small assembly containing the portions of code to be shared between te main app and the plugins. In your case it would include the delegate definitions as well as anything else that both sides need to use.

I ended up makin a "proxy" class for the object that fires these events. Basically:
con.Listener.OnPublic += new PublicMessageEventHandler(OnPublicMessage);

public void OnPublicMessage(UserInfo ui, string channel, string message)
{
  if (Public != null)
    Public(ui, channel, message);
}
//I change the event names to be "inline" with the recommended
public event Sharkbite.Irc.PublicMessageEventHandler Public;

Now this work nicely, but I will be a pain in the $#% for all the events about 50, as I can see no way of get parameters for a delegate via reflection. I think i can add/remove the delegates once I have all my event raising methods in place. Maybe I can do some filtering...but there seems no way I can do the raising method programatically.

The single event I have implementented works as should, and the main appdomain does NOT load the plugin's type. Thus the file is deletable once the appdomain is unloaded and it even allows me to debug, and invoke the plugin.

Another idea I had was perhaps make an abstract base class that already has all the consumer methods in place that will act as a template for the plugin the pass a downcasted instance of the plugin. But again I wasnt sure ifthe main appdomain would load it.

Yet another (but I have now clue on this) is to make my own implement ation of a RealProxy object. Everything seems to point to that...

Anyways thanks for the help Smile | :)
Cheers

WebBoxes - Yet another collapsable control, but it relies on a "graphics server" for dynamic pretty rounded corners, cool arrows and unlimited font support.

GeneralRe: Remoting (events/delegates) Pin
James T. Johnson15-Jan-03 0:02
James T. Johnson15-Jan-03 0:02 
GeneralRe: Remoting (events/delegates) Pin
leppie15-Jan-03 6:32
leppie15-Jan-03 6:32 
GeneralRe: Remoting (events/delegates) Pin
Gertjan Schuurmans15-Jan-03 12:13
Gertjan Schuurmans15-Jan-03 12:13 
GeneralRe: Remoting (events/delegates) Pin
leppie15-Jan-03 13:27
leppie15-Jan-03 13:27 
GeneralRe: Remoting (events/delegates) Pin
leppie15-Jan-03 14:41
leppie15-Jan-03 14:41 
GeneralRe: Remoting (events/delegates) Pin
leppie15-Jan-03 21:44
leppie15-Jan-03 21:44 
GeneralRe: Remoting (events/delegates) Pin
Gertjan Schuurmans16-Jan-03 7:20
Gertjan Schuurmans16-Jan-03 7:20 
GeneralRe: Remoting (events/delegates) Pin
leppie16-Jan-03 10:56
leppie16-Jan-03 10:56 
QuestionHow to use the SqlClientPermission? Pin
shanelhatcher13-Jan-03 7:48
shanelhatcher13-Jan-03 7:48 
AnswerRe: How to use the SqlClientPermission? Pin
leppie13-Jan-03 9:44
leppie13-Jan-03 9:44 
GeneralRe: How to use the SqlClientPermission? Pin
shanelhatcher14-Jan-03 8:02
shanelhatcher14-Jan-03 8:02 
GeneralFullscreen Alt-Tab problem in ManagedD3D Pin
Zinj13-Jan-03 2:22
sussZinj13-Jan-03 2:22 
GeneralRe: Windows Service & Console Server application Pin
Kannan Kalyanaraman13-Jan-03 1:14
Kannan Kalyanaraman13-Jan-03 1:14 
Generalrun external programm and catch results Pin
Daishi100213-Jan-03 0:11
Daishi100213-Jan-03 0:11 
GeneralRe: run external programm and catch results Pin
Daishi100213-Jan-03 0:58
Daishi100213-Jan-03 0:58 
GeneralBest COM and .NET interop book Pin
Oyvind Bratland12-Jan-03 21:18
Oyvind Bratland12-Jan-03 21:18 
GeneralRe: Best COM and .NET interop book Pin
Jarrod Marshall13-Jan-03 7:42
Jarrod Marshall13-Jan-03 7:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.