app type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing a custom logging component (which uses App Block; good stuff
there). The logger may be used in a winform, webform or in a webservice. I'd
like to determine what application type the component is being used in so I
can take different actions (e.g. terminate winapp, close session, or simply
log (or in some cases stop the service). How can I programmatically determine
this?
 
You really don't want to build a dependency into the component that is
dependent on the application using it. Think of a reusable component as a
service. The service doesn't know about the client, but the client knows how
to use the service. The app should make the determination about what to do
if the login fails.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
You could have the application notify your component what type of app it is.

Schneider
 
I am writing a custom logging component (which uses App Block; good stuff
there). The logger may be used in a winform, webform or in a webservice. I'd
like to determine what application type the component is being used in so I
can take different actions (e.g. terminate winapp, close session, or simply
log (or in some cases stop the service). How can I programmatically determine
this?

Personally I would not take this approach. The logging component
should do just that -- log. If you want additional logic based on the
application type do that separately in another component, or in the
application itself.

This way your logging component can
- Concentrate on its core function
- Be usable in scenarios that you might not think of now. If you bake
in dependencies on winforms and webservices then how easily can you
use it in a Smart Device application?
 
Back
Top