Skip to content

Commit 4ace1f4

Browse files
committed
reftype in
1 parent 84d48a1 commit 4ace1f4

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

mdoc/Mono.Documentation/MDocUpdater.cs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,15 +3944,27 @@ public void MakeParameters (XmlElement root, MemberReference member, IList<Param
39443944

39453945
pe.SetAttribute ("Name", param.Name);
39463946
pe.SetAttribute ("Type", paramType);
3947-
if (param.ParameterType is ByReferenceType)
3947+
switch (param.ParameterType)
39483948
{
3949-
if (param.IsOut)
3950-
pe.SetAttribute ("RefType", "out");
3951-
else
3952-
pe.SetAttribute ("RefType", "ref");
3949+
case RequiredModifierType requiredModifierType:
3950+
switch (requiredModifierType.ModifierType.FullName)
3951+
{
3952+
case Consts.InAttribute:
3953+
pe.SetAttribute("RefType", "in");
3954+
break;
3955+
case Consts.OutAttribute:
3956+
pe.SetAttribute("RefType", "out");
3957+
break;
3958+
}
3959+
break;
3960+
case ByReferenceType byReferenceType:
3961+
pe.SetAttribute("RefType", param.IsOut ? "out" : param.IsIn && DocUtils.HasCustomAttribute(param, Consts.IsReadOnlyAttribute) ? "in" : "ref");
3962+
break;
3963+
default:
3964+
break;
39533965
}
39543966
//if (addIndex)
3955-
pe.SetAttribute (Consts.Index, index.ToString ());
3967+
pe.SetAttribute (Consts.Index, index.ToString ());
39563968
//if (addfx)
39573969
pe.SetAttribute (Consts.FrameworkAlternate, fx);
39583970

0 commit comments

Comments
 (0)