Answer the question
In order to leave comments, you need to log in
How to divide a web service into classes?
There is a certain application which communicates with a web service. This application supports loading plugins that can also access the web service.
Problem: the web service class contains both methods of the main application, like “get the user of the application”, and completely left-handed methods for plugins like “get the list of organizers of an event in a certain city”.
I want to separate flies from cutlets and not dump everything in one class, but I don’t want to publish separate services for each plugin.
I tried a variant with namespaces, like this:
[ServiceContract(Namespace = "http://organisation.ru/basicoperations")]
public interface IBasicOperations
...
[ServiceContract(Namespace = "http://organisation.ru/extendedoperations")]
public interface IExtendedOperations
...
Answer the question
In order to leave comments, you need to log in
You want to eat a fish and not sit down on anything :))))
Then write one method with one input parameter of the System.Object type and parsing this economy inside for further reflection (as an option) and calling the necessary methods of the necessary classes with the necessary parameters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question