You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGES.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,31 @@
1
+
# Version 2.2.0
2
+
3
+
API changes:
4
+
* Add an override for `GetStream` that takes a `ReadOnlySpan<byte>`. This supercedes the versions of `GetStream` that take `Memory<byte>`, which were marked as `[Obsolete]`.
* Fixed another integer overflow error when returning buffers to the pool.
22
+
23
+
# Version 2.1.2
24
+
25
+
Bug Fixes:
26
+
* Added `[SecurityRules(SecurityRuyleSet.Level1)]` to assembly to allow more relaxed inheritance security rules.
27
+
* Fixed an integer overflow when calculating large buffer sizes.
28
+
1
29
# Version 2.1.0
2
30
3
31
* Added `RecyclableMemoryStreamManager` constructor overloads that take parameters for specifying the maximum free pool sizes. Updated IntelliSense documentation to make clear that these values need to be explciitly set to avoid unbounded pool growth.
Copy file name to clipboardExpand all lines: docs/Microsoft.IO.RecyclableMemoryStream.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
| public type | description |
6
6
| --- | --- |
7
-
| class [RecyclableMemoryStream](Microsoft.IO/RecyclableMemoryStream.md)| MemoryStream implementation that deals with pooling and managing memory streams which use potentially large buffers. |
8
-
| class [RecyclableMemoryStreamManager](Microsoft.IO/RecyclableMemoryStreamManager.md)| Manages pools of [`RecyclableMemoryStream`](Microsoft.IO/RecyclableMemoryStream.md) objects. |
7
+
| class [RecyclableMemoryStream](./Microsoft.IO/RecyclableMemoryStream.md)| MemoryStream implementation that deals with pooling and managing memory streams which use potentially large buffers. |
8
+
| class [RecyclableMemoryStreamManager](./Microsoft.IO/RecyclableMemoryStreamManager.md)| Manages pools of [`RecyclableMemoryStream`](./Microsoft.IO/RecyclableMemoryStream.md) objects. |
9
9
10
10
<!-- DO NOT EDIT: generated by xmldocmd for Microsoft.IO.RecyclableMemoryStream.dll -->
| [Capacity64](RecyclableMemoryStream/Capacity64.md) { get; set; } |Returnsa64-bitversionofcapacity, for streams larger than `int.MaxValue` in length. |
|override [ToArray](RecyclableMemoryStream/ToArray.md)() |Returnsanewarraywithacopyofthebuffer's contents. You should almost certainly be using [`GetBuffer`](RecyclableMemoryStream/GetBuffer.md) combined with the [`Length`](RecyclableMemoryStream/Length.md) to access the bytes in this stream. Calling `ToArray` will destroy the benefits of pooled buffers, but it is included for the sake of completeness. |
|override [ToArray](RecyclableMemoryStream/ToArray.md)() |Returnsanewarraywithacopyofthebuffer's contents. You should almost certainly be using [`GetBuffer`](./RecyclableMemoryStream/GetBuffer.md) combined with the [`Length`](./RecyclableMemoryStream/Length.md) to access the bytes in this stream. Calling `ToArray` will destroy the benefits of pooled buffers, but it is included for the sake of completeness. |
36
36
|override [ToString](RecyclableMemoryStream/ToString.md)() |Returnsausefulstringfor debugging. This should not normally be called in actual production code. |
|override [WriteTo](RecyclableMemoryStream/WriteTo.md)(…) |Synchronouslywritesthisstream's bytes to the argument stream. |
41
41
| [WriteTo](RecyclableMemoryStream/WriteTo.md)(…) |Synchronouslywritesthisstream's bytes, starting at offset, for count bytes, to the argument stream. (5 methods) |
@@ -49,16 +49,16 @@ public sealed class RecyclableMemoryStream : MemoryStream, IBufferWriter<byte>
49
49
50
50
## Remarks
51
51
52
-
Thisclassworks in tandem with the [`RecyclableMemoryStreamManager`](RecyclableMemoryStreamManager.md) to supply `MemoryStream`-derived objects to callers, while avoiding these specific problems:
52
+
Thisclassworks in tandem with the [`RecyclableMemoryStreamManager`](./RecyclableMemoryStreamManager.md) to supply `MemoryStream`-derived objects to callers, while avoiding these specific problems:
Copy file name to clipboardExpand all lines: docs/Microsoft.IO/RecyclableMemoryStream/Advance.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
# RecyclableMemoryStream.Advance method
2
2
3
-
Notifies the stream that *count* bytes were written to the buffer returned by [`GetMemory`](GetMemory.md) or [`GetSpan`](GetSpan.md). Seeks forward by *count* bytes.
3
+
Notifies the stream that *count* bytes were written to the buffer returned by [`GetMemory`](./GetMemory.md) or [`GetSpan`](./GetSpan.md). Seeks forward by *count* bytes.
4
4
5
5
```csharp
6
6
publicvoidAdvance(intcount)
7
7
```
8
8
9
9
| parameter | description |
10
10
| --- | --- |
11
-
| count | How many bytes to advance |
11
+
| count | How many bytes to advance.|
12
12
13
13
## Exceptions
14
14
15
15
| exception | condition |
16
16
| --- | --- |
17
-
| ObjectDisposedException | Object has been disposed |
18
-
| ArgumentOutOfRangeException |*count* is negative |
19
-
| InvalidOperationException |*count* is larger than the size of the previously requested buffer |
17
+
| ObjectDisposedException | Object has been disposed.|
18
+
| ArgumentOutOfRangeException |*count* is negative.|
19
+
| InvalidOperationException |*count* is larger than the size of the previously requested buffer.|
Copy file name to clipboardExpand all lines: docs/Microsoft.IO/RecyclableMemoryStream/Capacity.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# RecyclableMemoryStream.Capacity property
2
2
3
-
Gets or sets the capacity
3
+
Gets or sets the capacity.
4
4
5
5
```csharp
6
6
publicoverrideintCapacity { get; set; }
@@ -10,15 +10,16 @@ public override int Capacity { get; set; }
10
10
11
11
| exception | condition |
12
12
| --- | --- |
13
-
| ObjectDisposedException | Object has been disposed |
13
+
| ObjectDisposedException | Object has been disposed. |
14
+
| InvalidOperationException | Capacity is larger than int.MaxValue. |
14
15
15
16
## Remarks
16
17
17
18
Capacity is always in multiples of the memory manager's block size, unless the large buffer is in use. Capacity never decreases during a stream's lifetime. Explicitly setting the capacity to a lower value than the current value will have no effect. This is because the buffers are all pooled by chunks and there's little reason to allow stream truncation.
18
19
19
20
Writing past the current capacity will cause `Capacity` to automatically increase, until MaximumStreamCapacity is reached.
20
21
21
-
If the capacity is larger than `int.MaxValue`, then `int.MaxValue` will be returned. If you anticipate using larger streams, use the [`Capacity64`](Capacity64.md) property instead.
22
+
If the capacity is larger than `int.MaxValue`, then `InvalidOperationException` will be thrown. If you anticipate using larger streams, use the [`Capacity64`](./Capacity64.md) property instead.
0 commit comments