private CSharpTypeResolveContext(IModule module, ResolvedUsingScope usingScope, ITypeDefinition typeDefinition, IMember member, string[] methodTypeParameterNames) { this.module = module; this.currentUsingScope = usingScope; this.currentTypeDefinition = typeDefinition; this.currentMember = member; this.methodTypeParameterNames = methodTypeParameterNames; }
public CSharpTypeResolveContext(IModule module, ResolvedUsingScope usingScope = null, ITypeDefinition typeDefinition = null, IMember member = null) { if (module == null) { throw new ArgumentNullException(nameof(module)); } this.module = module; this.currentUsingScope = usingScope; this.currentTypeDefinition = typeDefinition; this.currentMember = member; }
public CSharpTypeResolveContext(IAssembly assembly, ResolvedUsingScope usingScope = null, ITypeDefinition typeDefinition = null, IMember member = null) { if (assembly == null) { throw new ArgumentNullException("assembly"); } this.assembly = assembly; this.currentUsingScope = usingScope; this.currentTypeDefinition = typeDefinition; this.currentMember = member; }
/// <summary> /// Resolves the namespace represented by this using scope. /// </summary> public ResolvedUsingScope Resolve(ICompilation compilation) { CacheManager cache = compilation.CacheManager; ResolvedUsingScope resolved = cache.GetShared(this) as ResolvedUsingScope; if (resolved == null) { var csContext = new CSharpTypeResolveContext(compilation.MainModule, parent != null ? parent.Resolve(compilation) : null); resolved = (ResolvedUsingScope)cache.GetOrAddShared(this, new ResolvedUsingScope(csContext, this)); } return(resolved); }
public CSharpTypeResolveContext WithUsingScope(ResolvedUsingScope usingScope) { return(new CSharpTypeResolveContext(module, usingScope, currentTypeDefinition, currentMember, methodTypeParameterNames)); }