void ResolveUsingAssemblyReferences() { foreach (Boo.Lang.Ast.Module module in CompileUnit.Modules) { UsingCollection usingCollection = module.Using; Using[] usingArray = usingCollection.ToArray(); for (int i = 0; i < usingArray.Length; ++i) { Using u = usingArray[i]; ReferenceExpression reference = u.AssemblyReference; if (null != reference) { try { Assembly asm = Assembly.LoadWithPartialName(reference.Name); CompilerParameters.References.Add(asm); BindingManager.Bind(reference, new Bindings.AssemblyBinding(asm)); } catch (Exception x) { Errors.UnableToLoadAssembly(reference, reference.Name, x); usingCollection.RemoveAt(i); } } } } }
public Scope () { m_scopes = new ScopeCollection (this); m_usings = new UsingCollection (this); m_constants = new ConstantCollection (this); m_variables = new VariableCollection (this); }
public Scope() { m_scopes = new ScopeCollection(this); m_usings = new UsingCollection(this); m_constants = new ConstantCollection(this); m_variables = new VariableCollection(this); }
protected ModuleImpl(LexicalInfo lexicalInfo) : base(lexicalInfo) { _using = new UsingCollection(this); Globals = new Block(); }
protected ModuleImpl(LexicalInfo lexicalInfo, NamespaceDeclaration namespace_) : base(lexicalInfo) { _using = new UsingCollection(this); Globals = new Block(); Namespace = namespace_; }
protected ModuleImpl(NamespaceDeclaration namespace_) { _using = new UsingCollection(this); Globals = new Block(); Namespace = namespace_; }
protected ModuleImpl() { _using = new UsingCollection(this); Globals = new Block(); }