private void DoGetDirectives(CsPreprocess[] preprocess, List<Declaration> decs) { foreach (CsPreprocess p in preprocess) { if (p.Name == "region") { string name = p.Text; Declaration d = DoFindDeclaration(decs, p.Offset); if (d.Name != null) name = IndentLevel + new string(' ', DoCountSpaces(d.Name)) + name; decs.Add(new Declaration( name, new NSRange(p.Offset, p.Length), false, true)); } } }
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; }