public void AddUsingAlias(string alias, string aliasNamespace)
        {
            if (UsingAliases.ContainsKey(aliasNamespace))
            {
                return;
            }

            UsingAliases.Add(aliasNamespace, alias);
        }
Ejemplo n.º 2
0
        public void AddImport(Import imp)
        {
            _imports.Add(imp);
            var u = imp.NamespaceExpression.ToTypeReference(CompilerContext.InternProvider);

            if (imp.Alias == null)
            {
                Usings.Add(u as TypeNameExpression);
            }
            else
            {
                UsingAliases.Add(new KeyValuePair <string, TypeNameExpression>(imp.Alias.Value, u as TypeNameExpression));
            }
        }
Ejemplo n.º 3
0
 public void WriteUsingAlias(UsingAlias alias)
 {
     alias.AllTypesAreResolved = !_visibility;
     UsingAliases.Add(alias);
 }