-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update test to correctly verify see cref vs seealso cref. * Convert inner seealso crefs to see crefs. Preserve seealsos that are standalone children. * Skip porting seealsos if the CLI argument for member or type is set to true. * Add tests to verify that skipping porting works for members and for types.
- Loading branch information
1 parent
842204c
commit 7171357
Showing
9 changed files
with
348 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Xml.Linq; | ||
|
||
namespace ApiDocsSync.PortToDocs.Docs; | ||
|
||
internal class DocsSeeAlso | ||
{ | ||
private readonly XElement XESeeAlso; | ||
|
||
public IDocsAPI ParentAPI | ||
{ | ||
get; private set; | ||
} | ||
|
||
public string Cref => XmlHelper.GetAttributeValue(XESeeAlso, "cref"); | ||
|
||
public DocsSeeAlso(IDocsAPI parentAPI, XElement xSeeAlso) | ||
{ | ||
ParentAPI = parentAPI; | ||
XESeeAlso = xSeeAlso; | ||
} | ||
|
||
public override string ToString() => $"seealso cref={Cref}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/PortToDocs/src/libraries/IntelliSenseXml/IntelliSenseXmlSeeAlso.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Xml.Linq; | ||
|
||
namespace ApiDocsSync.PortToDocs.IntelliSenseXml; | ||
|
||
internal class IntelliSenseXmlSeeAlso(XElement xeSeeAlso) | ||
{ | ||
public XElement XESeeAlso | ||
{ | ||
get; | ||
private set; | ||
} = xeSeeAlso; | ||
|
||
private string _cref = string.Empty; | ||
public string Cref | ||
{ | ||
get | ||
{ | ||
if (string.IsNullOrWhiteSpace(_cref)) | ||
{ | ||
_cref = XmlHelper.GetAttributeValue(XESeeAlso, "cref"); | ||
} | ||
return _cref; | ||
} | ||
} | ||
|
||
public override string ToString() => $"SeeAlso cref={Cref}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.