mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 08:26:36 +08:00
添加几个参数
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
@@ -316,5 +317,15 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Stream CopyStream(this Stream stream)
|
||||
{
|
||||
byte[] bytearray = new byte[stream.Length];
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
stream.Read(bytearray, 0, bytearray.Length);
|
||||
|
||||
var destination = new MemoryStream(bytearray);
|
||||
return destination;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user