Example #1
0
 public DeclaredTypeManager(SyntaxHierarchy hierarchy, ITypeManager typeManager, IResourceTypeProvider resourceTypeProvider, IReadOnlyDictionary <SyntaxBase, Symbol> bindings, IReadOnlyDictionary <DeclaredSymbol, ImmutableArray <DeclaredSymbol> > cyclesBySyntax, ResourceScopeType targetScope)
 {
     this.hierarchy            = hierarchy;
     this.typeManager          = typeManager;
     this.resourceTypeProvider = resourceTypeProvider;
     this.bindings             = bindings;
     this.cyclesBySyntax       = cyclesBySyntax;
     this.targetScope          = targetScope;
 }
Example #2
0
 public TypeAssignmentVisitor(
     IResourceTypeProvider resourceTypeProvider,
     TypeManager typeManager,
     IReadOnlyDictionary <SyntaxBase, Symbol> bindings,
     IReadOnlyDictionary <DeclaredSymbol, ImmutableArray <DeclaredSymbol> > cyclesBySymbol,
     SyntaxHierarchy hierarchy,
     ResourceScopeType targetScope)
 {
     this.resourceTypeProvider = resourceTypeProvider;
     this.typeManager          = typeManager;
     // bindings will be modified by name binding after this object is created
     // so we can't make an immutable copy here
     // (using the IReadOnlyDictionary to prevent accidental mutation)
     this.bindings       = bindings;
     this.cyclesBySymbol = cyclesBySymbol;
     this.assignedTypes  = new Dictionary <SyntaxBase, TypeAssignment>();
     this.hierarchy      = hierarchy;
     this.targetScope    = targetScope;
 }
Example #3
0
        public TypeManager(IResourceTypeProvider resourceTypeProvider, IReadOnlyDictionary <SyntaxBase, Symbol> bindings, IReadOnlyDictionary <DeclaredSymbol, ImmutableArray <DeclaredSymbol> > cyclesBySymbol, SyntaxHierarchy hierarchy, ResourceScopeType targetScope)
        {
            this.ResourceTypeProvider = resourceTypeProvider;

            // bindings will be modified by name binding after this object is created
            // so we can't make an immutable copy here
            // (using the IReadOnlyDictionary to prevent accidental mutation)
            this.typeAssignmentVisitor = new TypeAssignmentVisitor(resourceTypeProvider, this, bindings, cyclesBySymbol, hierarchy, targetScope);

            this.declaredTypeManager = new DeclaredTypeManager(hierarchy, this, resourceTypeProvider, bindings, cyclesBySymbol, targetScope);
        }