| 1 |
using System.Collections.Generic; |
| 2 |
using System.Text; |
| 3 |
using Mono.Cecil; |
| 4 |
|
| 5 |
namespace Mono.Documentation.Updater |
| 6 |
{ |
| 7 |
class SlashDocCSharpMemberFormatter : MsxdocSlashDocMemberFormatter |
| 8 |
{ |
| 9 |
/// <summary> |
| 10 |
/// C# compiler uses complecated logic to generate docIds for Eii properties. Need to have special logic here. |
| 11 |
/// </summary> |
| 12 |
/// <param name="property">Value to process</param> |
| 13 |
/// <returns>DocId for property member wchich needs to be equal to docId generated by compiler's /doc flag </returns> |
| 14 |
protected override string EiiPropertyProcessing(PropertyReference property) |
| 15 |
{ |
| 16 |
string name; |
| 17 |
|
| 18 |
PropertyDefinition propertyDef = property as PropertyDefinition; |
| 19 |
MethodDefinition method = null; |
| 20 |
if (propertyDef != null) |
| 21 |
method = propertyDef.GetMethod ?? propertyDef.SetMethod; |
| 22 |
if (method != null && !DocUtils.IsExplicitlyImplemented(method)) |
| 23 |
name = property.Name; |
| 24 |
else |
| 25 |
{ |
| 26 |
DocUtils.GetInfoForExplicitlyImplementedMethod(method, out var iface, out var ifaceMethod); |
| 27 |
AddTypeCount = false; |
| 28 |
name = string.Join("#", new string[]{ |
| 29 |
GetTypeName (iface).Replace (".", "#"), |
| 30 |
DocUtils.GetMember (property.Name) |
| 31 |
}); |
| 32 |
AddTypeCount = true; |
| 33 |
} |
| 34 |
|
| 35 |
return name; |
| 36 |
} |
| 37 |
} |
| 38 |
} |