-
Notifications
You must be signed in to change notification settings - Fork 155
/
ReadOnlyMemoryExtensions.xml
230 lines (230 loc) · 15.9 KB
/
ReadOnlyMemoryExtensions.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
228
229
230
<Type Name="ReadOnlyMemoryExtensions" FullName="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions">
<TypeSignature Language="C#" Value="public static class ReadOnlyMemoryExtensions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit ReadOnlyMemoryExtensions extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions" />
<TypeSignature Language="VB.NET" Value="Public Module ReadOnlyMemoryExtensions" />
<TypeSignature Language="F#" Value="type ReadOnlyMemoryExtensions = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Helpers for working with the <see cref="T:System.ReadOnlyMemory`1" /> type.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="AsBytes<T>">
<MemberSignature Language="C#" Value="public static ReadOnlyMemory<byte> AsBytes<T> (this ReadOnlyMemory<T> memory) where T : struct;" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.ReadOnlyMemory`1<unsigned int8> AsBytes<struct .ctor (class System.ValueType) T>(valuetype System.ReadOnlyMemory`1<!!T> memory) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsBytes``1(System.ReadOnlyMemory{``0})" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function AsBytes(Of T As Structure) (memory As ReadOnlyMemory(Of T)) As ReadOnlyMemory(Of Byte)" />
<MemberSignature Language="F#" Value="static member AsBytes : ReadOnlyMemory<'T (requires 'T : struct)> -> ReadOnlyMemory<byte> (requires 'T : struct)" Usage="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsBytes memory" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ReadOnlyMemory<System.Byte></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>NotNullableValueTypeConstraint</ParameterAttribute>
<BaseTypeName>System.ValueType</BaseTypeName>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="memory" Type="System.ReadOnlyMemory<T>" RefType="this" />
</Parameters>
<Docs>
<typeparam name="T">The type if items in the source <see cref="T:System.ReadOnlyMemory`1" />.</typeparam>
<param name="memory">The source <see cref="T:System.ReadOnlyMemory`1" />, of type <typeparamref name="T" />.</param>
<summary>
Casts a <see cref="T:System.ReadOnlyMemory`1" /> of one primitive type <typeparamref name="T" /> to <see cref="T:System.ReadOnlyMemory`1" /> of bytes.
</summary>
<returns>A <see cref="T:System.ReadOnlyMemory`1" /> of bytes.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.OverflowException">
Thrown if the <see cref="P:System.ReadOnlyMemory`1.Length" /> property of the new <see cref="T:System.ReadOnlyMemory`1" /> would exceed <see cref="F:System.Int32.MaxValue" />.
</exception>
<exception cref="T:System.ArgumentException">Thrown when the data store of <paramref name="memory" /> is not supported.</exception>
</Docs>
</Member>
<Member MemberName="AsMemory2D<T>">
<MemberSignature Language="C#" Value="public static Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<T> AsMemory2D<T> (this ReadOnlyMemory<T> memory, int height, int width);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1<!!T> AsMemory2D<T>(valuetype System.ReadOnlyMemory`1<!!T> memory, int32 height, int32 width) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsMemory2D``1(System.ReadOnlyMemory{``0},System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function AsMemory2D(Of T) (memory As ReadOnlyMemory(Of T), height As Integer, width As Integer) As ReadOnlyMemory2D(Of T)" />
<MemberSignature Language="F#" Value="static member AsMemory2D : ReadOnlyMemory<'T> * int * int -> Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<'T>" Usage="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsMemory2D (memory, height, width)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="memory" Type="System.ReadOnlyMemory<T>" RefType="this" />
<Parameter Name="height" Type="System.Int32" />
<Parameter Name="width" Type="System.Int32" />
</Parameters>
<Docs>
<typeparam name="T">The type of items in the input <see cref="T:System.ReadOnlyMemory`1" /> instance.</typeparam>
<param name="memory">The input <see cref="T:System.ReadOnlyMemory`1" /> instance.</param>
<param name="height">The height of the resulting 2D area.</param>
<param name="width">The width of each row in the resulting 2D area.</param>
<summary>
Returns a <see cref="T:Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1" /> instance wrapping the underlying data for the given <see cref="T:System.ReadOnlyMemory`1" /> instance.
</summary>
<returns>The resulting <see cref="T:Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1" /> instance.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
Thrown when one of the input parameters is out of range.
</exception>
<exception cref="T:System.ArgumentException">
Thrown when the requested area is outside of bounds for <paramref name="memory" />.
</exception>
</Docs>
</Member>
<Member MemberName="AsMemory2D<T>">
<MemberSignature Language="C#" Value="public static Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<T> AsMemory2D<T> (this ReadOnlyMemory<T> memory, int offset, int height, int width, int pitch);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1<!!T> AsMemory2D<T>(valuetype System.ReadOnlyMemory`1<!!T> memory, int32 offset, int32 height, int32 width, int32 pitch) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsMemory2D``1(System.ReadOnlyMemory{``0},System.Int32,System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function AsMemory2D(Of T) (memory As ReadOnlyMemory(Of T), offset As Integer, height As Integer, width As Integer, pitch As Integer) As ReadOnlyMemory2D(Of T)" />
<MemberSignature Language="F#" Value="static member AsMemory2D : ReadOnlyMemory<'T> * int * int * int * int -> Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<'T>" Usage="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsMemory2D (memory, offset, height, width, pitch)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="memory" Type="System.ReadOnlyMemory<T>" RefType="this" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="height" Type="System.Int32" />
<Parameter Name="width" Type="System.Int32" />
<Parameter Name="pitch" Type="System.Int32" />
</Parameters>
<Docs>
<typeparam name="T">The type of items in the input <see cref="T:System.ReadOnlyMemory`1" /> instance.</typeparam>
<param name="memory">The input <see cref="T:System.ReadOnlyMemory`1" /> instance.</param>
<param name="offset">The initial offset within <paramref name="memory" />.</param>
<param name="height">The height of the resulting 2D area.</param>
<param name="width">The width of each row in the resulting 2D area.</param>
<param name="pitch">The pitch in the resulting 2D area.</param>
<summary>
Returns a <see cref="T:Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1" /> instance wrapping the underlying data for the given <see cref="T:System.ReadOnlyMemory`1" /> instance.
</summary>
<returns>The resulting <see cref="T:Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D`1" /> instance.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
Thrown when one of the input parameters is out of range.
</exception>
<exception cref="T:System.ArgumentException">
Thrown when the requested area is outside of bounds for <paramref name="memory" />.
</exception>
</Docs>
</Member>
<Member MemberName="AsStream">
<MemberSignature Language="C#" Value="public static System.IO.Stream AsStream (this ReadOnlyMemory<byte> memory);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.IO.Stream AsStream(valuetype System.ReadOnlyMemory`1<unsigned int8> memory) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsStream(System.ReadOnlyMemory{System.Byte})" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function AsStream (memory As ReadOnlyMemory(Of Byte)) As Stream" />
<MemberSignature Language="F#" Value="static member AsStream : ReadOnlyMemory<byte> -> System.IO.Stream" Usage="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.AsStream memory" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="memory" Type="System.ReadOnlyMemory<System.Byte>" RefType="this" />
</Parameters>
<Docs>
<param name="memory">The input <see cref="T:System.ReadOnlyMemory`1" /> of <see cref="T:System.Byte" /> instance.</param>
<summary>
Returns a <see cref="T:System.IO.Stream" /> wrapping the contents of the given <see cref="T:System.ReadOnlyMemory`1" /> of <see cref="T:System.Byte" /> instance.
</summary>
<returns>A <see cref="T:System.IO.Stream" /> wrapping the data within <paramref name="memory" />.</returns>
<remarks>
Since this method only receives a <see cref="T:System.Memory`1" /> instance, which does not track
the lifetime of its underlying buffer, it is responsibility of the caller to manage that.
In particular, the caller must ensure that the target buffer is not disposed as long
as the returned <see cref="T:System.IO.Stream" /> is in use, to avoid unexpected issues.
</remarks>
<exception cref="T:System.ArgumentException">Thrown when <paramref name="memory" /> has an invalid data store.</exception>
</Docs>
</Member>
<Member MemberName="Cast<TFrom,TTo>">
<MemberSignature Language="C#" Value="public static ReadOnlyMemory<TTo> Cast<TFrom,TTo> (this ReadOnlyMemory<TFrom> memory) where TFrom : struct where TTo : struct;" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.ReadOnlyMemory`1<!!TTo> Cast<struct .ctor (class System.ValueType) TFrom, struct .ctor (class System.ValueType) TTo>(valuetype System.ReadOnlyMemory`1<!!TFrom> memory) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.Cast``2(System.ReadOnlyMemory{``0})" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function Cast(Of TFrom As Structure, TTo As Structure) (memory As ReadOnlyMemory(Of TFrom)) As ReadOnlyMemory(Of TTo)" />
<MemberSignature Language="F#" Value="static member Cast : ReadOnlyMemory<'From (requires 'From : struct)> -> ReadOnlyMemory<'o (requires 'o : struct)> (requires 'From : struct and 'o : struct)" Usage="Microsoft.Toolkit.HighPerformance.ReadOnlyMemoryExtensions.Cast memory" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Toolkit.HighPerformance</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ReadOnlyMemory<TTo></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TFrom">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>NotNullableValueTypeConstraint</ParameterAttribute>
<BaseTypeName>System.ValueType</BaseTypeName>
</Constraints>
</TypeParameter>
<TypeParameter Name="TTo">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>NotNullableValueTypeConstraint</ParameterAttribute>
<BaseTypeName>System.ValueType</BaseTypeName>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="memory" Type="System.ReadOnlyMemory<TFrom>" RefType="this" />
</Parameters>
<Docs>
<typeparam name="TFrom">The type of items in the source <see cref="T:System.ReadOnlyMemory`1" />.</typeparam>
<typeparam name="TTo">The type of items in the destination <see cref="T:System.ReadOnlyMemory`1" />.</typeparam>
<param name="memory">The source <see cref="T:System.ReadOnlyMemory`1" />, of type <typeparamref name="TFrom" />.</param>
<summary>
Casts a <see cref="T:System.ReadOnlyMemory`1" /> of one primitive type <typeparamref name="TFrom" /> to another primitive type <typeparamref name="TTo" />.
</summary>
<returns>A <see cref="T:System.ReadOnlyMemory`1" /> of type <typeparamref name="TTo" /></returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentException">Thrown when the data store of <paramref name="memory" /> is not supported.</exception>
</Docs>
</Member>
</Members>
</Type>