C# Class Senparc.Weixin.StreamUtility.StreamUtility

Show file Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
GetBase64String ( Stream stream ) : string

获取Stream的Base64字符串

GetBase64StringAsync ( Stream stream ) : Task

获取Stream的Base64字符串

GetStreamFromBase64String ( string base64String, string savePath ) : Stream

将base64String反序列化到流,或保存成文件

GetStreamFromBase64StringAsync ( string base64String, string savePath ) : Task

将base64String反序列化到流,或保存成文件

SaveFileFromStream ( MemoryStream memoryStream, string savePath ) : void

将memoryStream保存到文件

SaveFileFromStreamAsync ( MemoryStream memoryStream, string savePath ) : System.Threading.Tasks.Task

将memoryStream保存到文件

Method Details

GetBase64String() public static method

获取Stream的Base64字符串
public static GetBase64String ( Stream stream ) : string
stream Stream
return string

GetBase64StringAsync() public static method

获取Stream的Base64字符串
public static GetBase64StringAsync ( Stream stream ) : Task
stream Stream
return Task

GetStreamFromBase64String() public static method

将base64String反序列化到流,或保存成文件
public static GetStreamFromBase64String ( string base64String, string savePath ) : Stream
base64String string
savePath string 如果为null则不保存
return Stream

GetStreamFromBase64StringAsync() public static method

将base64String反序列化到流,或保存成文件
public static GetStreamFromBase64StringAsync ( string base64String, string savePath ) : Task
base64String string
savePath string 如果为null则不保存
return Task

SaveFileFromStream() public static method

将memoryStream保存到文件
public static SaveFileFromStream ( MemoryStream memoryStream, string savePath ) : void
memoryStream System.IO.MemoryStream
savePath string
return void

SaveFileFromStreamAsync() public static method

将memoryStream保存到文件
public static SaveFileFromStreamAsync ( MemoryStream memoryStream, string savePath ) : System.Threading.Tasks.Task
memoryStream System.IO.MemoryStream
savePath string
return System.Threading.Tasks.Task