|
1 | | -namespace Quick.Protocol |
| 1 | +using System; |
| 2 | + |
| 3 | +namespace Quick.Protocol |
2 | 4 | { |
3 | 5 | public class Base |
4 | 6 | { |
5 | | - public static QpInstruction Instruction => new QpInstruction() |
| 7 | + public static QpInstruction Instruction { get; } = new QpInstruction() |
6 | 8 | { |
7 | 9 | Id = typeof(Base).FullName, |
8 | 10 | Name = "基础指令集", |
9 | 11 | NoticeInfos = new QpNoticeInfo[] |
10 | 12 | { |
11 | | - QpNoticeInfo.Create(new Notices.PrivateNotice()) |
| 13 | + QpNoticeInfo.Create(new Notices.PrivateNotice(){ Action="Action", Content="Content" }) |
12 | 14 | }, |
13 | 15 | CommandInfos = new QpCommandInfo[] |
14 | 16 | { |
15 | | - QpCommandInfo.Create(new Commands.Connect.Request()), |
16 | | - QpCommandInfo.Create(new Commands.Authenticate.Request()), |
| 17 | + QpCommandInfo.Create( |
| 18 | + new Commands.Connect.Request(){ InstructionIds=new[]{ typeof(Base).FullName } }, |
| 19 | + new Commands.Connect.Response(){ Question=Guid.NewGuid().ToString("N") }), |
| 20 | + QpCommandInfo.Create( |
| 21 | + new Commands.Authenticate.Request(){ Answer=Guid.NewGuid().ToString("N") }, |
| 22 | + new Commands.Authenticate.Response()), |
17 | 23 | QpCommandInfo.Create(new Commands.HandShake.Request()), |
18 | | - QpCommandInfo.Create(new Commands.PrivateCommand.Request()), |
| 24 | + QpCommandInfo.Create( |
| 25 | + new Commands.PrivateCommand.Request(){ Action="Action", Content="Content" }, |
| 26 | + new Commands.PrivateCommand.Response(){ Content="Content" }), |
19 | 27 | QpCommandInfo.Create(new Commands.GetQpInstructions.Request()) |
20 | 28 | } |
21 | 29 | }; |
|
0 commit comments