Ejemplo n.º 1
0
 public NS(CppAssembly assembly)
 {
     this.assembly = assembly;
     this.fullName = string.Empty;
     this.name     = string.Empty;
     this.types    = new Dictionary <FullNameAndTypeParameterCount, ITypeDefinition>(new FullNameAndTypeParameterCountComparer(assembly.compilation.NameComparer));
 }
Ejemplo n.º 2
0
 public NS(NS parentNamespace, string fullName, string name)
 {
     this.assembly        = parentNamespace.assembly;
     this.parentNamespace = parentNamespace;
     this.fullName        = fullName;
     this.name            = name;
     this.types           = new Dictionary <FullNameAndTypeParameterCount, ITypeDefinition>(parentNamespace.types.Comparer);
 }
Ejemplo n.º 3
0
			public NS(CppAssembly assembly)
			{
				this.assembly = assembly;
				this.fullName = string.Empty;
				this.name = string.Empty;
				this.types = new Dictionary<FullNameAndTypeParameterCount, ITypeDefinition>(new FullNameAndTypeParameterCountComparer(assembly.compilation.NameComparer));
			}
Ejemplo n.º 4
0
			public NS(NS parentNamespace, string fullName, string name)
			{
				this.assembly = parentNamespace.assembly;
				this.parentNamespace = parentNamespace;
				this.fullName = fullName;
				this.name = name;
				this.types = new Dictionary<FullNameAndTypeParameterCount, ITypeDefinition>(parentNamespace.types.Comparer);
			}
Ejemplo n.º 5
0
		IAssembly IAssemblyReference.Resolve(ITypeResolveContext context)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			var cache = context.Compilation.CacheManager;
			IAssembly asm = (IAssembly)cache.GetShared(this);
			if (asm != null) {
				return asm;
			} else {
				asm = new CppAssembly(context.Compilation, this);
				return (IAssembly)cache.GetOrAddShared(this, asm);
			}
		}