public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
 {
     // Validate that ReceiveContext.ManualControl is set for each operation
     foreach (ServiceEndpoint serviceEndpoint in serviceDescription.Endpoints)
     {
         if (BufferedReceiveServiceBehavior.IsWorkflowEndpoint(serviceEndpoint))
         {
             foreach (OperationDescription operation in serviceEndpoint.Contract.Operations)
             {
                 ReceiveContextEnabledAttribute receiveContextEnabled = operation.Behaviors.Find <ReceiveContextEnabledAttribute>();
                 if (receiveContextEnabled == null || !receiveContextEnabled.ManualControl)
                 {
                     throw FxTrace.Exception.AsError(
                               new InvalidOperationException(SR.BufferedReceiveRequiresReceiveContext(operation.Name)));
                 }
             }
         }
     }
 }