code_junkie

Update all WCF Service References in one click (two clicks would be OK too!)

Nov 14th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. // this class can be used to instantiate a unidirectional proxy (one that doesn't require callbacks from the server)
  2. public class UniDirectionalServiceProxy<T> : System.ServiceModel.ClientBase<T> where T : class
  3. {
  4. public UniDirectionalServiceProxy()
  5. {
  6. }
  7.  
  8. public UniDirectionalServiceProxy(string endpointConfigurationName) :
  9. base(endpointConfigurationName)
  10. {
  11. }
  12.  
  13. public UniDirectionalServiceProxy(string endpointConfigurationName, string remoteAddress) :
  14. base(endpointConfigurationName, remoteAddress)
  15. {
  16. }
  17.  
  18. public UniDirectionalServiceProxy(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
  19. base(endpointConfigurationName, remoteAddress)
  20. {
  21. }
  22.  
  23. public UniDirectionalServiceProxy(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  24. base(binding, remoteAddress)
  25. {
  26. }
  27.  
  28. // new keyword allows us to supercede the inherited protected member and make it public.
  29. public new T Channel
  30. {
  31. get
  32. {
  33. return base.Channel;
  34. }
  35. }
  36. }
Add Comment
Please, Sign In to add comment