mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
使用emit代替表达式树构造委托。
内置了websocket server与相应的导航功能,可在实例工程中找到相应的实现。
This commit is contained in:
41
Library/Network/WebSocket/SocketControlBase.cs
Normal file
41
Library/Network/WebSocket/SocketControlBase.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Serein.Library.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.WebSockets;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Library.Network.WebSocketCommunication
|
||||
{
|
||||
public interface ISocketControlBase
|
||||
{
|
||||
Guid HandleGuid { get; }
|
||||
}
|
||||
|
||||
|
||||
//[AutoRegister(RegisterSequence.FlowLoading)]
|
||||
//[AutoSocketModule(JsonThemeField = "theme", JsonDataField = "data")]
|
||||
//public class UserService : ISocketControlBase
|
||||
//{
|
||||
// public Guid HandleGuid { get; } = new Guid();
|
||||
|
||||
// // Action<string> 类型是特殊的,会用一个委托代替,这个委托可以将文本信息发送到客户端
|
||||
// // Action<object> 类型是特殊的,会用一个委托代替,这个委托可以将对象转成json发送到客户端
|
||||
|
||||
// [AutoSocketHandle]
|
||||
// public void AddUser(User user,Action<string> Recover)
|
||||
// {
|
||||
// Console.WriteLine(user.ToString());
|
||||
// Recover("ok");
|
||||
// }
|
||||
|
||||
// [AutoSocketHandle(ThemeValue = "Remote")]
|
||||
// public void DeleteUser(User user, Action<string> Recover)
|
||||
// {
|
||||
// Console.WriteLine(user.ToString());
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user