void ProcessCompilationParams(IDictionary directive, CompilerParameters compilParams)
        {
            bool debug = false;

            if (ServiceParserUtilities.GetAndRemoveBooleanAttribute(directive, "debug", ref debug))
            {
                compilParams.IncludeDebugInformation = debug;
            }

            int warningLevel = 0;

            if (ServiceParserUtilities.GetAndRemoveNonNegativeIntegerAttribute(directive, "warninglevel", ref warningLevel))
            {
                compilParams.WarningLevel = warningLevel;
                if (warningLevel > 0)
                {
                    compilParams.TreatWarningsAsErrors = true;
                }
            }

            string compilerOptions = ServiceParserUtilities.GetAndRemoveNonEmptyAttribute(directive, "compileroptions");

            if (compilerOptions != null)
            {
                compilParams.CompilerOptions = compilerOptions;
            }
        }
示例#2
0
        private void ProcessCompilationParams(IDictionary directive, CompilerParameters compilParams)
        {
            bool val = false;

            if (ServiceParserUtilities.GetAndRemoveBooleanAttribute(directive, "debug", ref val))
            {
                compilParams.IncludeDebugInformation = val;
            }
            int num = 0;

            if (ServiceParserUtilities.GetAndRemoveNonNegativeIntegerAttribute(directive, "warninglevel", ref num))
            {
                compilParams.WarningLevel = num;
                if (num > 0)
                {
                    compilParams.TreatWarningsAsErrors = true;
                }
            }
            string andRemoveNonEmptyAttribute = ServiceParserUtilities.GetAndRemoveNonEmptyAttribute(directive, "compileroptions");

            if (andRemoveNonEmptyAttribute != null)
            {
                compilParams.CompilerOptions = andRemoveNonEmptyAttribute;
            }
        }