Skip to content

Commit 6068e76

Browse files
authored
Port over System.Runtime.InteropServices docs for .NET 9 (#10228)
1 parent 55322a0 commit 6068e76

File tree

4 files changed

+34
-29
lines changed

4 files changed

+34
-29
lines changed

xml/System.Runtime.InteropServices.Marshalling/ComVariantMarshaller.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@
5555
<Parameter Name="unmanaged" Type="System.Runtime.InteropServices.Marshalling.ComVariant" />
5656
</Parameters>
5757
<Docs>
58-
<param name="unmanaged">To be added.</param>
59-
<summary>To be added.</summary>
60-
<returns>To be added.</returns>
58+
<param name="unmanaged">The unmanaged variant.</param>
59+
<summary>Converts an unmanaged <see cref="T:System.Runtime.InteropServices.Marshalling.ComVariant" /> to a managed object.</summary>
60+
<returns>A managed object that represents the same value as <paramref name="unmanaged" />.</returns>
6161
<remarks>To be added.</remarks>
62+
<exception cref="T:System.ArgumentException">The type of data stored in <paramref name="unmanaged" /> is not supported.</exception>
6263
</Docs>
6364
</Member>
6465
<Member MemberName="ConvertToUnmanaged">
@@ -80,10 +81,11 @@
8081
<Parameter Name="managed" Type="System.Object" />
8182
</Parameters>
8283
<Docs>
83-
<param name="managed">To be added.</param>
84-
<summary>To be added.</summary>
85-
<returns>To be added.</returns>
84+
<param name="managed">The managed object.</param>
85+
<summary>Converts a managed object to an unmanaged <see cref="T:System.Runtime.InteropServices.Marshalling.ComVariant" />.</summary>
86+
<returns>A <see cref="T:System.Runtime.InteropServices.Marshalling.ComVariant" /> that represents the provided managed object.</returns>
8687
<remarks>To be added.</remarks>
88+
<exception cref="T:System.ArgumentException">The type of <paramref name="managed" /> is not supported.</exception>
8789
</Docs>
8890
</Member>
8991
<Member MemberName="Free">
@@ -105,8 +107,8 @@
105107
<Parameter Name="unmanaged" Type="System.Runtime.InteropServices.Marshalling.ComVariant" />
106108
</Parameters>
107109
<Docs>
108-
<param name="unmanaged">To be added.</param>
109-
<summary>To be added.</summary>
110+
<param name="unmanaged">The object to dispose.</param>
111+
<summary>Disposes the unmanaged <see cref="T:System.Runtime.InteropServices.Marshalling.ComVariant" />.</summary>
110112
<remarks>To be added.</remarks>
111113
</Docs>
112114
</Member>

xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2+ManagedToUnmanagedOut.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<Parameter Name="numElements" Type="System.Int32" />
111111
</Parameters>
112112
<Docs>
113-
<param name="numElements">To be added.</param>
113+
<param name="numElements">The number of elements in the array.</param>
114114
<summary>Returns a span that points to the memory where the managed elements of the array should be stored.</summary>
115115
<returns>A span where managed values of the array should be stored.</returns>
116116
<remarks>To be added.</remarks>
@@ -135,7 +135,7 @@
135135
<Parameter Name="numElements" Type="System.Int32" />
136136
</Parameters>
137137
<Docs>
138-
<param name="numElements">To be added.</param>
138+
<param name="numElements">The number of elements in the array.</param>
139139
<summary>Returns a span that points to the memory where the unmanaged elements of the array are stored.</summary>
140140
<returns>A span over unmanaged values of the array.</returns>
141141
<remarks>To be added.</remarks>
@@ -165,7 +165,7 @@
165165
<Parameters />
166166
<Docs>
167167
<summary>Returns the managed value representing the native array.</summary>
168-
<returns>To be added.</returns>
168+
<returns>A span over managed values of the array.</returns>
169169
<remarks>To be added.</remarks>
170170
</Docs>
171171
</Member>

xml/System.Runtime.InteropServices.Swift/SwiftSelf`1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</Attribute>
3636
</Attributes>
3737
<Docs>
38-
<typeparam name="T">To be added.</typeparam>
38+
<typeparam name="T">The type of the frozen struct to pass in the 'self' context.</typeparam>
3939
<summary>Represents the Swift 'self' context when the argument is Swift frozen struct T, which is either enregistered into multiple registers, or passed by reference in the 'self' register.</summary>
4040
<remarks>
4141
<para> This struct is used to pass the Swift frozen struct T to Swift functions in the context of interop with .NET.

xml/System.Runtime.InteropServices/CollectionsMarshal.xml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ Items should not be added to or removed from the <xref:System.Collections.Generi
178178
<Parameter Name="exists" Type="System.Boolean" RefType="out" Index="2" FrameworkAlternate="net-9.0" />
179179
</Parameters>
180180
<Docs>
181-
<typeparam name="TKey">To be added.</typeparam>
182-
<typeparam name="TValue">To be added.</typeparam>
183-
<typeparam name="TAlternateKey">To be added.</typeparam>
184-
<param name="dictionary">To be added.</param>
185-
<param name="key">To be added.</param>
186-
<param name="exists">To be added.</param>
187-
<summary>To be added.</summary>
188-
<returns>To be added.</returns>
189-
<remarks>To be added.</remarks>
181+
<typeparam name="TKey">The type of the keys in the dictionary.</typeparam>
182+
<typeparam name="TValue">The type of the values in the dictionary.</typeparam>
183+
<typeparam name="TAlternateKey">The type of the alternate key in the dictionary lookup.</typeparam>
184+
<param name="dictionary">The dictionary to get the ref to <typeparamref name="TValue"/> from.</param>
185+
<param name="key">The key used for lookup.</param>
186+
<param name="exists">Whether or not a new entry for the given key was added to the dictionary.</param>
187+
<summary>Gets a ref to a <typeparamref name="TValue"/> in the <see cref="T:System.Collections.Generic.Dictionary`2.AlternateLookup`1"/>, adding a new entry with a default value if it does not exist in the <paramref name="dictionary"/>.</summary>
188+
<returns>A reference to a <typeparamref name="TValue" /> in the specified <see cref="T:System.Collections.Generic.Dictionary`2.AlternateLookup`1"/>.</returns>
189+
<remarks>Items should not be added to or removed from the <see cref="T:System.Collections.Generic.Dictionary`2.AlternateLookup`1"/> while the ref <typeparamref name="TValue"/> is in use.</remarks>
190190
</Docs>
191191
</Member>
192192
<Member MemberName="GetValueRefOrNullRef&lt;TKey,TValue&gt;">
@@ -281,14 +281,17 @@ The ref `null` can be detected by calling <xref:System.Runtime.CompilerServices.
281281
<Parameter Name="key" Type="TAlternateKey" Index="1" FrameworkAlternate="net-9.0" />
282282
</Parameters>
283283
<Docs>
284-
<typeparam name="TKey">To be added.</typeparam>
285-
<typeparam name="TValue">To be added.</typeparam>
286-
<typeparam name="TAlternateKey">To be added.</typeparam>
287-
<param name="dictionary">To be added.</param>
288-
<param name="key">To be added.</param>
289-
<summary>To be added.</summary>
290-
<returns>To be added.</returns>
291-
<remarks>To be added.</remarks>
284+
<typeparam name="TKey">The type of the keys in the dictionary.</typeparam>
285+
<typeparam name="TValue">The type of the values in the dictionary.</typeparam>
286+
<typeparam name="TAlternateKey">The type of an alternate key for lookups in the dictionary.</typeparam>
287+
<param name="dictionary">The dictionary to get the ref to <typeparamref name="TValue"/> from.</param>
288+
<param name="key">The key used for lookup.</param>
289+
<summary>Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="T:System.Collections.Generic.Dictionary`2"/> or a ref null if it does not exist in the <paramref name="dictionary"/>.</summary>
290+
<returns>A reference to a <typeparamref name="TValue" /> in the <see cref="T:System.Collections.Generic.Dictionary`2" /> or a reference <see langword="null" /> if it does not exist in the <paramref name="dictionary" />..</returns>
291+
<remarks>
292+
<para>Items should not be added or removed from the <see cref="T:System.Collections.Generic.Dictionary`2" /> while the ref <paramref name="TValue" /> is in use.</para>
293+
<para>The ref <see langword="null" /> can be detected by calling <see cref="M:System.Runtime.CompilerServices.Unsafe.IsNullRef``1(``0@)" />.</para>
294+
</remarks>
292295
</Docs>
293296
</Member>
294297
<Member MemberName="SetCount&lt;T&gt;">

0 commit comments

Comments
 (0)