Skip to content
Merged
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
17 changes: 17 additions & 0 deletions build-tools/api-merge/ApiDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ public void Merge (XDocument n, string apiLocation)
}
}
#endif
foreach (var smember in stype.Elements ()) {
var nmember = GetMember (ntype, smember);

if (nmember is null)
SetRemovedSince (smember, platform);
}

foreach (var nmember in ntype.Elements ()) {
var smember = GetMember (stype, nmember);
if (smember == null) {
Expand Down Expand Up @@ -308,6 +315,16 @@ void SetDeprecatedSince (XElement element, string platform)
deprecatedSince.SetValue (platform);
}

void SetRemovedSince (XElement element, string platform)
{
if (element is null)
return;

// Don't replace an earlier removal, as we want to keep the earliest one.
if (!element.Attributes ("removed-since").Any ())
element.Add (new XAttribute ("removed-since", platform));
}

XElement AddWithLocation (XElement old, XElement child, string location)
{
child.Add (new XAttribute ("merge.SourceFile", location));
Expand Down
Loading