Bootstrap.Web.Handlers.api.history.get_Type_Id_handler.Execute C# (CSharp) Method

Execute() public method

public Execute ( GETHistoryRequest request ) : HistoryViewModel
request GETHistoryRequest
return Dovetail.SDK.Bootstrap.History.HistoryViewModel
        public HistoryViewModel Execute(GETHistoryRequest request)
        {
            var workflowObject = WorkflowObject.Create(request.Type, request.Id);

            var historyRequest = new HistoryRequest {WorkflowObject = workflowObject, ShowAllActivities = request.IsVerbose};

            if (request.DaysOfHistory > 0)
            {
                var since = _systemTime.Now.Subtract(TimeSpan.FromDays(request.DaysOfHistory));
                historyRequest.Since = since;
            }

            return _historyAssembler.GetHistory(historyRequest);
        }