Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@ -86,6 +86,13 @@ namespace Monodoc.Ecma
set;
}
/* The GenericTypeArguments list may be null, in which case, this
* is an easier/safer way to check the count.
*/
public int GenericTypeArgumentsCount {
get { return GenericTypeArguments != null ? GenericTypeArguments.Count : 0; }
}
/* This property tells if the above collections only correct value
* is the number of item in it to represent generic arguments
*/
@ -100,6 +107,13 @@ namespace Monodoc.Ecma
set;
}
/* The GenericMemberArguments list may be null, in which case, this
* is an easier/safer way to check the count.
*/
public int GenericMemberArgumentsCount {
get { return GenericMemberArguments != null ? GenericMemberArguments.Count : 0; }
}
public bool GenericMemberArgumentsIsNumeric {
get {
return GenericMemberArguments != null && GenericMemberArguments.FirstOrDefault () == null;
@ -111,6 +125,13 @@ namespace Monodoc.Ecma
set;
}
/* The GenericTypeArguments list may be null, in which case, this
* is an easier/safer way to check the count.
*/
public int MemberArgumentsCount {
get { return MemberArguments != null ? MemberArguments.Count : 0; }
}
/* This indicates that we actually want an inner part of the ecmadesc
* i.e. in case of T: we could want the members (*), ctor (C), methods (M), ...
*/
@ -198,6 +219,7 @@ namespace Monodoc.Ecma
var sb = new StringBuilder ();
// Cref type
sb.Append (DescKind.ToString ()[0]);
sb.Append (":");
// Create the rest
ConstructCRef (sb);
@ -214,8 +236,15 @@ namespace Monodoc.Ecma
sb.Append (TypeName);
if (GenericTypeArguments != null) {
sb.Append ('<');
foreach (var t in GenericTypeArguments)
int i=0;
foreach (var t in GenericTypeArguments) {
if (i > 0) {
sb.Append (",");
}
t.ConstructCRef (sb);
i++;
}
sb.Append ('>');
}
if (NestedType != null) {
@ -232,8 +261,20 @@ namespace Monodoc.Ecma
if (DescKind == Kind.Type)
return;
if (MemberArguments != null) {
sb.Append (".");
sb.Append (MemberName);
if (MemberArguments != null && MemberArgumentsCount > 0) {
sb.Append ("(");
int i=0;
foreach (var a in MemberArguments) {
if (i > 0) {
sb.Append(",");
}
a.ConstructCRef (sb);
i++;
}
sb.Append (")");
}
}