Пример #1
0
 public NS(DefaultResolvedAssembly assembly, UnresolvedNamespace ns, INamespace parentNamespace)
 {
     this.assembly        = assembly;
     this.ns              = ns;
     this.parentNamespace = parentNamespace;
     this.childNamespaces = new ProjectedList <NS, UnresolvedNamespace, NS>(
         this, ns.Children, (self, c) => new NS(self.assembly, c, self));
 }
Пример #2
0
        public IAssembly Resolve(ITypeResolveContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            Freeze();
            var       cache = context.Compilation.CacheManager;
            IAssembly asm   = (IAssembly)cache.GetShared(this);

            if (asm != null)
            {
                return(asm);
            }
            else
            {
                asm = new DefaultResolvedAssembly(context.Compilation, this);
                return((IAssembly)cache.GetOrAddShared(this, asm));
            }
        }
				public NS(DefaultResolvedAssembly assembly, UnresolvedNamespace ns, INamespace parentNamespace)
				{
					this.assembly = assembly;
					this.ns = ns;
					this.parentNamespace = parentNamespace;
					this.childNamespaces = new ProjectedList<NS, UnresolvedNamespace, NS>(
						this, ns.Children, (self, c) => new NS(self.assembly, c, self));
				}
		public IAssembly Resolve(ITypeResolveContext context)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			Freeze();
			var cache = context.Compilation.CacheManager;
			IAssembly asm = (IAssembly)cache.GetShared(this);
			if (asm != null) {
				return asm;
			} else {
				asm = new DefaultResolvedAssembly(context.Compilation, this);
				return (IAssembly)cache.GetOrAddShared(this, asm);
			}
		}