コード例 #1
0
        private static bool HistoryLevelCheck(IProcessEngine processEngine, RequiredHistoryLevelAttribute annotation)
        {
            var processEngineConfiguration = (ProcessEngineConfigurationImpl)processEngine.ProcessEngineConfiguration;

            var requiredHistoryLevel = GetHistoryLevelForName(processEngineConfiguration.HistoryLevels, annotation.value);
            var currentHistoryLevel  = processEngineConfiguration.HistoryLevel;

            return(currentHistoryLevel.Id >= requiredHistoryLevel.Id);
        }
コード例 #2
0
        public static bool AnnotationRequiredHistoryLevelCheck(IProcessEngine processEngine, Description description)
        {
            RequiredHistoryLevelAttribute annotation = description.GetAnnotation <RequiredHistoryLevelAttribute>(typeof(RequiredHistoryLevelAttribute));

            if (annotation != null)
            {
                return(HistoryLevelCheck(processEngine, annotation));
            }
            else
            {
                return(AnnotationRequiredHistoryLevelCheck(processEngine, description.TestClass, description.MethodName));
            }
        }