Beispiel #1
0
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths  = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline           = null;
            _input              = new CompilerInputCollection();
            _resources          = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxAttributeSteps = 2;
            _outputAssembly    = string.Empty;
            _outputType        = CompilerOutputType.ConsoleApplication;
            _outputWriter      = System.Console.Out;
            _debug             = true;
            _checked           = true;
            _generateInMemory  = true;
            _StdLib            = true;

            _delaySign = false;

            if (loadDefaultReferences)
            {
                LoadDefaultReferences();
            }
        }
Beispiel #2
0
        public CompilerParameters(IReflectionTypeSystemProvider reflectionProvider, bool loadDefaultReferences)
        {
            _libPaths  = new List <string>();
            _systemDir = Permissions.WithDiscoveryPermission(() => GetSystemDir());
            if (_systemDir != null)
            {
                _libPaths.Add(_systemDir);
                _libPaths.Add(Directory.GetCurrentDirectory());
            }
            _input              = new CompilerInputCollection();
            _resources          = new CompilerResourceCollection();
            _compilerReferences = new CompilerReferenceCollection(reflectionProvider);

            MaxExpansionIterations = 12;
            _outputAssembly        = String.Empty;
            OutputType             = CompilerOutputType.Auto;
            _outputWriter          = Console.Out;
            Debug            = true;
            Checked          = true;
            GenerateInMemory = true;
            StdLib           = true;
            DelaySign        = false;

            Strict     = false;
            TraceLevel = DefaultTraceLevel();

            if (loadDefaultReferences)
            {
                LoadDefaultReferences();
            }
        }
Beispiel #3
0
 public CompilerParameters()
 {
     _pipeline           = null;
     _input              = new CompilerInputCollection();
     _resources          = new CompilerResourceCollection();
     _assemblyReferences = new AssemblyCollection();
     _assemblyReferences.Add(typeof(Boo.Lang.Builtins).Assembly);
     _assemblyReferences.Add(GetType().Assembly);
     _assemblyReferences.Add(typeof(object).Assembly);                                  // corlib
     _assemblyReferences.Add(System.Reflection.Assembly.LoadWithPartialName("System")); // System
     _maxAttributeSteps = 2;
     _outputAssembly    = string.Empty;
     _outputType        = CompilerOutputType.ConsoleApplication;
     _outputWriter      = System.Console.Out;
     _debug             = true;
     _generateInMemory  = true;
 }
Beispiel #4
0
        public CompilerParameters(IReflectionTypeSystemProvider reflectionProvider, bool loadDefaultReferences)
        {
            _libPaths = new List<string>();
            _systemDir = Permissions.WithDiscoveryPermission(() => GetSystemDir());
            if (_systemDir != null)
            {
                _libPaths.Add(_systemDir);
                _libPaths.Add(Directory.GetCurrentDirectory());
            }
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _compilerReferences = new CompilerReferenceCollection(reflectionProvider);

            MaxExpansionIterations = 12;
            _outputAssembly = String.Empty;
            OutputType = CompilerOutputType.Auto;
            _outputWriter = Console.Out;
            Debug = true;
            Checked = true;
            GenerateInMemory = true;
            StdLib = true;
            DelaySign = false;

            Strict = false;
            TraceLevel = DefaultTraceLevel();

            if (loadDefaultReferences)
                LoadDefaultReferences();
        }
Beispiel #5
0
        public CompilerParameters(IReflectionTypeSystemProvider reflectionProvider, bool loadDefaultReferences)
        {
            _libPaths = new List<string>();
            _systemDir = Permissions.WithDiscoveryPermission(() => GetSystemDir());
            if (_systemDir != null)
            {
                _libPaths.Add(_systemDir);
                _libPaths.Add(Directory.GetCurrentDirectory());
            }
            _pipeline = null;
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _compilerReferences = new CompilerReferenceCollection(reflectionProvider);

            _maxExpansionIterations = 12;
            _outputAssembly = String.Empty;
            _outputType = CompilerOutputType.Auto;
            _outputWriter = Console.Out;
            _debug = true;
            _checked = true;
            _generateInMemory = true;
            _stdLib = true;

            if (Permissions.WithEnvironmentPermission(() => System.Environment.GetEnvironmentVariable("TRACE") != null))
                EnableTraceSwitch();

            _delaySign = false;

            Strict = false;

            if (loadDefaultReferences)
                LoadDefaultReferences();
        }
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline = null;
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxAttributeSteps = 2;
            _outputAssembly = string.Empty;
            _outputType = CompilerOutputType.ConsoleApplication;
            _outputWriter = System.Console.Out;
            _debug = true;
            _checked = true;
            _generateInMemory = true;
            _StdLib = true;

            _delaySign = false;

            if (loadDefaultReferences) LoadDefaultReferences();
        }
Beispiel #7
0
        public CompilerParameters(bool loadDefaultReferences)
        {
            _libpaths = new ArrayList();
            _systemDir = GetSystemDir();
            _libpaths.Add(_systemDir);
            _libpaths.Add(Directory.GetCurrentDirectory());

            _pipeline = null;
            _input = new CompilerInputCollection();
            _resources = new CompilerResourceCollection();
            _assemblyReferences = new AssemblyCollection();

            _maxExpansionIterations = 4;
            _outputAssembly = string.Empty;
            _outputType = CompilerOutputType.ConsoleApplication;
            _outputWriter = System.Console.Out;
            _debug = true;
            _checked = true;
            _generateInMemory = true;
            _StdLib = true;

            if (null != Environment.GetEnvironmentVariable("TRACE"))
                EnableTraceSwitch();

            _delaySign = false;

            if (loadDefaultReferences) LoadDefaultReferences();
        }