@@ -65,6 +65,7 @@ By default, the attributed method's name dictates the name of the method/field.
65
65
Class(int i) { PrivateField = i; }
66
66
void PrivateMethod() { }
67
67
int PrivateField;
68
+ int PrivateProperty { get => PrivateField; }
68
69
}
69
70
70
71
public void CallStaticPrivateMethod()
@@ -78,7 +79,6 @@ By default, the attributed method's name dictates the name of the method/field.
78
79
{
79
80
ref int f = ref GetSetStaticPrivateField(null);
80
81
81
-
82
82
[UnsafeAccessor(UnsafeAccessorKind.StaticField, Name = "StaticPrivateField")]
83
83
extern static ref int GetSetStaticPrivateField(Class c);
84
84
}
@@ -90,7 +90,6 @@ By default, the attributed method's name dictates the name of the method/field.
90
90
91
91
PrivateCtorAsMethod(c2, 2);
92
92
93
-
94
93
[UnsafeAccessor(UnsafeAccessorKind.Constructor)]
95
94
extern static Class PrivateCtor(int i);
96
95
@@ -105,11 +104,17 @@ By default, the attributed method's name dictates the name of the method/field.
105
104
[UnsafeAccessor(UnsafeAccessorKind.Method, Name = nameof(PrivateMethod))]
106
105
extern static void PrivateMethod(Class c);
107
106
}
107
+ public void GetPrivateProperty(Class c)
108
+ {
109
+ int f = GetPrivateProperty(c);
110
+
111
+ [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_PrivateProperty")]
112
+ extern static int GetPrivateProperty(Class c);
113
+ }
108
114
public void GetSetPrivateField(Class c)
109
115
{
110
116
ref int f = ref GetSetPrivateField(c);
111
117
112
-
113
118
[UnsafeAccessor(UnsafeAccessorKind.Field, Name = "PrivateField")]
114
119
extern static ref int GetSetPrivateField(Class c);
115
120
}
0 commit comments