I have many web method in my projects that used in client application. ]
I don't want write code something like this:
using(ServiceClient sc = new ServiceClient())
{
//Invoke service methods
sc.Method1();
}
instead, I want to write: ServiceClient.Method1();
in that case all common operation which reffered to the proxy initialization, invoking method, disposing, exception processing will be inside ServiceClient. Of couse, i can wrap any of my web method with similar code or use reflection for retriving method by name, but maybe any other ways are exist?