共享文件类的构造方法优化,不再传入委托

This commit is contained in:
dathlin
2017-05-20 09:04:12 +08:00
parent 150c1d595b
commit aaf9175c35
3 changed files with 6 additions and 8 deletions

Binary file not shown.

View File

@@ -1449,12 +1449,10 @@
文件删除的指令头
</summary>
</member>
<member name="M:HslCommunication.Enthernet.SimpleShareFileServer.#ctor(System.Func{System.Collections.Generic.List{HslCommunication.Enthernet.File_Save},System.String},System.Func{System.String,System.Collections.Generic.List{HslCommunication.Enthernet.File_Save}})">
<member name="M:HslCommunication.Enthernet.SimpleShareFileServer.#ctor">
<summary>
生成对象,需要指定存储规则
</summary>
<param name="toJsonString">获取字符串的规则</param>
<param name="toListArray">从字符串转化成对象数据</param>
</member>
<member name="P:HslCommunication.Enthernet.SimpleShareFileServer.FileSavePath">
<summary>

View File

@@ -641,11 +641,11 @@ namespace 软件系统服务端模版
{
try
{
net_simple_file_server = new SimpleShareFileServer(
list => JArray.FromObject(list).ToString(),
str => JArray.Parse(str).ToObject<List<File_Save>>());
//文件信息存储路径
net_simple_file_server.FileSavePath = Application.StartupPath + @"\files.txt";
net_simple_file_server = new SimpleShareFileServer()
{
//文件信息存储路径
FileSavePath = Application.StartupPath + @"\files.txt"
};
net_simple_file_server.ReadFromFile();
//文件存储路径
net_simple_file_server.File_save_path = Application.StartupPath + @"\Files";