How to detect environment during deserialization

34 Views Asked by At

Is there a way how to find out, If the constructor is called during deserialization on client or during deserialization on server? I talk about constructor of class marked with DataContract atribute from Shared project.

Thank you Tom

1

There are 1 best solutions below

0
On

Solved. Environment.GetEnvironmentVariable("propertyName"). PropertyName should be placed in launchSettings.json for client and server.