File tree Expand file tree Collapse file tree 13 files changed +97
-36
lines changed
Expand file tree Collapse file tree 13 files changed +97
-36
lines changed Original file line number Diff line number Diff line change 1- using System . ComponentModel ;
1+ using Quick . Protocol . Model ;
2+ using System . ComponentModel ;
3+ using System . Text . Json . Serialization . Metadata ;
24
35namespace Quick . Protocol . Commands . Authenticate
46{
57 [ DisplayName ( "认证" ) ]
6- public class Request : IQpCommandRequest < Response >
8+ public class Request : AbstractQpModel < Request > , IQpCommandRequest < Response >
79 {
10+ protected override JsonTypeInfo < Request > TypeInfo => AuthenticateCommandSerializerContext . Default . Request ;
11+
812 /// 认证回答
913 /// </summary>
1014 public string Answer { get ; set ; }
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Text ;
1+ using Quick . Protocol . Model ;
2+ using System . Text . Json . Serialization . Metadata ;
43
54namespace Quick . Protocol . Commands . Authenticate
65{
7- public class Response
6+ public class Response : AbstractQpModel < Response >
87 {
8+ protected override JsonTypeInfo < Response > TypeInfo => AuthenticateCommandSerializerContext . Default . Response ;
9+
910 }
1011}
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using Quick . Protocol . Model ;
32using System . ComponentModel ;
4- using System . Text ;
3+ using System . Text . Json . Serialization . Metadata ;
54
65namespace Quick . Protocol . Commands . Connect
76{
87 /// <summary>
98 /// 连接请求命令
109 /// </summary>
1110 [ DisplayName ( "连接" ) ]
12- public class Request : IQpCommandRequest < Response >
11+ public class Request : AbstractQpModel < Request > , IQpCommandRequest < Response >
1312 {
13+ protected override JsonTypeInfo < Request > TypeInfo => ConnectCommandSerializerContext . Default . Request ;
1414 /// <summary>
1515 /// 指令集编号数组
1616 /// </summary>
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Text ;
1+ using Quick . Protocol . Model ;
2+ using System . Text . Json . Serialization . Metadata ;
43
54namespace Quick . Protocol . Commands . Connect
65{
76 /// <summary>
87 /// 连接响应命令
98 /// </summary>
10- public class Response
9+ public class Response : AbstractQpModel < Response >
1110 {
11+ protected override JsonTypeInfo < Response > TypeInfo => ConnectCommandSerializerContext . Default . Response ;
12+
1213 /// <summary>
1314 /// 缓存大小
1415 /// </summary>
Original file line number Diff line number Diff line change 1- using System . ComponentModel ;
1+ using Quick . Protocol . Model ;
2+ using System . ComponentModel ;
3+ using System . Text . Json . Serialization . Metadata ;
24
35namespace Quick . Protocol . Commands . GetQpInstructions
46{
57 /// <summary>
68 /// 获取全部指令集信息请求
79 /// </summary>
810 [ DisplayName ( "获取全部指令集信息" ) ]
9- public class Request : IQpCommandRequest < Response >
11+ public class Request : AbstractQpModel < Request > , IQpCommandRequest < Response >
1012 {
13+ protected override JsonTypeInfo < Request > TypeInfo => GetQpInstructionsCommandSerializerContext . Default . Request ;
1114 }
1215}
Original file line number Diff line number Diff line change 1- namespace Quick . Protocol . Commands . GetQpInstructions
1+ using Quick . Protocol . Model ;
2+ using System . Text . Json . Serialization . Metadata ;
3+
4+ namespace Quick . Protocol . Commands . GetQpInstructions
25{
36 /// <summary>
47 /// 获取全部指令集信息响应
58 /// </summary>
6- public class Response
9+ public class Response : AbstractQpModel < Response >
710 {
11+ protected override JsonTypeInfo < Response > TypeInfo => GetQpInstructionsCommandSerializerContext . Default . Response ;
812 /// <summary>
913 /// 指令集数据
1014 /// </summary>
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using Quick . Protocol . Model ;
32using System . ComponentModel ;
4- using System . Text ;
3+ using System . Text . Json . Serialization . Metadata ;
54
65namespace Quick . Protocol . Commands . HandShake
76{
87 [ DisplayName ( "握手" ) ]
9- public class Request : IQpCommandRequest < Response >
8+ public class Request : AbstractQpModel < Request > , IQpCommandRequest < Response >
109 {
10+ protected override JsonTypeInfo < Request > TypeInfo => HandShakeCommandSerializerContext . Default . Request ;
11+
1112 /// <summary>
1213 /// 传输超时(默认15秒)
1314 /// </summary>
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Text ;
1+ using Quick . Protocol . Model ;
2+ using System . Text . Json . Serialization . Metadata ;
43
54namespace Quick . Protocol . Commands . HandShake
65{
7- public class Response
6+ public class Response : AbstractQpModel < Response >
87 {
8+ protected override JsonTypeInfo < Response > TypeInfo => HandShakeCommandSerializerContext . Default . Response ;
99 }
1010}
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using Quick . Protocol . Model ;
32using System . ComponentModel ;
4- using System . Text ;
3+ using System . Text . Json . Serialization . Metadata ;
54
65namespace Quick . Protocol . Commands . PrivateCommand
76{
87 /// <summary>
98 /// 私有命令请求
109 /// </summary>
1110 [ DisplayName ( "私有命令" ) ]
12- public class Request : IQpCommandRequest < Response >
11+ public class Request : AbstractQpModel < Request > , IQpCommandRequest < Response >
1312 {
13+ protected override JsonTypeInfo < Request > TypeInfo => PrivateCommandCommandSerializerContext . Default . Request ;
1414 /// <summary>
1515 /// 动作
1616 /// </summary>
Original file line number Diff line number Diff line change 1- using System ;
1+ using Quick . Protocol . Model ;
2+ using System ;
23using System . Collections . Generic ;
34using System . Text ;
5+ using System . Text . Json . Serialization . Metadata ;
46
57namespace Quick . Protocol . Commands . PrivateCommand
68{
79 /// <summary>
810 /// 私有命令响应
911 /// </summary>
10- public class Response
12+ public class Response : AbstractQpModel < Response >
1113 {
14+ protected override JsonTypeInfo < Response > TypeInfo => PrivateCommandCommandSerializerContext . Default . Response ;
1215 /// <summary>
1316 /// 内容
1417 /// </summary>
You can’t perform that action at this time.
0 commit comments