コード例 #1
0
        public int PostException(ProjectExceptionEntities generatedException)
        {
            IProjectExceptionOperations exceptionOperations = new ProjectExceptionOperations();

            ProjectException exceptionToInsert = MapEntities.Map <ProjectExceptionEntities, ProjectException>(generatedException);

            exceptionOperations.LogException(exceptionToInsert);
            return(exceptionToInsert.Id);
        }
コード例 #2
0
        public static void LogExceptionFromApplication(ProjectExceptionEntities exception)
        {
            IProjectExceptionOperations projectExceptionOperation = new ProjectExceptionOperations();
            ProjectException            generatedException        = new ProjectException();

            generatedException.CreatedDate = DateTime.Now;
            generatedException.Message     = exception.Message;
            generatedException.ProjectType = Convert.ToString(ProjectTypeEnum.ServiceLayer);
            generatedException.StackTrace  = exception.StackTrace;
            projectExceptionOperation.LogException(generatedException);
        }
コード例 #3
0
        public static void LogException(Exception exception)
        {
            ServiceInputObject inputObject = new ServiceInputObject
            {
                baseURL        = ConfigSettings.WebApiBaseAddress,
                controllerName = "ProjectException",
                methodName     = "PostException"
            };

            ProjectExceptionEntities generatedException = new ProjectExceptionEntities();

            generatedException.CreatedDate = DateTime.Now;
            generatedException.Message     = exception.Message;
            generatedException.ProjectType = Convert.ToString(ProjectTypeEnum.ServiceLayer);
            generatedException.StackTrace  = exception.StackTrace;
            ServiceMethods.GeneratePostRequestWithIntDestinationEntity <ProjectExceptionEntities>(generatedException, inputObject);
        }