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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
final="false" name="SomeObject" static="false" visibility="public">
<field deprecated="not deprecated" final="true" name="Value" static="false" transient="false" type="int" type-generic-aware="int" visibility="public" volatile="false">
</field>
<field deprecated="not deprecated" final="false" name="BooleanValue" static="false" transient="false" type="boolean" type-generic-aware="int" visibility="public" volatile="false" />
<field deprecated="not deprecated" final="false" name="CharValue" static="false" transient="false" type="boolean" type-generic-aware="int" visibility="public" volatile="false" />
</class>
</package>
</api>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,44 @@ public int Value {
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='BooleanValue']"
public bool BooleanValue {
get {
const string __id = "BooleanValue.Z";

var __v = _members.InstanceFields.GetBooleanValue (__id, this);
return __v;
}
set {
const string __id = "BooleanValue.Z";

try {
_members.InstanceFields.SetValue (__id, this, value);
} finally {
}
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='CharValue']"
public bool CharValue {
get {
const string __id = "CharValue.Z";

var __v = _members.InstanceFields.GetBooleanValue (__id, this);
return __v;
}
set {
const string __id = "CharValue.Z";
Comment thread
jonathanpeppers marked this conversation as resolved.

try {
_members.InstanceFields.SetValue (__id, this, value);
} finally {
}
}
}

static readonly JniPeerMembers _members = new JniPeerMembers ("xamarin/test/SomeObject", typeof (SomeObject));

[global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</field>
<field deprecated="not deprecated" final="false" name="Value2" static="true" transient="false" type="int" type-generic-aware="int" visibility="public" volatile="false">
</field>
<field deprecated="not deprecated" final="false" name="BooleanValue" static="true" transient="false" type="boolean" type-generic-aware="int" visibility="public" volatile="false" />
<field deprecated="not deprecated" final="false" name="CharValue" static="true" transient="false" type="boolean" type-generic-aware="int" visibility="public" volatile="false" />
</class>
</package>
</api>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,44 @@ public static int Value2 {
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='BooleanValue']"
public static bool BooleanValue {
get {
const string __id = "BooleanValue.Z";

var __v = _members.StaticFields.GetBooleanValue (__id);
return __v;
}
set {
const string __id = "BooleanValue.Z";

try {
_members.StaticFields.SetValue (__id, value);
} finally {
}
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='CharValue']"
public static bool CharValue {
get {
const string __id = "CharValue.Z";

var __v = _members.StaticFields.GetBooleanValue (__id);
return __v;
}
set {
const string __id = "CharValue.Z";
Comment thread
jonathanpeppers marked this conversation as resolved.

try {
_members.StaticFields.SetValue (__id, value);
} finally {
}
}
}

static readonly JniPeerMembers _members = new JniPeerMembers ("xamarin/test/SomeObject", typeof (SomeObject));

[global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,46 @@ public int Value {
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='BooleanValue']"
[Register ("BooleanValue")]
public bool BooleanValue {
get {
const string __id = "BooleanValue.Z";

var __v = _members.InstanceFields.GetBooleanValue (__id, this);
return __v;
}
set {
const string __id = "BooleanValue.Z";

try {
_members.InstanceFields.SetValue (__id, this, value);
} finally {
}
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='CharValue']"
[Register ("CharValue")]
public bool CharValue {
get {
const string __id = "CharValue.Z";

var __v = _members.InstanceFields.GetBooleanValue (__id, this);
return __v;
}
set {
const string __id = "CharValue.Z";
Comment thread
jonathanpeppers marked this conversation as resolved.

try {
_members.InstanceFields.SetValue (__id, this, value);
} finally {
}
}
}

static readonly JniPeerMembers _members = new XAPeerMembers ("xamarin/test/SomeObject", typeof (SomeObject));

internal static new IntPtr class_ref {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,46 @@ public static int Value2 {
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='BooleanValue']"
[Register ("BooleanValue")]
public static bool BooleanValue {
get {
const string __id = "BooleanValue.Z";

var __v = _members.StaticFields.GetBooleanValue (__id);
return __v;
}
set {
const string __id = "BooleanValue.Z";

try {
_members.StaticFields.SetValue (__id, value);
} finally {
}
}
}


// Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='CharValue']"
[Register ("CharValue")]
public static bool CharValue {
get {
const string __id = "CharValue.Z";

var __v = _members.StaticFields.GetBooleanValue (__id);
return __v;
}
set {
const string __id = "CharValue.Z";
Comment thread
jonathanpeppers marked this conversation as resolved.

try {
_members.StaticFields.SetValue (__id, value);
} finally {
}
}
}

static readonly JniPeerMembers _members = new XAPeerMembers ("xamarin/test/SomeObject", typeof (SomeObject));

internal static new IntPtr class_ref {
Expand Down
5 changes: 4 additions & 1 deletion tools/generator/SourceWriters/BoundFieldAsProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ protected override void WriteSetterBody (CodeWriter writer)
writer.WriteLine (prep);
}

arg = field.SetParameters [0].ToNative (opt);
var param = field.SetParameters [0];
arg = param.Symbol.OnlyFormatOnMarshal
? opt.GetSafeIdentifier (param.Name)
: param.ToNative (opt);

if (opt.CodeGenerationTarget != CodeGenerationTarget.JavaInterop1 &&
field.SetParameters.HasCleanup &&
Expand Down