Imported Upstream version 5.18.0.142

Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-09 08:20:59 +00:00
parent e52655b4dc
commit 0abdbe5a7d
1547 changed files with 93792 additions and 47893 deletions

View File

@ -31,9 +31,14 @@ using System.Reflection;
using System.Text;
using System.Xml.Linq;
namespace Xamarin.ApiDiff {
namespace Mono.ApiTools {
public class FieldComparer : MemberComparer {
class FieldComparer : MemberComparer {
public FieldComparer (State state)
: base (state)
{
}
public override string GroupName {
get { return "fields"; }
@ -109,7 +114,7 @@ namespace Xamarin.ApiDiff {
var name = source.GetAttribute ("name");
var srcValue = source.GetAttribute ("value");
var tgtValue = target.GetAttribute ("value");
var change = new ApiChange (GetDescription (source));
var change = new ApiChange (GetDescription (source), State);
change.Header = "Modified " + GroupName;
if (State.BaseType == "System.Enum") {
@ -122,8 +127,8 @@ namespace Xamarin.ApiDiff {
} else {
RenderFieldAttributes (source.GetFieldAttributes (), target.GetFieldAttributes (), change);
var srcType = source.GetTypeName ("fieldtype");
var tgtType = target.GetTypeName ("fieldtype");
var srcType = source.GetTypeName ("fieldtype", State);
var tgtType = target.GetTypeName ("fieldtype", State);
if (srcType != tgtType) {
change.AppendModified (srcType, tgtType, true);
@ -184,7 +189,7 @@ namespace Xamarin.ApiDiff {
sb.Append ("const ");
}
string ftype = e.GetTypeName ("fieldtype");
string ftype = e.GetTypeName ("fieldtype", State);
sb.Append (ftype).Append (' ');
sb.Append (name);
if (ftype == "string" && e.Attribute ("value") != null) {