Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mdoc/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Mono.Documentation
{
public static class Consts
{
public static string MonoVersion = "5.9.6";
public static string MonoVersion = "5.9.7";
public const string DocId = "DocId";
public const string CppCli = "C++ CLI";
public const string CppCx = "C++ CX";
Expand Down
26 changes: 22 additions & 4 deletions mdoc/Mono.Documentation/MDocUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3944,15 +3944,33 @@ public void MakeParameters (XmlElement root, MemberReference member, IList<Param

pe.SetAttribute ("Name", param.Name);
pe.SetAttribute ("Type", paramType);
if (param.ParameterType is ByReferenceType)

TypeReference parameterType = param.ParameterType;
if (parameterType is RequiredModifierType requiredModifierType)
{
switch (requiredModifierType.ModifierType.FullName)
{
case Consts.InAttribute:
pe.SetAttribute("RefType", "in");
break;
case Consts.OutAttribute:
pe.SetAttribute("RefType", "out");
break;
}
parameterType = requiredModifierType.ElementType;
}
if (parameterType is ByReferenceType)
{
if (param.IsOut)
pe.SetAttribute ("RefType", "out");
pe.SetAttribute("RefType", "out");
else if (param.IsIn && DocUtils.HasCustomAttribute(param, Consts.IsReadOnlyAttribute))
pe.SetAttribute("RefType", "in");
else
pe.SetAttribute ("RefType", "ref");
pe.SetAttribute("RefType", "ref");
}

//if (addIndex)
pe.SetAttribute (Consts.Index, index.ToString ());
pe.SetAttribute (Consts.Index, index.ToString ());
//if (addfx)
pe.SetAttribute (Consts.FrameworkAlternate, fx);

Expand Down
15 changes: 7 additions & 8 deletions mdoc/Mono.Documentation/Updater/Formatters/DocIdFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ public DocIdFormatter(TypeMap map) : base(map)
slashDocMemberFormatter = new SlashDocMemberFormatter(map);
}

public override string GetDeclaration (TypeReference tref)
public override string GetDeclaration(TypeReference tref)
{
return DocCommentId.GetDocCommentId (tref.Resolve ());
return DocCommentId.GetDocCommentId(tref.Resolve());
}
public override string GetDeclaration (MemberReference mreference)
public override string GetDeclaration(MemberReference mreference)
{
if (mreference is AttachedEventReference || mreference is AttachedPropertyReference)
{
return slashDocMemberFormatter.GetDeclaration(mreference);
}
return DocCommentId.GetDocCommentId (mreference.Resolve ());
string ret = mreference is AttachedEventReference || mreference is AttachedPropertyReference
? slashDocMemberFormatter.GetDeclaration(mreference)
: DocCommentId.GetDocCommentId(mreference.Resolve());
return ret.Replace("|System.Runtime.InteropServices.InAttribute", string.Empty);
}
}
}
2 changes: 1 addition & 1 deletion mdoc/mdoc.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>mdoc</id>
<version>5.9.6</version>
<version>5.9.7</version>
<title>mdoc</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand Down