Exemple #1
0
        public void AnalysisStopped(RuntimeConditions runtimeConditions)
        {
            RuntimeConditions fatalConditions = (runtimeConditions & ~RuntimeConditions.Nonfatal);

            if (fatalConditions == RuntimeConditions.None)
            {
                Console.WriteLine(SdkResources.MSG_AnalysisCompletedSuccessfully);
            }

            Console.WriteLine();

            if ((runtimeConditions & RuntimeConditions.RuleNotApplicableToTarget) != 0)
            {
                Console.WriteLine(SdkResources.MSG_OneOrMoreNotApplicable);
                Console.WriteLine();
            }

            if ((runtimeConditions & RuntimeConditions.TargetNotValidToAnalyze) != 0)
            {
                Console.WriteLine(SdkResources.MSG_OneOrMoreInvalidTargets);
                Console.WriteLine();
            }

            if (fatalConditions != 0)
            {
                // One or more fatal conditions observed at runtime,
                // so we'll report a catastrophic exit.
                Console.WriteLine(SdkResources.MSG_UnexpectedApplicationExit);
                Console.WriteLine(SdkResources.UnexpectedFatalRuntimeConditions + fatalConditions.ToString());
                Console.WriteLine();
            }
        }
Exemple #2
0
        public void AnalysisStopped(RuntimeConditions runtimeConditions)
        {
            Console.WriteLine();

            if (runtimeConditions == RuntimeConditions.NoErrors)
            {
                Console.WriteLine(SdkResources.MSG_AnalysisCompletedSuccessfully);
                return;
            }

            if ((runtimeConditions & RuntimeConditions.Fatal) != 0)
            {
                // One or more fatal conditions observed at runtime, so
                // we'll report a catastrophic exit (withuot paying
                // particular attention to anything non-fatal
                Console.WriteLine(SdkResources.MSG_UnexpectedApplicationExit);
            }
            else
            {
                // Analysis finished but was not complete due
                // to non-fatal runtime errors.
                Console.WriteLine(SdkResources.MSG_AnalysisIncomplete);
            }

            Console.WriteLine("Unexpected runtime condition(s) observed: " + runtimeConditions.ToString());
        }