Beispiel #1
0
        private AssemblyGenAttributes MakeGenAttrs(bool debug)
        {
            // TODO:
            ScriptDomainOptions options = ScriptDomainManager.Options;

            AssemblyGenAttributes result = options.AssemblyGenAttributes;

            result &= ~AssemblyGenAttributes.SaveAndReloadAssemblies;

            if (debug)
            {
                result |= AssemblyGenAttributes.EmitDebugInfo;


#if !SILVERLIGHT
                if (options.DebugCodeGeneration)
#endif
                result |= AssemblyGenAttributes.DisableOptimizations;
            }
            else
            {
                result &= ~AssemblyGenAttributes.EmitDebugInfo;
                result &= ~AssemblyGenAttributes.DisableOptimizations;
                result &= ~AssemblyGenAttributes.GenerateDebugAssemblies;
            }

            return(result);
        }
Beispiel #2
0
        /// <exception cref="InvalidOptionException">On error.</exception>
        public virtual void Parse(string[] args)
        {
            Contract.RequiresNotNull(args, "args");

            if (_globalOptions == null)
            {
                _globalOptions = new ScriptDomainOptions();
            }

            _args = args;

            try {
                _current = 0;
                while (_current < args.Length)
                {
                    ParseArgument(args[_current++]);
                }
            } finally {
                _args    = null;
                _current = -1;
            }
        }