-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ObjectiveCMarshal.xml
227 lines (212 loc) · 15.3 KB
/
ObjectiveCMarshal.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<Type Name="ObjectiveCMarshal" FullName="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal">
<TypeSignature Language="C#" Value="public static class ObjectiveCMarshal" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit ObjectiveCMarshal extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal" />
<TypeSignature Language="VB.NET" Value="Public Class ObjectiveCMarshal" />
<TypeSignature Language="F#" Value="type ObjectiveCMarshal = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ObjectiveCMarshal abstract sealed" />
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.CLSCompliant(false)]</AttributeName>
<AttributeName Language="F#">[<System.CLSCompliant(false)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("macos")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("macos")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>API to enable Objective-C marshalling.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="CreateReferenceTrackingHandle">
<MemberSignature Language="C#" Value="public static System.Runtime.InteropServices.GCHandle CreateReferenceTrackingHandle (object obj, out Span<IntPtr> taggedMemory);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Runtime.InteropServices.GCHandle CreateReferenceTrackingHandle(object obj, [out] valuetype System.Span`1<native int>& taggedMemory) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.CreateReferenceTrackingHandle(System.Object,System.Span{System.IntPtr}@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateReferenceTrackingHandle (obj As Object, ByRef taggedMemory As Span(Of IntPtr)) As GCHandle" />
<MemberSignature Language="F#" Value="static member CreateReferenceTrackingHandle : obj * Span -> System.Runtime.InteropServices.GCHandle" Usage="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.CreateReferenceTrackingHandle (obj, taggedMemory)" />
<MemberSignature Language="C++ CLI" Value="public:
 static System::Runtime::InteropServices::GCHandle CreateReferenceTrackingHandle(System::Object ^ obj, [Runtime::InteropServices::Out] Span<IntPtr> % taggedMemory);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.InteropServices.GCHandle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object">
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="taggedMemory" Type="System.Span<System.IntPtr>" RefType="out" />
</Parameters>
<Docs>
<param name="obj">The object to track.</param>
<param name="taggedMemory">A pointer to memory tagged to the object.</param>
<summary>Request native reference tracking for the supplied object.</summary>
<returns>Reference tracking GC handle.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Initialize() must be called prior to calling this function.
The `obj` must have a type in its hierarchy marked with
<xref:System.Runtime.InteropServices.ObjectiveC.ObjectiveCTrackedTypeAttribute>.
The "Is Referenced" callback passed to Initialize()
will be passed the `taggedMemory` returned from this function.
The memory it points at is defined by the length in the <xref:System.Span`1> and
will be zeroed out. It will be available until `obj` is collected by the GC.
The memory pointed to by `taggedMemory` can be used for any purpose by the
caller of this function and usable during the "Is Referenced" callback.
Calling this function multiple times with the same `obj` will
return a new handle each time but the same tagged memory will be returned. The
tagged memory is only guaranteed to be zero initialized on the first call.
The caller is responsible for freeing the returned <xref:System.Runtime.InteropServices.GCHandle>.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The ObjectiveCMarshal API has not been initialized.</exception>
</Docs>
</Member>
<Member MemberName="Initialize">
<MemberSignature Language="C#" Value="public static void Initialize (delegate* unmanaged<void> beginEndCallback, delegate* unmanaged<IntPtr, int> isReferencedCallback, delegate* unmanaged<IntPtr, void> trackedObjectEnteredFinalization, System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.UnhandledExceptionPropagationHandler unhandledExceptionPropagationHandler);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void Initialize(method beginEndCallback, method isReferencedCallback, method trackedObjectEnteredFinalization, class System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal/UnhandledExceptionPropagationHandler unhandledExceptionPropagationHandler) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.Initialize(=FUNC:System.Void,=FUNC:System.Int32(System.IntPtr),=FUNC:System.Void(System.IntPtr),System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.UnhandledExceptionPropagationHandler)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub Initialize (beginEndCallback As delegate* unmanaged<Void>, isReferencedCallback As delegate* unmanaged< As IntPtr, Integer>, trackedObjectEnteredFinalization As delegate* unmanaged< As IntPtr, Void>, unhandledExceptionPropagationHandler As ObjectiveCMarshal.UnhandledExceptionPropagationHandler)" />
<MemberSignature Language="F#" Value="static member Initialize : delegate* unmanaged<unit> * delegate* unmanaged<nativeint, int> * delegate* unmanaged<nativeint, unit> * System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.UnhandledExceptionPropagationHandler -> unit" Usage="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.Initialize (beginEndCallback, isReferencedCallback, trackedObjectEnteredFinalization, unhandledExceptionPropagationHandler)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void Initialize(delegate* unmanaged<void> ^ beginEndCallback, delegate* unmanaged<IntPtr , int> ^ isReferencedCallback, delegate* unmanaged<IntPtr , void> ^ trackedObjectEnteredFinalization, System::Runtime::InteropServices::ObjectiveC::ObjectiveCMarshal::UnhandledExceptionPropagationHandler ^ unhandledExceptionPropagationHandler);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="beginEndCallback" Type="delegate* unmanaged<System.Void>" />
<Parameter Name="isReferencedCallback" Type="delegate* unmanaged<System.IntPtr, System.Int32>" />
<Parameter Name="trackedObjectEnteredFinalization" Type="delegate* unmanaged<System.IntPtr, System.Void>" />
<Parameter Name="unhandledExceptionPropagationHandler" Type="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal+UnhandledExceptionPropagationHandler">
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="beginEndCallback">Called when tracking begins and ends.</param>
<param name="isReferencedCallback">Called to determine if a managed object instance is referenced elsewhere, and must not be collected by the GC.</param>
<param name="trackedObjectEnteredFinalization">Called when a tracked object enters the finalization queue.</param>
<param name="unhandledExceptionPropagationHandler">Handler for the propagation of unhandled Exceptions across a managed -> native boundary (that is, Reverse P/Invoke).</param>
<summary>Initialize the Objective-C marshalling API.</summary>
<remarks>
All unmanaged function pointers must be written in native code since they will be called by the GC and
managed code is not able to run at that time.
The <paramref name="beginEndCallback" /> will be called when reference tracking begins and ends.
The associated begin/end pair will never be nested. When using Workstation GC, the begin/end pair
will be called on the same thread. When using Server GC, the begin/end pair is not guaranteed to
be called on the same thread.
The <paramref name="isReferencedCallback" /> should return 0 for not reference or 1 for
referenced. Any other value has undefined behavior.
</remarks>
</Docs>
</Member>
<Member MemberName="SetMessageSendCallback">
<MemberSignature Language="C#" Value="public static void SetMessageSendCallback (System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.MessageSendFunction msgSendFunction, IntPtr func);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetMessageSendCallback(valuetype System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal/MessageSendFunction msgSendFunction, native int func) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.SetMessageSendCallback(System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.MessageSendFunction,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub SetMessageSendCallback (msgSendFunction As ObjectiveCMarshal.MessageSendFunction, func As IntPtr)" />
<MemberSignature Language="F#" Value="static member SetMessageSendCallback : System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.MessageSendFunction * nativeint -> unit" Usage="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.SetMessageSendCallback (msgSendFunction, func)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void SetMessageSendCallback(System::Runtime::InteropServices::ObjectiveC::ObjectiveCMarshal::MessageSendFunction msgSendFunction, IntPtr func);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msgSendFunction" Type="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal+MessageSendFunction" />
<Parameter Name="func" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="msgSendFunction">The export to override.</param>
<param name="func">The function override.</param>
<summary>Set a function pointer override for an Objective-C runtime message passing export.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Providing an override can enable support for Objective-C variadic argument support.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The msgSend function has already been overridden.</exception>
</Docs>
</Member>
<Member MemberName="SetMessageSendPendingException">
<MemberSignature Language="C#" Value="public static void SetMessageSendPendingException (Exception? exception);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetMessageSendPendingException(class System.Exception exception) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.SetMessageSendPendingException(System.Exception)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub SetMessageSendPendingException (exception As Exception)" />
<MemberSignature Language="F#" Value="static member SetMessageSendPendingException : Exception -> unit" Usage="System.Runtime.InteropServices.ObjectiveC.ObjectiveCMarshal.SetMessageSendPendingException exception" />
<MemberSignature Language="C++ CLI" Value="public:
 static void SetMessageSendPendingException(Exception ^ exception);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="exception" Type="System.Exception" />
</Parameters>
<Docs>
<param name="exception">The exception.</param>
<summary>Sets a pending exception to be thrown the next time the runtime is entered from an Objective-C msgSend P/Invoke.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `null` is supplied any pending exception is discarded.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>