el.SetAttribute ("name", name);
string normalized = mc.DocComment;
el.InnerXml = normalized;
- // csc keeps lines as written in the sources
- // and inserts formatting indentation (which
- // is different from XmlTextWriter.Formatting
- // one), but when a start tag contains an
- // endline, it joins the next line. We don't
- // have to follow such a hacky behavior.
- string [] split =
- normalized.Split ('\n');
- int j = 0;
- for (int i = 0; i < split.Length; i++) {
- string s = split [i].TrimEnd ();
- if (s.Length > 0)
- split [j++] = s;
- }
- el.InnerXml = line_head + String.Join (
- line_head, split, 0, j);
+
+ string [] split = normalized.Split ('\n');
+ el.InnerXml = line_head + String.Join (line_head, split);
return el;
} catch (Exception ex) {
Report.Warning (1570, 1, mc.Location, "XML documentation comment on `{0}' is not well-formed XML markup ({1})",
return context.LookupNamespaceOrType (mn.Name, mn.Arity, LookupMode.Probing, Location.Null);
var left = ResolveMemberName (context, mn.Left);
- var ns = left as Namespace;
+ var ns = left as NamespaceExpression;
if (ns != null)
return ns.LookupTypeOrNamespace (context, mn.Name, mn.Arity, LookupMode.Probing, Location.Null);
TypeExpr texpr = left as TypeExpr;
if (texpr != null) {
- var found = MemberCache.FindNestedType (texpr.Type, ParsedName.Name, ParsedName.Arity);
+ var found = MemberCache.FindNestedType (texpr.Type, mn.Name, mn.Arity, false);
if (found != null)
return new TypeExpression (found, Location.Null);
} else if (ParsedName.Left != null) {
fne = ResolveMemberName (mc, ParsedName.Left);
if (fne != null) {
- var ns = fne as Namespace;
+ var ns = fne as NamespaceExpression;
if (ns != null) {
fne = ns.LookupTypeOrNamespace (mc, ParsedName.Name, ParsedName.Arity, LookupMode.Probing, Location.Null);
if (fne != null) {
return host.GetSignatureForError ();
}
- public ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity)
+ public ExtensionMethodCandidates LookupExtensionMethod (string name, int arity)
{
return null;
}