SynchronousReceiveBehavior.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Description
  5. {
  6. using System.ServiceModel;
  7. using System.ServiceModel.Dispatcher;
  8. using System.ServiceModel.Channels;
  9. public class SynchronousReceiveBehavior : IEndpointBehavior
  10. {
  11. public SynchronousReceiveBehavior() { }
  12. void IEndpointBehavior.Validate(ServiceEndpoint serviceEndpoint)
  13. {
  14. }
  15. void IEndpointBehavior.AddBindingParameters(ServiceEndpoint serviceEndpoint, BindingParameterCollection parameters)
  16. {
  17. }
  18. void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
  19. {
  20. if (endpointDispatcher == null)
  21. {
  22. throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpointDispatcher");
  23. }
  24. endpointDispatcher.ChannelDispatcher.ReceiveSynchronously = true;
  25. }
  26. void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
  27. {
  28. }
  29. }
  30. }