Click here to Skip to main content
15,916,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generic event, or raise event based on generic type. [modified] Pin
DaveyM6912-Jan-09 22:58
professionalDaveyM6912-Jan-09 22:58 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius13-Jan-09 9:47
mentorWendelius13-Jan-09 9:47 
GeneralRe: Generic event, or raise event based on generic type. Pin
DaveyM6914-Jan-09 0:23
professionalDaveyM6914-Jan-09 0:23 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius14-Jan-09 2:30
mentorWendelius14-Jan-09 2:30 
GeneralRe: Generic event, or raise event based on generic type. Pin
DaveyM6914-Jan-09 3:25
professionalDaveyM6914-Jan-09 3:25 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius14-Jan-09 3:42
mentorWendelius14-Jan-09 3:42 
GeneralRe: Generic event, or raise event based on generic type. Pin
DaveyM6914-Jan-09 11:41
professionalDaveyM6914-Jan-09 11:41 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius14-Jan-09 11:59
mentorWendelius14-Jan-09 11:59 
DaveyM69 wrote:
I've extended it a little so the delegate signature is now (object sender, NotifyEventArgs<t> e)


Yep, I thought of the same, but then I was thinking maybe there should be some other base class for the arguments. For example if we add reason and other enums they could reside in the base class and then the application could extend that to whatever it wants to deliver, complex types, arrays etc.

DaveyM69 wrote:
I might have a look to see if there's some 'magic' way to determine what class called the method


I'd be very interested if you find a solution. I've been looking for a way and not found anything reasonable so I implemented a bit different strategy. The only thing I found when investigating was StackFrame, but it had too severe performance penalty. However, it was a long time ago and based on framework 1.1

DaveyM69 wrote:
Unsubscribe method at least


That would be handy in most cases along with few other methods Smile | :)

DaveyM69 wrote:
I'll pass it by you first as I think this should be a co-author thing with the quality of your help/input


I'd be happy to participate (just brief me how it happens, since never done that before). I must say that the logic for the singleton class isn't what I would do. There's a lot of things to correct, but at the time I was writing it, it was very late in the evening so I decided to do it brute-force.

The need to optimize rises from a bad design.My articles[^]

GeneralRe: Generic event, or raise event based on generic type. Pin
DaveyM6915-Jan-09 3:13
professionalDaveyM6915-Jan-09 3:13 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius15-Jan-09 3:19
mentorWendelius15-Jan-09 3:19 
GeneralRe: Generic event, or raise event based on generic type. Pin
DaveyM6915-Jan-09 4:01
professionalDaveyM6915-Jan-09 4:01 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius15-Jan-09 10:27
mentorWendelius15-Jan-09 10:27 
GeneralRe: Generic event, or raise event based on generic type. [modified] Pin
DaveyM6915-Jan-09 23:08
professionalDaveyM6915-Jan-09 23:08 
GeneralRe: Generic event, or raise event based on generic type. Pin
Wendelius15-Jan-09 23:25
mentorWendelius15-Jan-09 23:25 
QuestionKeep current view centered on Zoom Pin
Richard Blythe12-Jan-09 7:16
Richard Blythe12-Jan-09 7:16 
AnswerRe: Keep current view centered on Zoom [modified] Pin
Luc Pattyn12-Jan-09 8:01
sitebuilderLuc Pattyn12-Jan-09 8:01 
GeneralRe: Keep current view centered on Zoom Pin
Richard Blythe12-Jan-09 9:10
Richard Blythe12-Jan-09 9:10 
QuestionAddress Pin
boiDev12-Jan-09 6:56
boiDev12-Jan-09 6:56 
AnswerRe: Address Pin
EliottA12-Jan-09 7:21
EliottA12-Jan-09 7:21 
GeneralRe: Address Pin
boiDev12-Jan-09 11:25
boiDev12-Jan-09 11:25 
GeneralRe: Address Pin
EliottA12-Jan-09 11:29
EliottA12-Jan-09 11:29 
GeneralRe: Address Pin
boiDev12-Jan-09 11:43
boiDev12-Jan-09 11:43 
GeneralRe: Address Pin
EliottA12-Jan-09 12:28
EliottA12-Jan-09 12:28 
Questionincreasing panel size Pin
jananiSreedhar12-Jan-09 6:11
jananiSreedhar12-Jan-09 6:11 
AnswerRe: increasing panel size Pin
User 665812-Jan-09 6:18
User 665812-Jan-09 6:18 

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.