Ejemplo n.º 1
0
    public override void OnActionExecuting(HttpActionContext actionContext)
    {
        base.OnActionExecuting(actionContext);

        var request     = actionContext.Request;
        var headers     = request.Headers;
        var mustPublish = headers.TryGetValues(FusionHeaders.RequestPublication, out var _);

        if (!mustPublish)
        {
            return;
        }

        var items = actionContext.GetItems();
        var computeContextScope = Computed.BeginCapture();

        items.Add(typeof(ComputeContextScope), computeContextScope);
    }