예제 #1
0
        public ScopedNameResolver(ScopedNameResolver parentResolver = null)
        {
            ParentResolver = parentResolver;

            _typeToQuery = new Dictionary <CoReTypeName, Query>();
            _idToQuery   = new Dictionary <string, Query>();
        }
예제 #2
0
        private bool Equals(ScopedNameResolver other)
        {
            var isTypeMapEq = EqualityUtils.Equals(_typeToQuery, other._typeToQuery);
            var isIdMapEq   = EqualityUtils.Equals(_idToQuery, other._idToQuery);

            return(Equals(ParentResolver, other.ParentResolver) && isTypeMapEq && isIdMapEq);
        }
예제 #3
0
 public void LeaveCurrentScope()
 {
     Asserts.NotNull(NameResolver.ParentResolver);
     NameResolver = NameResolver.ParentResolver;
     Asserts.NotNull(Enclosings.Parent);
     Enclosings = Enclosings.Parent;
 }
예제 #4
0
 public void EnterNewScope()
 {
     NameResolver = new ScopedNameResolver(NameResolver);
     Enclosings   = new ScopedEnclosings(Enclosings);
 }
예제 #5
0
 public UsageContext()
 {
     Enclosings   = new ScopedEnclosings();
     AllQueries   = Lists.NewList <Query>();
     NameResolver = new ScopedNameResolver();
 }