初始化
This commit is contained in:
20
NewCRICS/Models/MMA.cs
Normal file
20
NewCRICS/Models/MMA.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.IO;
|
||||
|
||||
namespace NewCRICS.Models
|
||||
{
|
||||
public class MMA
|
||||
{
|
||||
private static readonly RecyclableMemoryStreamManager manager = new RecyclableMemoryStreamManager();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream
|
||||
var sourceBuffer = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||
|
||||
using (var stream = manager.GetStream())
|
||||
{
|
||||
stream.Write(sourceBuffer, 0, sourceBuffer.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user