Determining if the CSLA is running in "client" or a "server" mode #1734
-
Question. Hope this should be relatively easy. Is there a built-in way to determine if CSLA is running in client/server mode? I would imagine a few possibilities, but i was curious first if there is a built-in method. My goal is to only execute certain code in OnDeserialized if we're in client mode, but i dont know if there is a good method. The problem with my ideas below is that if you have a 4-tier application (client -> another server -> app server -> database), both of the ideas would show that it's Client mode on another server because those values would be set.
My last idea would be just a bool we set somewhere that is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can use E.g. check to see if running on client:
|
Beta Was this translation helpful? Give feedback.
You can use
Csla.ApplicationContext.ExecutionLocation
to determine where the code is currently running.E.g. check to see if running on client: