PipelineContinuation CreateOperations(ICommunicationContext context)
        {
            var uriBoundOperations = context.PipelineData.SelectedResource?.UriModel?.Operations;

            if (uriBoundOperations != null)
            {
                context.PipelineData.OperationsAsync = _creator.CreateOperations(uriBoundOperations).ToList();
            }
            // for compat because tests need refactoring
            else if (context.PipelineData.SelectedHandlers == null)
            {
                return(PipelineContinuation.Continue);
            }
            else if (context.PipelineData.SelectedHandlers != null)
            {
                context.PipelineData.OperationsAsync =
                    _creator.CreateOperations(context.PipelineData.SelectedHandlers).ToList();
            }

            LogOperations(context.PipelineData.OperationsAsync);
            if (context.PipelineData.OperationsAsync.Any())
            {
                return(PipelineContinuation.Continue);
            }
            context.OperationResult = CreateMethodNotAllowed(context);
            return(PipelineContinuation.RenderNow);
        }
        PipelineContinuation CreateOperations(ICommunicationContext context)
        {
            if (context.PipelineData.SelectedHandlers == null)
            {
                return(PipelineContinuation.Continue);
            }

            var ops = _creator.CreateOperations(context.PipelineData.SelectedHandlers).ToList();

            context.PipelineData.OperationsAsync = ops;

#pragma warning disable 612 - Used for legacy implementations (see #109)
            context.PipelineData.Operations =
                ops.Select(op => new PretendingToBeSyncOperationForLegacyInterceptors(op)).ToList();
#pragma warning restore 612

            LogOperations(context.PipelineData.OperationsAsync);

            if (context.PipelineData.OperationsAsync.Any())
            {
                return(PipelineContinuation.Continue);
            }

            context.OperationResult = CreateMethodNotAllowed(context);
            return(PipelineContinuation.RenderNow);
        }
 PipelineContinuation CreateOperations(ICommunicationContext context)
 {
     if (context.Environment.SelectedHandlers != null)
     {
         context.Environment.Operations = _creator.CreateOperations(context.Environment.SelectedHandlers).ToList();
         LogOperations(context.Environment.Operations);
         if (context.Environment.Operations.Count() == 0)
         {
             context.OperationResult = CreateMethodNotAllowed(context);
             return(PipelineContinuation.RenderNow);
         }
     }
     return(PipelineContinuation.Continue);
 }
        PipelineContinuation CreateOperations(ICommunicationContext context)
        {
            if (context.PipelineData.SelectedHandlers == null)
            {
                return(PipelineContinuation.Continue);
            }

            var ops = _creator.CreateOperations(context.PipelineData.SelectedHandlers).ToList();

            context.PipelineData.OperationsAsync = ops;

            LogOperations(context.PipelineData.OperationsAsync);

            if (context.PipelineData.OperationsAsync.Any())
            {
                return(PipelineContinuation.Continue);
            }

            context.OperationResult = CreateMethodNotAllowed(context);
            return(PipelineContinuation.RenderNow);
        }