Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="snapshot"></param>
        /// <returns></returns>
        static public void BuildSnapshotResult(WSConnection connection, Snapshot snapshot, bool withActionPlan)
        {
            //Build modules
            using (SnapshotBLL snapshotBll = new SnapshotBLL(connection, snapshot))
            {
                Task taskModules = new Task(() => snapshotBll.SetModules());
                taskModules.Start();

                //Build Quality Indicators
                Task taskQualityIndicators = new Task(() => snapshotBll.SetQualityIndicators());
                taskQualityIndicators.Start();



                //Build Sizing Measures
                Task taskSizingMeasure = new Task(() => snapshotBll.SetSizingMeasure());
                taskSizingMeasure.Start();

                //Build Configuration for Business Criteria
                Task taskConfigurationBusinessCriterias = new Task(() => snapshotBll.SetConfigurationBusinessCriterias());
                taskConfigurationBusinessCriterias.Start();


                //Build Configuration for Business Criteria
                Task taskComplexity = new Task(() => snapshotBll.SetComplexity());
                taskComplexity.Start();


                //build action plan
                Task taskAP = null;
                if (withActionPlan)
                {
                    taskAP = new Task(() => snapshotBll.SetActionsPlan());
                    taskAP.Start();
                }


                taskModules.Wait();
                taskQualityIndicators.Wait();
                taskSizingMeasure.Wait();
                taskConfigurationBusinessCriterias.Wait();
                taskComplexity.Wait();
                if (taskAP != null)
                {
                    taskAP.Wait();
                }
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="snapshot"></param>
        /// <returns></returns>
        public static void BuildSnapshotResult(WSConnection connection, Snapshot snapshot, bool withActionPlan)
        {
            //Build modules
            using (SnapshotBLL snapshotBll = new SnapshotBLL(connection, snapshot))
            {
                Task taskModules = new Task(() => snapshotBll.SetModules());
                taskModules.Start();

                //Build Quality Indicators
                Task taskQualityIndicators = new Task(() => snapshotBll.SetQualityIndicators());
                taskQualityIndicators.Start();

                //Build Sizing Measures
                Task taskSizingMeasure = new Task(() => snapshotBll.SetSizingMeasure());
                taskSizingMeasure.Start();

                //Build Configuration for Business Criteria
                Task taskConfigurationBusinessCriterias = new Task(() => snapshotBll.SetConfigurationBusinessCriterias());
                taskConfigurationBusinessCriterias.Start();

                //Build Configuration for Business Criteria
                Task taskComplexity = new Task(() => snapshotBll.SetComplexity());
                taskComplexity.Start();

                //build action plan
                Task taskAP = null;
                if (withActionPlan)
                {
                    taskAP = new Task(() => snapshotBll.SetActionsPlan());
                    taskAP.Start();
                }

                taskModules.Wait();
                taskQualityIndicators.Wait();
                taskSizingMeasure.Wait();
                taskConfigurationBusinessCriterias.Wait();
                taskComplexity.Wait();
                if (taskAP != null) taskAP.Wait();
            }
        }