Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 01326e6

Browse files
benaadamsjkotas
authored andcommitted
Fix TryGetOwnedMemory xml docs
1 parent 6626bcc commit 01326e6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,14 @@ public static bool TryGetArray<T>(ReadOnlyMemory<T> readOnlyMemory, out ArraySeg
4040
}
4141

4242
/// <summary>
43-
/// Get a <see cref="OwnedMemory{T}"/> from the underlying memory.
44-
/// If unable to get the <typeparamref name="TOwner"/>, return false with a default <typeparamref name="TOwner"/>.
43+
/// Gets a <see cref="OwnedMemory{T}"/> from the underlying readOnlyMemory.
44+
/// If unable to get the <typeparamref name="TOwner"/> type, returns false.
4545
/// </summary>
46+
/// <typeparam name="T">The element type of the <paramref name="readOnlyMemory" />.</typeparam>
47+
/// <typeparam name="TOwner">The type of <see cref="OwnedMemory{T}"/> to try and retrive.</typeparam>
48+
/// <param name="readOnlyMemory">The memory to get the owner for.</param>
49+
/// <param name="ownedMemory">The returned owner of the <see cref="ReadOnlyMemory{T}"/>.</param>
50+
/// <returns>A <see cref="bool"/> indicating if it was successful.</returns>
4651
public static bool TryGetOwnedMemory<T, TOwner>(ReadOnlyMemory<T> readOnlyMemory, out TOwner ownedMemory)
4752
where TOwner : OwnedMemory<T>
4853
{
@@ -52,9 +57,16 @@ public static bool TryGetOwnedMemory<T, TOwner>(ReadOnlyMemory<T> readOnlyMemory
5257
}
5358

5459
/// <summary>
55-
/// Get a <see cref="OwnedMemory{T}"/> and <param name="index">, <param name="length"> on the <see cref="OwnedMemory{T}"/> from the underlying memory.
56-
/// If unable to get the <typeparamref name="TOwner"/>, return false with a default <typeparamref name="TOwner"/>.
60+
/// Gets a <see cref="OwnedMemory{T}"/> and <paramref name="index" />, <paramref name="length" /> from the underlying memory.
61+
/// If unable to get the <typeparamref name="TOwner"/> type, returns false.
5762
/// </summary>
63+
/// <typeparam name="T">The element type of the <paramref name="readOnlyMemory" />.</typeparam>
64+
/// <typeparam name="TOwner">The type of <see cref="OwnedMemory{T}"/> to try and retrive.</typeparam>
65+
/// <param name="readOnlyMemory">The memory to get the owner for.</param>
66+
/// <param name="ownedMemory">The returned owner of the <see cref="ReadOnlyMemory{T}"/>.</param>
67+
/// <param name="index">The offset from the start of the <paramref name="ownedMemory" /> that the <paramref name="readOnlyMemory" /> represents.</param>
68+
/// <param name="length">The length of the <paramref name="ownedMemory" /> that the <paramref name="readOnlyMemory" /> represents.</param>
69+
/// <returns>A <see cref="bool"/> indicating if it was successful.</returns>
5870
public static bool TryGetOwnedMemory<T, TOwner>(ReadOnlyMemory<T> readOnlyMemory, out TOwner ownedMemory, out int index, out int length)
5971
where TOwner : OwnedMemory<T>
6072
{

0 commit comments

Comments
 (0)