[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    Re: ListViewAppender: ListView always null?
From:       Dominik Psenner <dpsenner () gmail ! com>
Date:       2012-11-04 22:44:59
Message-ID: CA+0K2P-+s6eAan45sjpqSW4LFA2OUb-C08emB2HApD3YsnsFHA () mail ! gmail ! com
[Download RAW message or body]

See inline below..

2012/11/4 Dominik Psenner <dpsenner@gmail.com>:
> 2012/11/4 SEGERS Steven (CNH) <steven.segers@cnh.com>:
> > What you should do is expose your listview somehow, simplest would be through a \
> > static field, and let the no-arg constructor of your appender look up the \
> > instance of the listview there.
> 
> That would tie the UI and the logging together, which often is not a
> good idea. I would instead provide some way to register and unregister
> a list view from receiving events through events.

.. receiving logging events through the C# event which are basically
Action/Function invokes ..

Re-reading my mail I've noticed I explained myself very poorly, sorry. :-)

> But it could be
> troublesome to implement the unregister part in a way that just works.
> Beware from the Unloaded events - they may show up when you don't
> expect them or may not even be triggered at all, which obviously is
> even worse.
> 
> Cheers,
> D.
> --
> Dominik Psenner
> ## OpenPGP Key Signature #################################
> # Key ID: B469318C                                       #
> # Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
> ##########################################################



-- 
Dominik Psenner
## OpenPGP Key Signature #################################
# Key ID: B469318C                                       #
# Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
##########################################################


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic