more of a curiosity than anything else but I recently have made a few c# classes that consume a web service, change some values and return some results.
I have used the .net activator on the dlls and everything worked fine.
Although when I go to call the methods they are just accessible without instantiating the objects.
That's fine but it begs the question,
Is the object/class instantiated per method call? e.g new ClassName().MethodName() ?
you see I am working in three environments and use the same methods in all three but the methods themselves differ dependent on the environment. I can't see a way to define that easily.
I have to make three different (virtually identical) dlls and deploy them to the three different environments.
I would prefer a toggle switch of sorts in my constructor or a static method or something but I am assuming the objects are created each call and so I can't just say ClassName.setEnvironmentVariables() or something.
Thoughts?
I have used the .net activator on the dlls and everything worked fine.
Although when I go to call the methods they are just accessible without instantiating the objects.
That's fine but it begs the question,
Is the object/class instantiated per method call? e.g new ClassName().MethodName() ?
you see I am working in three environments and use the same methods in all three but the methods themselves differ dependent on the environment. I can't see a way to define that easily.
I have to make three different (virtually identical) dlls and deploy them to the three different environments.
I would prefer a toggle switch of sorts in my constructor or a static method or something but I am assuming the objects are created each call and so I can't just say ClassName.setEnvironmentVariables() or something.
Thoughts?
Forum: Designer