Determining if object is run in web or win32

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!
 
S

Steve C. Orr, MCSD

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top