Click here to Skip to main content
15,922,145 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Aspnet_wp Consume 100% CPU Pin
Colin Angus Mackay22-Jun-05 2:01
Colin Angus Mackay22-Jun-05 2:01 
GeneralRe: Aspnet_wp Consume 100% CPU Pin
Christian Graus22-Jun-05 3:13
protectorChristian Graus22-Jun-05 3:13 
GeneralRe: Aspnet_wp Consume 100% CPU Pin
SimonS22-Jun-05 21:56
SimonS22-Jun-05 21:56 
GeneralRe: Aspnet_wp Consume 100% CPU Pin
imshally8122-Jun-05 22:41
imshally8122-Jun-05 22:41 
GeneralRe: Aspnet_wp Consume 100% CPU Pin
Christian Graus23-Jun-05 18:27
protectorChristian Graus23-Jun-05 18:27 
GeneralAdding handler without knowing the name of event Pin
Piotrus21-Jun-05 21:46
Piotrus21-Jun-05 21:46 
GeneralRe: Adding handler without knowing the name of event Pin
S. Senthil Kumar21-Jun-05 23:17
S. Senthil Kumar21-Jun-05 23:17 
GeneralRe: Adding handler without knowing the name of event Pin
Mathew Hall22-Jun-05 2:59
Mathew Hall22-Jun-05 2:59 
No idea how to do it if target is a delegate, but here is a way to add a handler to all the events in an object that are the same type as the handler:

// Attatches the specified handler to all events in eventSource <br />
// that have the same Type as the handler<br />
public void RegisterEvents(object eventSource, Delegate handler)<br />
{<br />
  if (eventSource == null || handler == null)<br />
  {<br />
    return;<br />
  }<br />
<br />
  // get a list of all events in the source<br />
  EventInfo[] events = eventSource.GetType().GetEvents();<br />
<br />
  if (events.Length > 0)<br />
  {<br />
    // go through each event and check if its type is the same <br />
    // as our handler.  if they are of the same type then<br />
    // attatch the handler to the event<br />
    foreach (EventInfo eventInfo in events)<br />
    {<br />
      if (eventInfo.EventHandlerType == handler.GetType())<br />
      {<br />
        eventInfo.AddEventHandler(eventSource, handler);<br />
      }<br />
    }<br />
  }<br />
}


"I think I speak on behalf of everyone here when I say huh?" - Buffy
Generalremoting event handing... Pin
Anonymous21-Jun-05 12:19
Anonymous21-Jun-05 12:19 
GeneralRe: remoting event handing... Pin
Anonymous21-Jun-05 21:22
Anonymous21-Jun-05 21:22 
GeneralPortable.NET 0.7 released :) Pin
maciekplewa21-Jun-05 2:01
maciekplewa21-Jun-05 2:01 
GeneralAnother FREE ADVERT!! Pin
Dave Kreskowiak24-Jun-05 3:55
mveDave Kreskowiak24-Jun-05 3:55 
GeneralVS 2005 schedule team build Pin
awu2520-Jun-05 18:43
awu2520-Jun-05 18:43 
GeneralRe: VS 2005 schedule team build Pin
Vasudevan Deepak Kumar23-Jun-05 18:33
Vasudevan Deepak Kumar23-Jun-05 18:33 
QuestionGDI+ damned slow ??? Pin
l3st4rd20-Jun-05 15:28
l3st4rd20-Jun-05 15:28 
AnswerRe: GDI+ damned slow ??? Pin
Christian Graus20-Jun-05 15:35
protectorChristian Graus20-Jun-05 15:35 
GeneralRe: GDI+ damned slow ??? Pin
l3st4rd20-Jun-05 16:08
l3st4rd20-Jun-05 16:08 
GeneralRe: GDI+ damned slow ??? Pin
Christian Graus20-Jun-05 16:14
protectorChristian Graus20-Jun-05 16:14 
GeneralRe: GDI+ damned slow ??? Pin
l3st4rd20-Jun-05 16:21
l3st4rd20-Jun-05 16:21 
GeneralRe: GDI+ damned slow ??? Pin
Robert Rohde21-Jun-05 0:45
Robert Rohde21-Jun-05 0:45 
GeneralRe: GDI+ damned slow ??? Pin
Christian Graus21-Jun-05 12:59
protectorChristian Graus21-Jun-05 12:59 
GeneralRe: GDI+ damned slow ??? Pin
Robert Rohde21-Jun-05 20:02
Robert Rohde21-Jun-05 20:02 
GeneralRe: GDI+ damned slow ??? Pin
l3st4rd21-Jun-05 15:51
l3st4rd21-Jun-05 15:51 
GeneralRe: GDI+ damned slow ??? Pin
Christian Graus21-Jun-05 16:25
protectorChristian Graus21-Jun-05 16:25 
GeneralRe: GDI+ damned slow ??? Pin
l3st4rd21-Jun-05 17:07
l3st4rd21-Jun-05 17:07 

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.