Esempio n. 1
0
        public BasePipelineResponse(IPipelineRequest <IPipelineResponse> request)
        {
            if (request.AuthenticationResult == null)
            {
                var requestName = request.GetType().Name;
                var msg         =
                    $"Request was not authenticated. Maybe an IPipelineAuthenticationHandler<{requestName}> is not registered?";
                throw new NotImplementedException(msg);
            }
            if (request.ValidationResult == null)
            {
                var requestName = request.GetType().Name;
                var msg         =
                    $"Request was not authenticated. Maybe an IPipelineValidationHandler<{requestName}> is not registered?";
                throw new NotImplementedException(msg);
            }

            AuthenticationResult = request.AuthenticationResult;
            ValidationResult     = request.ValidationResult;
        }