Click here to Skip to main content
15,925,602 members
Home / Discussions / C#
   

C#

 
QuestionThreading Question - Object in AsyncCompletedEventArgs Pin
Jammer16-Mar-09 14:05
Jammer16-Mar-09 14:05 
QuestionButton to scroll MDI Parent FOrm [modified] Pin
jameschristianii16-Mar-09 11:54
jameschristianii16-Mar-09 11:54 
QuestionObject Wrapping and Event Subscription Pin
Jammer16-Mar-09 11:28
Jammer16-Mar-09 11:28 
Hi All,

I'm just wrapping up some functionality in a class that uses some third party components under the hood. My wrapper object by default subscribes to some events on the third party components and forwards them on to consumers of my wrapper class.

In general I would expect consumers to subscribe to these events most of the time, however, I can't always assume that and I also want to optimise my wrapper. What is the general consensus on coding around this? At the moment I always subscribe to the third party events and then each time one of these events fires I check to see if the event handler is null before forwarding on the event.

Is there a better pattern for this?


AnswerRe: Object Wrapping and Event Subscription Pin
Christian Graus16-Mar-09 12:37
protectorChristian Graus16-Mar-09 12:37 
GeneralRe: Object Wrapping and Event Subscription Pin
Jammer16-Mar-09 12:41
Jammer16-Mar-09 12:41 
AnswerRe: Object Wrapping and Event Subscription Pin
DaveyM6916-Mar-09 12:49
professionalDaveyM6916-Mar-09 12:49 
QuestionHow to Refreash an array list Pin
soulidentities16-Mar-09 7:40
soulidentities16-Mar-09 7:40 
AnswerRe: How to Refreash an array list Pin
0x3c016-Mar-09 7:46
0x3c016-Mar-09 7:46 
GeneralRe: How to Refreash an array list Pin
soulidentities16-Mar-09 8:01
soulidentities16-Mar-09 8:01 
AnswerRe: How to Refreash an array list Pin
Mohammad Dayyan16-Mar-09 9:44
Mohammad Dayyan16-Mar-09 9:44 
AnswerRe: How to Refreash an array list Pin
S K Y16-Mar-09 15:09
S K Y16-Mar-09 15:09 
QuestionC# and Excel Pin
su_penguin16-Mar-09 6:42
su_penguin16-Mar-09 6:42 
AnswerRe: C# and Excel Pin
Jimmanuel16-Mar-09 6:58
Jimmanuel16-Mar-09 6:58 
GeneralRe: C# and Excel Pin
su_penguin16-Mar-09 7:01
su_penguin16-Mar-09 7:01 
GeneralRe: C# and Excel Pin
Jimmanuel16-Mar-09 7:44
Jimmanuel16-Mar-09 7:44 
GeneralRe: C# and Excel Pin
su_penguin16-Mar-09 8:15
su_penguin16-Mar-09 8:15 
GeneralRe: C# and Excel Pin
Jimmanuel16-Mar-09 8:49
Jimmanuel16-Mar-09 8:49 
Questionc# class editor Pin
MikiR16-Mar-09 6:24
MikiR16-Mar-09 6:24 
AnswerRe: c# class editor Pin
led mike16-Mar-09 6:59
led mike16-Mar-09 6:59 
GeneralRe: c# class editor Pin
MikiR16-Mar-09 7:10
MikiR16-Mar-09 7:10 
QuestionAccessing a Web.config from a windows app [modified] Pin
dptalt16-Mar-09 5:28
dptalt16-Mar-09 5:28 
AnswerRe: Accessing a Web.config from a windows app Pin
led mike16-Mar-09 5:42
led mike16-Mar-09 5:42 
QuestionOpen SQL connection via C# Pin
Ido16-Mar-09 4:44
Ido16-Mar-09 4:44 
AnswerRe: Open SQL connection via C# Pin
led mike16-Mar-09 5:39
led mike16-Mar-09 5:39 
GeneralRe: Open SQL connection via C# Pin
Ido16-Mar-09 6:36
Ido16-Mar-09 6:36 

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.