I want to make small framework with i could simply invoke webservices on many computers that have webservice.
So, i have i.e five computers with webservices.
Each ws provides 2 functions (could be more, but this is example):
DataFormat[] GetXData(int)
Something[] GetYData(string, int).
Invoking service now looks like this:
ServiceClient wsc;
DataFormat[] data = wsc.GetXData(5);
I plan interface of framework like this:
MultiWebservice mws;
DataFormat[] data = mws.BroadcastQuery( wsc.GetXData(5) );
As can see, i wish to inject function with iam interested to fire on every ws. And return merged data (merging is not subject of post. i handle it myself)
I need a help how use C# to make this elegant, generic and if it isn’t necessary,
without many overloading of function because i don’t want make new overloadings for each different return type or
each function in ws.
Please, give me advice. Maybe this interface is wrong and could be better.
To give an answer similar to Thomas Li’s, but using a generic type parameter for the methods, to allow any return type: