Example #1
0
        public async Task <Result <GradeSheetInfo> > GetGradeSheetInfo(string sessionId, string guid)
        {
            this.logger.LogDebug("GetGradeSheetInfo");
            try
            {
                var res = await client.GetGradeSheetInfo(sessionId, guid);

                var isAuthorized = CheckAuthorization(res);
                if (!isAuthorized)
                {
                    return(Result <GradeSheetInfo> .Failure(new UnauthorizedAccessException()));
                }
                return(Result <GradeSheetInfo> .Success(converter.ParseGradeSheetInfo(res)));
            }
            catch (Exception e)
            {
                this.logger.LogError(e, "GetGradeSheetInfo");
                return(Result <GradeSheetInfo> .Failure(e));
            }
        }