Esempio n. 1
0
        /// <summary>
        /// Начало события
        /// </summary>
        /// <param name="case">Кейс</param>
        /// <param name="docPath">Документ</param>
        public PathCheckerResult Start(Case @case, [CanBeNull] string docPath)
        {
            StartEvent = DateTime.Now;
            PathCheckerResult pathCheckerResult = null;

            if (NeedCheck(docPath))
            {
                try
                {
                    Logger.Log.Info($"Eventer Start Check case={@case}, doc={docPath}");
                    pathCheckerResult = _pathChecker.Check(AppType, @case, docPath, _userData);
                    Logger.Log.Info($"Eventer pathCheckerResult={pathCheckerResult?.CheckResultDto?.Status}");
                }
                catch (Exception ex)
                {
                    Logger.Log.Error(ex, $"Start case={@case}, doc={docPath}");
                }
            }

            return(pathCheckerResult);
        }
Esempio n. 2
0
        /// <summary>
        /// Начало события
        /// </summary>
        /// <param name="case">Кейс</param>
        /// <param name="docPath">Документ</param>
        public PathCheckerResult Start(SaveType @case, [CanBeNull] string docPath)
        {
            StartEvent = DateTime.Now;
            PathCheckerResult pathCheckerResult = null;

            if (NeedCheck(docPath))
            {
                try
                {
                    Logger.Log.Info($"Eventer Start Check case={@case}, doc={docPath}");
                    pathCheckerResult = _pathChecker.Check(AppType, @case, docPath, Environment.UserName);
                    Logger.Log.Info($"Eventer pathCheckerResult={pathCheckerResult?.CheckResultDto?.Success}");
                }
                catch (Exception ex)
                {
                    Logger.Log.Error(ex, $"Eventer Start ERROR. case={@case}, doc={docPath}");
                }
            }

            return(pathCheckerResult);
        }