You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
@ -31,13 +31,18 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Xamarin.ApiDiff {
|
||||
namespace Mono.ApiTools {
|
||||
|
||||
public abstract class MemberComparer : Comparer {
|
||||
abstract class MemberComparer : Comparer {
|
||||
|
||||
// true if this is the first element being added or removed in the group being rendered
|
||||
protected bool first;
|
||||
|
||||
public MemberComparer (State state)
|
||||
: base (state)
|
||||
{
|
||||
}
|
||||
|
||||
public abstract string GroupName { get; }
|
||||
public abstract string ElementName { get; }
|
||||
|
||||
@ -230,7 +235,7 @@ namespace Xamarin.ApiDiff {
|
||||
string RenderGenericParameter (XElement gp)
|
||||
{
|
||||
var sb = new StringBuilder ();
|
||||
sb.Append (gp.GetTypeName ("name"));
|
||||
sb.Append (gp.GetTypeName ("name", State));
|
||||
|
||||
var constraints = gp.DescendantList ("generic-parameter-constraints", "generic-parameter-constraint");
|
||||
if (constraints != null && constraints.Count > 0) {
|
||||
@ -238,7 +243,7 @@ namespace Xamarin.ApiDiff {
|
||||
for (int i = 0; i < constraints.Count; i++) {
|
||||
if (i > 0)
|
||||
sb.Append (", ");
|
||||
sb.Append (constraints [i].GetTypeName ("name"));
|
||||
sb.Append (constraints [i].GetTypeName ("name", State));
|
||||
}
|
||||
}
|
||||
return sb.ToString ();
|
||||
@ -255,7 +260,7 @@ namespace Xamarin.ApiDiff {
|
||||
return;
|
||||
|
||||
change.Append (Formatter.LesserThan);
|
||||
for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
|
||||
for (int i = 0; i < System.Math.Max (srcCount, tgtCount); i++) {
|
||||
if (i > 0)
|
||||
change.Append (", ");
|
||||
if (i >= srcCount) {
|
||||
@ -305,7 +310,7 @@ namespace Xamarin.ApiDiff {
|
||||
var tgtCount = tgt == null ? 0 : tgt.Count;
|
||||
|
||||
change.Append (" (");
|
||||
for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
|
||||
for (int i = 0; i < System.Math.Max (srcCount, tgtCount); i++) {
|
||||
if (i > 0)
|
||||
change.Append (", ");
|
||||
|
||||
@ -319,12 +324,12 @@ namespace Xamarin.ApiDiff {
|
||||
mods_src = mods_src + " ";
|
||||
|
||||
if (i >= srcCount) {
|
||||
change.AppendAdded (mods_tgt + tgt [i].GetTypeName ("type") + " " + tgt [i].GetAttribute ("name"), true);
|
||||
change.AppendAdded (mods_tgt + tgt [i].GetTypeName ("type", State) + " " + tgt [i].GetAttribute ("name"), true);
|
||||
} else if (i >= tgtCount) {
|
||||
change.AppendRemoved (mods_src + src [i].GetTypeName ("type") + " " + src [i].GetAttribute ("name"), true);
|
||||
change.AppendRemoved (mods_src + src [i].GetTypeName ("type", State) + " " + src [i].GetAttribute ("name"), true);
|
||||
} else {
|
||||
var paramSourceType = src [i].GetTypeName ("type");
|
||||
var paramTargetType = tgt [i].GetTypeName ("type");
|
||||
var paramSourceType = src [i].GetTypeName ("type", State);
|
||||
var paramTargetType = tgt [i].GetTypeName ("type", State);
|
||||
|
||||
var paramSourceName = src [i].GetAttribute ("name");
|
||||
var paramTargetName = tgt [i].GetAttribute ("name");
|
||||
@ -564,7 +569,7 @@ namespace Xamarin.ApiDiff {
|
||||
if (srcObsolete == null) {
|
||||
if (tgtObsolete == null)
|
||||
return; // neither is obsolete
|
||||
var change = new ApiChange (GetDescription (source));
|
||||
var change = new ApiChange (GetDescription (source), State);
|
||||
change.Header = "Obsoleted " + GroupName;
|
||||
Formatter.RenderObsoleteMessage (change.Member, this, GetDescription (target), tgtObsolete);
|
||||
change.AnyChange = true;
|
||||
|
Reference in New Issue
Block a user