Boo.Lang.Compiler.CompilerParameters.LoadDefaultReferences C# (CSharp) Метод

LoadDefaultReferences() публичный Метод

public LoadDefaultReferences ( ) : void
Результат void
        public void LoadDefaultReferences()
        {
            //boo.lang.dll
            _booAssembly = typeof(Builtins).Assembly;
            _compilerReferences.Add(_booAssembly);

            //boo.lang.extensions.dll
            //try loading extensions next to Boo.Lang (in the same directory)
            var extensionsAssembly = TryToLoadExtensionsAssembly();
            if (extensionsAssembly != null)
                _compilerReferences.Add(extensionsAssembly);

            //boo.lang.compiler.dll
            _compilerReferences.Add(GetType().Assembly);

            //mscorlib
            _compilerReferences.Add(LoadAssembly("mscorlib", true));
            //System
            _compilerReferences.Add(LoadAssembly("System", true));
            //System.Core
            _compilerReferences.Add(LoadAssembly("System.Core", true));

            Permissions.WithDiscoveryPermission<object>(() =>
            {
                WriteTraceInfo("BOO LANG DLL: " + _booAssembly.Location);
                WriteTraceInfo("BOO COMPILER EXTENSIONS DLL: " + (extensionsAssembly != null ? extensionsAssembly.ToString() : "NOT FOUND!"));
                return null;
            });
        }

Usage Example

Пример #1
0
		private CommandLineParser(IEnumerable<string> args, CompilerParameters options)
		{
			_options = options;
			_options.GenerateInMemory = false;

			var tempLibPaths = _options.LibPaths.ToArray();
			_options.LibPaths.Clear();

			Parse(args);

			//move standard libpaths below any new ones:
			_options.LibPaths.Extend(tempLibPaths);

			if (_options.StdLib)
				_options.LoadDefaultReferences();
			else if (!_noConfig)
				_references.Insert(0, "mscorlib");

			LoadReferences();
			ConfigurePipeline();

			if (_options.TraceInfo)
			{
				_options.Pipeline.BeforeStep += OnBeforeStep;
				_options.Pipeline.AfterStep += OnAfterStep;
			}

		}
All Usage Examples Of Boo.Lang.Compiler.CompilerParameters::LoadDefaultReferences