Beispiel #1
0
        public override IList <Object> GetSummary()
        {
            try
            {
                AccessLevel accessLevel = Authorize("summary");

                if (accessLevel < AccessLevel.Read)
                {
                    throw new UnauthorizedAccessException(String.Format(UNAUTHORIZED_ERROR, _settings["scope"]));
                }

                _kernel.Load(_summaryBindingPath);
                ISummary summary = _kernel.Get <ISummary>();
                return(summary.GetSummary());
            }
            catch (Exception e)
            {
                _logger.Error("Error getting summary: " + e);
                throw e;
            }
        }