Determining if object is run in web or win32

  • Thread starter Thread starter WebDevHokie
  • Start date Start date
W

WebDevHokie

Is there a way that you can tell if an object is run under a web or a win32
environment? I have an object ( Data Access Object) that uses the ASP.NET
cache. I have also implemented unit testing into the application (using
NUnit). These unit tests call the application which call the Data Access
Object which uses the cache. I want to be able to say, if this is run under
the win32 environment, dont use the cache. I guess I could check to see if
the cache object is null, but was just curious if there was another way
around that. Thanks in advance!
 
You could check to see if the current context is null, but checking for the
existence of the cache as you mentioned seems just as simple.
 
Back
Top