Beispiel #1
0
 private object DoGetValue(CsUsingAlias alias)
 {
     return alias.Value;
 }
Beispiel #2
0
        public CsNamespace(CsBody body, string name, CsExternAlias[] externs, CsUsingAlias[] aliases, CsUsingDirective[] uses, CsNamespace[] namespaces, CsType[] types, int offset, int length, int line)
            : base(body, types, offset, length, line)
        {
            Contract.Requires(!string.IsNullOrEmpty(name), "name is null or empty");
            Contract.Requires(externs != null, "externs is null");
            Contract.Requires(aliases != null, "aliases is null");
            Contract.Requires(uses != null, "uses is null");
            Contract.Requires(namespaces != null, "namespaces is null");

            Name = name;
            Externs = externs;
            Aliases = aliases;
            Uses = uses;
            Namespaces = namespaces;

            var decs = new List<CsDeclaration>();
            decs.AddRange(namespaces);
            SetDeclarations(decs);

            foreach (CsNamespace n in Namespaces)
                n.Namespace = this;
            foreach (CsType t in Types)
                t.Namespace = this;
        }
Beispiel #3
0
 private object DoGetAlias(CsUsingAlias alias)
 {
     return alias.Alias;
 }
Beispiel #4
0
        public CsGlobalNamespace(CsPreprocess[] preprocess, CsBody body, CsAttribute[] attrs, CsExternAlias[] externs, CsUsingAlias[] aliases, CsUsingDirective[] uses, CsNamespace[] namespaces, CsType[] types, int length)
            : base(body, "<globals>", externs, aliases, uses, namespaces, types, 0, length, 1)
        {
            Contract.Requires(attrs != null, "attrs is null");
            Contract.Requires(preprocess != null, "preprocess is null");

            Attributes = attrs;
            Preprocess = preprocess;
        }