上传c#战斗服务器
This commit is contained in:
parent
93d1bb60f9
commit
4f956f9a41
34
Client.cs
34
Client.cs
@ -1,5 +1,6 @@
|
|||||||
using Fleck;
|
using Fleck;
|
||||||
using System;
|
using System;
|
||||||
|
using battle;
|
||||||
using pb = global::Google.Protobuf;
|
using pb = global::Google.Protobuf;
|
||||||
|
|
||||||
namespace BattleServer
|
namespace BattleServer
|
||||||
@ -14,13 +15,8 @@ namespace BattleServer
|
|||||||
public Client(IWebSocketConnection _socket)
|
public Client(IWebSocketConnection _socket)
|
||||||
{
|
{
|
||||||
socket = _socket;
|
socket = _socket;
|
||||||
socket.OnMessage = domessage;
|
|
||||||
socket.OnBinary = doBinary;
|
socket.OnBinary = doBinary;
|
||||||
}
|
}
|
||||||
private void domessage(string message)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 接收rpc数据
|
/// 接收rpc数据
|
||||||
@ -28,7 +24,7 @@ namespace BattleServer
|
|||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
private void doBinary(byte[] message)
|
private void doBinary(byte[] message)
|
||||||
{
|
{
|
||||||
Pb.RpcMessage msg = Deserialize<Pb.RpcMessage>(message);
|
Pb.BattleRpcMessage msg = Deserialize<Pb.BattleRpcMessage>(message);
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
handle(msg);
|
handle(msg);
|
||||||
@ -40,9 +36,16 @@ namespace BattleServer
|
|||||||
/// 处理远程请求
|
/// 处理远程请求
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="msg"></param>
|
/// <param name="msg"></param>
|
||||||
private void handle(Pb.RpcMessage msg)
|
private void handle(Pb.BattleRpcMessage msg)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("收到战斗消息:{0}", msg.ToString());
|
||||||
|
int end = battle.Manager.CheckBattle((int)msg.Rid);
|
||||||
|
Console.WriteLine("CheckBattle:{0}", end);
|
||||||
|
Pb.BattleTestMessage message = new Pb.BattleTestMessage();
|
||||||
|
message.Id = "123123";
|
||||||
|
message.Msg = "succ";
|
||||||
|
msg.Data = pb.WellKnownTypes.Any.Pack(message);
|
||||||
|
socket.Send(Serialization(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,6 +62,19 @@ namespace BattleServer
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反序列化protobuf
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="dataBytes"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static byte[] Serialization<T>(T msg) where T : pb.IMessage, new()
|
||||||
|
{
|
||||||
|
byte[] result = new byte[msg.CalculateSize()];
|
||||||
|
pb.CodedOutputStream output = new pb.CodedOutputStream(result);
|
||||||
|
msg.WriteTo(output);
|
||||||
|
output.CheckNoSpaceLeft();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,10 +8,10 @@ namespace BattleServer
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
// Console.WriteLine("BattleServer Start!");
|
Console.WriteLine("BattleServer Start!");
|
||||||
|
Service service = new Service();
|
||||||
|
Console.ReadKey();
|
||||||
|
|
||||||
// Console.ReadKey();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,6 +23,7 @@ namespace BattleServer
|
|||||||
private void onAccept(IWebSocketConnection webSocket)
|
private void onAccept(IWebSocketConnection webSocket)
|
||||||
{
|
{
|
||||||
Client client = new Client(webSocket);
|
Client client = new Client(webSocket);
|
||||||
|
Console.WriteLine("新的连接对象进入{0}", client.ToString());
|
||||||
clients.Add(client);
|
clients.Add(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
bin/Debug/net6.0/Fleck.dll
Normal file
BIN
bin/Debug/net6.0/Fleck.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net6.0/Google.Protobuf.dll
Normal file
BIN
bin/Debug/net6.0/Google.Protobuf.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/Debug/net6.0/Microsoft.Extensions.DependencyInjection.dll
Normal file
BIN
bin/Debug/net6.0/Microsoft.Extensions.DependencyInjection.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net6.0/battle.dll
Normal file
BIN
bin/Debug/net6.0/battle.dll
Normal file
Binary file not shown.
@ -7,9 +7,58 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
".NETCoreApp,Version=v6.0": {
|
".NETCoreApp,Version=v6.0": {
|
||||||
"dfbattle/1.0.0": {
|
"dfbattle/1.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Fleck": "1.2.0",
|
||||||
|
"Google.Protobuf": "3.21.9",
|
||||||
|
"Microsoft.Extensions.DependencyInjection": "2.1.1",
|
||||||
|
"battle": "1.0.0.0"
|
||||||
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"dfbattle.dll": {}
|
"dfbattle.dll": {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Fleck/1.2.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netcoreapp2.0/Fleck.dll": {
|
||||||
|
"assemblyVersion": "1.2.0.0",
|
||||||
|
"fileVersion": "1.2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Google.Protobuf/3.21.9": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net5.0/Google.Protobuf.dll": {
|
||||||
|
"assemblyVersion": "3.21.9.0",
|
||||||
|
"fileVersion": "3.21.9.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.dll": {
|
||||||
|
"assemblyVersion": "2.1.1.0",
|
||||||
|
"fileVersion": "2.1.1.18157"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
|
||||||
|
"assemblyVersion": "2.1.1.0",
|
||||||
|
"fileVersion": "2.1.1.18157"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"battle/1.0.0.0": {
|
||||||
|
"runtime": {
|
||||||
|
"battle.dll": {
|
||||||
|
"assemblyVersion": "1.0.0.0",
|
||||||
|
"fileVersion": "1.0.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -18,6 +67,39 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"serviceable": false,
|
"serviceable": false,
|
||||||
"sha512": ""
|
"sha512": ""
|
||||||
|
},
|
||||||
|
"Fleck/1.2.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-bPLXn6QbLAFoviur6XbrKB0Zn6x04E8VibHXyHZeJsoC7bkUl5DVtzM5cZgDuqHkIrBqAXJyTNJwSNIc6wBJ2Q==",
|
||||||
|
"path": "fleck/1.2.0",
|
||||||
|
"hashPath": "fleck.1.2.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Google.Protobuf/3.21.9": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-OTpFujTgkmqMLbg3KT7F/iuKi1rg6s5FCS2M9XcVLDn40zL8wgXm37CY/F6MeOEXKjdcnXGCN/h7oyMkVydVsg==",
|
||||||
|
"path": "google.protobuf/3.21.9",
|
||||||
|
"hashPath": "google.protobuf.3.21.9.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-RVdgNWT/73M0eCpreGpWv5NmbHFGQzzW+G7nChK8ej84m+d1nzeWrtqcRYnEpKNx3B8V/Uek4tNP0WCaCNjYnQ==",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection/2.1.1",
|
||||||
|
"hashPath": "microsoft.extensions.dependencyinjection.2.1.1.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection.abstractions/2.1.1",
|
||||||
|
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"battle/1.0.0.0": {
|
||||||
|
"type": "reference",
|
||||||
|
"serviceable": false,
|
||||||
|
"sha512": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
BIN
bin/release/net6.0/Fleck.dll
Normal file
BIN
bin/release/net6.0/Fleck.dll
Normal file
Binary file not shown.
BIN
bin/release/net6.0/Google.Protobuf.dll
Normal file
BIN
bin/release/net6.0/Google.Protobuf.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/release/net6.0/Microsoft.Extensions.DependencyInjection.dll
Normal file
BIN
bin/release/net6.0/Microsoft.Extensions.DependencyInjection.dll
Normal file
Binary file not shown.
BIN
bin/release/net6.0/battle.dll
Normal file
BIN
bin/release/net6.0/battle.dll
Normal file
Binary file not shown.
105
bin/release/net6.0/dfbattle.deps.json
Normal file
105
bin/release/net6.0/dfbattle.deps.json
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"runtimeTarget": {
|
||||||
|
"name": ".NETCoreApp,Version=v6.0",
|
||||||
|
"signature": ""
|
||||||
|
},
|
||||||
|
"compilationOptions": {},
|
||||||
|
"targets": {
|
||||||
|
".NETCoreApp,Version=v6.0": {
|
||||||
|
"dfbattle/1.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Fleck": "1.2.0",
|
||||||
|
"Google.Protobuf": "3.21.9",
|
||||||
|
"Microsoft.Extensions.DependencyInjection": "2.1.1",
|
||||||
|
"battle": "1.0.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"dfbattle.dll": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Fleck/1.2.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netcoreapp2.0/Fleck.dll": {
|
||||||
|
"assemblyVersion": "1.2.0.0",
|
||||||
|
"fileVersion": "1.2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Google.Protobuf/3.21.9": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net5.0/Google.Protobuf.dll": {
|
||||||
|
"assemblyVersion": "3.21.9.0",
|
||||||
|
"fileVersion": "3.21.9.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.dll": {
|
||||||
|
"assemblyVersion": "2.1.1.0",
|
||||||
|
"fileVersion": "2.1.1.18157"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
|
||||||
|
"assemblyVersion": "2.1.1.0",
|
||||||
|
"fileVersion": "2.1.1.18157"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"battle/1.0.0.0": {
|
||||||
|
"runtime": {
|
||||||
|
"battle.dll": {
|
||||||
|
"assemblyVersion": "1.0.0.0",
|
||||||
|
"fileVersion": "1.0.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"dfbattle/1.0.0": {
|
||||||
|
"type": "project",
|
||||||
|
"serviceable": false,
|
||||||
|
"sha512": ""
|
||||||
|
},
|
||||||
|
"Fleck/1.2.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-bPLXn6QbLAFoviur6XbrKB0Zn6x04E8VibHXyHZeJsoC7bkUl5DVtzM5cZgDuqHkIrBqAXJyTNJwSNIc6wBJ2Q==",
|
||||||
|
"path": "fleck/1.2.0",
|
||||||
|
"hashPath": "fleck.1.2.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Google.Protobuf/3.21.9": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-OTpFujTgkmqMLbg3KT7F/iuKi1rg6s5FCS2M9XcVLDn40zL8wgXm37CY/F6MeOEXKjdcnXGCN/h7oyMkVydVsg==",
|
||||||
|
"path": "google.protobuf/3.21.9",
|
||||||
|
"hashPath": "google.protobuf.3.21.9.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-RVdgNWT/73M0eCpreGpWv5NmbHFGQzzW+G7nChK8ej84m+d1nzeWrtqcRYnEpKNx3B8V/Uek4tNP0WCaCNjYnQ==",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection/2.1.1",
|
||||||
|
"hashPath": "microsoft.extensions.dependencyinjection.2.1.1.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection.abstractions/2.1.1",
|
||||||
|
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"battle/1.0.0.0": {
|
||||||
|
"type": "reference",
|
||||||
|
"serviceable": false,
|
||||||
|
"sha512": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
bin/release/net6.0/dfbattle.dll
Normal file
BIN
bin/release/net6.0/dfbattle.dll
Normal file
Binary file not shown.
BIN
bin/release/net6.0/dfbattle.exe
Normal file
BIN
bin/release/net6.0/dfbattle.exe
Normal file
Binary file not shown.
BIN
bin/release/net6.0/dfbattle.pdb
Normal file
BIN
bin/release/net6.0/dfbattle.pdb
Normal file
Binary file not shown.
12
bin/release/net6.0/dfbattle.runtimeconfig.json
Normal file
12
bin/release/net6.0/dfbattle.runtimeconfig.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net6.0",
|
||||||
|
"framework": {
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "6.0.0"
|
||||||
|
},
|
||||||
|
"configProperties": {
|
||||||
|
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -11,5 +11,10 @@
|
|||||||
<PackageReference Include="Fleck" Version="1.2.0" />
|
<PackageReference Include="Fleck" Version="1.2.0" />
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
|
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1"/>
|
||||||
|
<Reference Include="battle">
|
||||||
|
<HintPath>E:\c#\dfbattle\lib\battle.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
BIN
lib/battle.dll
Normal file
BIN
lib/battle.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
obj/Debug/net6.0/dfbattle.csproj.CopyComplete
Normal file
0
obj/Debug/net6.0/dfbattle.csproj.CopyComplete
Normal file
@ -1 +1 @@
|
|||||||
e2d38b4f8971f223869a8c99d5ae024a414a4f80
|
14c7a867eefd9ec59ba8e8d78710cb0814087f7a
|
||||||
|
@ -13,3 +13,9 @@ E:\c#\dfbattle\obj\Debug\net6.0\refint\dfbattle.dll
|
|||||||
E:\c#\dfbattle\obj\Debug\net6.0\dfbattle.pdb
|
E:\c#\dfbattle\obj\Debug\net6.0\dfbattle.pdb
|
||||||
E:\c#\dfbattle\obj\Debug\net6.0\dfbattle.genruntimeconfig.cache
|
E:\c#\dfbattle\obj\Debug\net6.0\dfbattle.genruntimeconfig.cache
|
||||||
E:\c#\dfbattle\obj\Debug\net6.0\ref\dfbattle.dll
|
E:\c#\dfbattle\obj\Debug\net6.0\ref\dfbattle.dll
|
||||||
|
E:\c#\dfbattle\bin\Debug\net6.0\Fleck.dll
|
||||||
|
E:\c#\dfbattle\bin\Debug\net6.0\Google.Protobuf.dll
|
||||||
|
E:\c#\dfbattle\obj\Debug\net6.0\dfbattle.csproj.CopyComplete
|
||||||
|
E:\c#\dfbattle\bin\Debug\net6.0\Microsoft.Extensions.DependencyInjection.dll
|
||||||
|
E:\c#\dfbattle\bin\Debug\net6.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
|
||||||
|
E:\c#\dfbattle\bin\Debug\net6.0\battle.dll
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -45,6 +45,10 @@
|
|||||||
"Google.Protobuf": {
|
"Google.Protobuf": {
|
||||||
"target": "Package",
|
"target": "Package",
|
||||||
"version": "[3.21.9, )"
|
"version": "[3.21.9, )"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection": {
|
||||||
|
"target": "Package",
|
||||||
|
"version": "[2.1.1, )"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"imports": [
|
"imports": [
|
||||||
|
@ -19,6 +19,27 @@
|
|||||||
"runtime": {
|
"runtime": {
|
||||||
"lib/net5.0/Google.Protobuf.dll": {}
|
"lib/net5.0/Google.Protobuf.dll": {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1"
|
||||||
|
},
|
||||||
|
"compile": {
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.dll": {}
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.dll": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"type": "package",
|
||||||
|
"compile": {
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {}
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -60,12 +81,43 @@
|
|||||||
"lib/netstandard2.0/Google.Protobuf.pdb",
|
"lib/netstandard2.0/Google.Protobuf.pdb",
|
||||||
"lib/netstandard2.0/Google.Protobuf.xml"
|
"lib/netstandard2.0/Google.Protobuf.xml"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection/2.1.1": {
|
||||||
|
"sha512": "RVdgNWT/73M0eCpreGpWv5NmbHFGQzzW+G7nChK8ej84m+d1nzeWrtqcRYnEpKNx3B8V/Uek4tNP0WCaCNjYnQ==",
|
||||||
|
"type": "package",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection/2.1.1",
|
||||||
|
"files": [
|
||||||
|
".nupkg.metadata",
|
||||||
|
".signature.p7s",
|
||||||
|
"lib/net461/Microsoft.Extensions.DependencyInjection.dll",
|
||||||
|
"lib/net461/Microsoft.Extensions.DependencyInjection.xml",
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.dll",
|
||||||
|
"lib/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.xml",
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.dll",
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.xml",
|
||||||
|
"microsoft.extensions.dependencyinjection.2.1.1.nupkg.sha512",
|
||||||
|
"microsoft.extensions.dependencyinjection.nuspec"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions/2.1.1": {
|
||||||
|
"sha512": "MgYpU5cwZohUMKKg3sbPhvGG+eAZ/59E9UwPwlrUkyXU+PGzqwZg9yyQNjhxuAWmoNoFReoemeCku50prYSGzA==",
|
||||||
|
"type": "package",
|
||||||
|
"path": "microsoft.extensions.dependencyinjection.abstractions/2.1.1",
|
||||||
|
"files": [
|
||||||
|
".nupkg.metadata",
|
||||||
|
".signature.p7s",
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
|
||||||
|
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
|
||||||
|
"microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512",
|
||||||
|
"microsoft.extensions.dependencyinjection.abstractions.nuspec"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"projectFileDependencyGroups": {
|
"projectFileDependencyGroups": {
|
||||||
"net6.0": [
|
"net6.0": [
|
||||||
"Fleck >= 1.2.0",
|
"Fleck >= 1.2.0",
|
||||||
"Google.Protobuf >= 3.21.9"
|
"Google.Protobuf >= 3.21.9",
|
||||||
|
"Microsoft.Extensions.DependencyInjection >= 2.1.1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"packageFolders": {
|
"packageFolders": {
|
||||||
@ -112,6 +164,10 @@
|
|||||||
"Google.Protobuf": {
|
"Google.Protobuf": {
|
||||||
"target": "Package",
|
"target": "Package",
|
||||||
"version": "[3.21.9, )"
|
"version": "[3.21.9, )"
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection": {
|
||||||
|
"target": "Package",
|
||||||
|
"version": "[2.1.1, )"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"imports": [
|
"imports": [
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "s9XIzWQ6HRV29gxJPILhV4DPvFYneeFqjFz7eLOSIrOeL1EmSxlxD4wgKwKlxq0Bw79nFNhIwrWdojuZ2uwodA==",
|
"dgSpecHash": "VO0R/XQyS76+ZkXQorQMd280Mq8lkrP2i7CJgDcHc4ABsHSzY5bI4nBsXRZTBMY4GqAdOz9zJURXRNlw7DOuQA==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "E:\\c#\\dfbattle\\dfbattle.csproj",
|
"projectFilePath": "E:\\c#\\dfbattle\\dfbattle.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
"C:\\Users\\liwei1dao\\.nuget\\packages\\fleck\\1.2.0\\fleck.1.2.0.nupkg.sha512",
|
"C:\\Users\\liwei1dao\\.nuget\\packages\\fleck\\1.2.0\\fleck.1.2.0.nupkg.sha512",
|
||||||
"C:\\Users\\liwei1dao\\.nuget\\packages\\google.protobuf\\3.21.9\\google.protobuf.3.21.9.nupkg.sha512"
|
"C:\\Users\\liwei1dao\\.nuget\\packages\\google.protobuf\\3.21.9\\google.protobuf.3.21.9.nupkg.sha512",
|
||||||
|
"C:\\Users\\liwei1dao\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\2.1.1\\microsoft.extensions.dependencyinjection.2.1.1.nupkg.sha512",
|
||||||
|
"C:\\Users\\liwei1dao\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\2.1.1\\microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512"
|
||||||
],
|
],
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
|
BIN
obj/release/net6.0/apphost.exe
Normal file
BIN
obj/release/net6.0/apphost.exe
Normal file
Binary file not shown.
22
obj/release/net6.0/dfbattle.AssemblyInfo.cs
Normal file
22
obj/release/net6.0/dfbattle.AssemblyInfo.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: System.Reflection.AssemblyCompanyAttribute("dfbattle")]
|
||||||
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("release")]
|
||||||
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||||
|
[assembly: System.Reflection.AssemblyProductAttribute("dfbattle")]
|
||||||
|
[assembly: System.Reflection.AssemblyTitleAttribute("dfbattle")]
|
||||||
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
||||||
|
// 由 MSBuild WriteCodeFragment 类生成。
|
||||||
|
|
1
obj/release/net6.0/dfbattle.AssemblyInfoInputs.cache
Normal file
1
obj/release/net6.0/dfbattle.AssemblyInfoInputs.cache
Normal file
@ -0,0 +1 @@
|
|||||||
|
90e72506fa6a5e4bb11238e13048bb74d1a90769
|
@ -0,0 +1,10 @@
|
|||||||
|
is_global = true
|
||||||
|
build_property.TargetFramework = net6.0
|
||||||
|
build_property.TargetPlatformMinVersion =
|
||||||
|
build_property.UsingMicrosoftNETSdkWeb =
|
||||||
|
build_property.ProjectTypeGuids =
|
||||||
|
build_property.InvariantGlobalization =
|
||||||
|
build_property.PlatformNeutralAssembly =
|
||||||
|
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||||
|
build_property.RootNamespace = dfbattle
|
||||||
|
build_property.ProjectDir = E:\c#\dfbattle\
|
8
obj/release/net6.0/dfbattle.GlobalUsings.g.cs
Normal file
8
obj/release/net6.0/dfbattle.GlobalUsings.g.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
global using global::System;
|
||||||
|
global using global::System.Collections.Generic;
|
||||||
|
global using global::System.IO;
|
||||||
|
global using global::System.Linq;
|
||||||
|
global using global::System.Net.Http;
|
||||||
|
global using global::System.Threading;
|
||||||
|
global using global::System.Threading.Tasks;
|
BIN
obj/release/net6.0/dfbattle.assets.cache
Normal file
BIN
obj/release/net6.0/dfbattle.assets.cache
Normal file
Binary file not shown.
BIN
obj/release/net6.0/dfbattle.csproj.AssemblyReference.cache
Normal file
BIN
obj/release/net6.0/dfbattle.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
0
obj/release/net6.0/dfbattle.csproj.CopyComplete
Normal file
0
obj/release/net6.0/dfbattle.csproj.CopyComplete
Normal file
@ -0,0 +1 @@
|
|||||||
|
4a93511b18f2551159384e9f5cc8fc0ca4e14681
|
21
obj/release/net6.0/dfbattle.csproj.FileListAbsolute.txt
Normal file
21
obj/release/net6.0/dfbattle.csproj.FileListAbsolute.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
E:\c#\dfbattle\bin\release\net6.0\dfbattle.exe
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\dfbattle.deps.json
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\dfbattle.runtimeconfig.json
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\dfbattle.dll
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\dfbattle.pdb
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\Fleck.dll
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\Google.Protobuf.dll
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\Microsoft.Extensions.DependencyInjection.dll
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
|
||||||
|
E:\c#\dfbattle\bin\release\net6.0\battle.dll
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.csproj.AssemblyReference.cache
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.GeneratedMSBuildEditorConfig.editorconfig
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.AssemblyInfoInputs.cache
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.AssemblyInfo.cs
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.csproj.CoreCompileInputs.cache
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.csproj.CopyComplete
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.dll
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\refint\dfbattle.dll
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.pdb
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\dfbattle.genruntimeconfig.cache
|
||||||
|
E:\c#\dfbattle\obj\release\net6.0\ref\dfbattle.dll
|
BIN
obj/release/net6.0/dfbattle.dll
Normal file
BIN
obj/release/net6.0/dfbattle.dll
Normal file
Binary file not shown.
1
obj/release/net6.0/dfbattle.genruntimeconfig.cache
Normal file
1
obj/release/net6.0/dfbattle.genruntimeconfig.cache
Normal file
@ -0,0 +1 @@
|
|||||||
|
b1c5d5d045f62e57123c8a694c181e97e73282cc
|
BIN
obj/release/net6.0/dfbattle.pdb
Normal file
BIN
obj/release/net6.0/dfbattle.pdb
Normal file
Binary file not shown.
BIN
obj/release/net6.0/ref/dfbattle.dll
Normal file
BIN
obj/release/net6.0/ref/dfbattle.dll
Normal file
Binary file not shown.
BIN
obj/release/net6.0/refint/dfbattle.dll
Normal file
BIN
obj/release/net6.0/refint/dfbattle.dll
Normal file
Binary file not shown.
304
pb/Comm.cs
304
pb/Comm.cs
@ -24,12 +24,16 @@ namespace Pb {
|
|||||||
static CommReflection() {
|
static CommReflection() {
|
||||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||||
string.Concat(
|
string.Concat(
|
||||||
"Cgpjb21tLnByb3RvEgJwYiI3CgpScGNNZXNzYWdlEgsKA3JpZBgBIAEoBBIO",
|
"Cgpjb21tLnByb3RvEgJwYhoZZ29vZ2xlL3Byb3RvYnVmL2FueS5wcm90byJT",
|
||||||
"CgZtZXRob2QYAiABKAkSDAoEZGF0YRgDIAEoDGIGcHJvdG8z"));
|
"ChBCYXR0bGVScGNNZXNzYWdlEgsKA3JpZBgBIAEoBBIOCgZtZXRob2QYAiAB",
|
||||||
|
"KAkSIgoERGF0YRgDIAEoCzIULmdvb2dsZS5wcm90b2J1Zi5BbnkiLAoRQmF0",
|
||||||
|
"dGxlVGVzdE1lc3NhZ2USCgoCaWQYASABKAkSCwoDbXNnGAIgASgJYgZwcm90",
|
||||||
|
"bzM="));
|
||||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||||
new pbr::FileDescriptor[] { },
|
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, },
|
||||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.RpcMessage), global::Pb.RpcMessage.Parser, new[]{ "Rid", "Method", "Data" }, null, null, null, null)
|
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.BattleRpcMessage), global::Pb.BattleRpcMessage.Parser, new[]{ "Rid", "Method", "Data" }, null, null, null, null),
|
||||||
|
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.BattleTestMessage), global::Pb.BattleTestMessage.Parser, new[]{ "Id", "Msg" }, null, null, null, null)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -39,16 +43,16 @@ namespace Pb {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///公用消息结构代码
|
///公用消息结构代码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class RpcMessage : pb::IMessage<RpcMessage>
|
public sealed partial class BattleRpcMessage : pb::IMessage<BattleRpcMessage>
|
||||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
, pb::IBufferMessage
|
, pb::IBufferMessage
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
private static readonly pb::MessageParser<RpcMessage> _parser = new pb::MessageParser<RpcMessage>(() => new RpcMessage());
|
private static readonly pb::MessageParser<BattleRpcMessage> _parser = new pb::MessageParser<BattleRpcMessage>(() => new BattleRpcMessage());
|
||||||
private pb::UnknownFieldSet _unknownFields;
|
private pb::UnknownFieldSet _unknownFields;
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pb::MessageParser<RpcMessage> Parser { get { return _parser; } }
|
public static pb::MessageParser<BattleRpcMessage> Parser { get { return _parser; } }
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
@ -64,7 +68,7 @@ namespace Pb {
|
|||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public RpcMessage() {
|
public BattleRpcMessage() {
|
||||||
OnConstruction();
|
OnConstruction();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,17 +76,17 @@ namespace Pb {
|
|||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public RpcMessage(RpcMessage other) : this() {
|
public BattleRpcMessage(BattleRpcMessage other) : this() {
|
||||||
rid_ = other.rid_;
|
rid_ = other.rid_;
|
||||||
method_ = other.method_;
|
method_ = other.method_;
|
||||||
data_ = other.data_;
|
data_ = other.data_ != null ? other.data_.Clone() : null;
|
||||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public RpcMessage Clone() {
|
public BattleRpcMessage Clone() {
|
||||||
return new RpcMessage(this);
|
return new BattleRpcMessage(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Field number for the "rid" field.</summary>
|
/// <summary>Field number for the "rid" field.</summary>
|
||||||
@ -115,30 +119,27 @@ namespace Pb {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Field number for the "data" field.</summary>
|
/// <summary>Field number for the "Data" field.</summary>
|
||||||
public const int DataFieldNumber = 3;
|
public const int DataFieldNumber = 3;
|
||||||
private pb::ByteString data_ = pb::ByteString.Empty;
|
private global::Google.Protobuf.WellKnownTypes.Any data_;
|
||||||
/// <summary>
|
|
||||||
///数据
|
|
||||||
/// </summary>
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public pb::ByteString Data {
|
public global::Google.Protobuf.WellKnownTypes.Any Data {
|
||||||
get { return data_; }
|
get { return data_; }
|
||||||
set {
|
set {
|
||||||
data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
data_ = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public override bool Equals(object other) {
|
public override bool Equals(object other) {
|
||||||
return Equals(other as RpcMessage);
|
return Equals(other as BattleRpcMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public bool Equals(RpcMessage other) {
|
public bool Equals(BattleRpcMessage other) {
|
||||||
if (ReferenceEquals(other, null)) {
|
if (ReferenceEquals(other, null)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -147,7 +148,7 @@ namespace Pb {
|
|||||||
}
|
}
|
||||||
if (Rid != other.Rid) return false;
|
if (Rid != other.Rid) return false;
|
||||||
if (Method != other.Method) return false;
|
if (Method != other.Method) return false;
|
||||||
if (Data != other.Data) return false;
|
if (!object.Equals(Data, other.Data)) return false;
|
||||||
return Equals(_unknownFields, other._unknownFields);
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +158,7 @@ namespace Pb {
|
|||||||
int hash = 1;
|
int hash = 1;
|
||||||
if (Rid != 0UL) hash ^= Rid.GetHashCode();
|
if (Rid != 0UL) hash ^= Rid.GetHashCode();
|
||||||
if (Method.Length != 0) hash ^= Method.GetHashCode();
|
if (Method.Length != 0) hash ^= Method.GetHashCode();
|
||||||
if (Data.Length != 0) hash ^= Data.GetHashCode();
|
if (data_ != null) hash ^= Data.GetHashCode();
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
hash ^= _unknownFields.GetHashCode();
|
hash ^= _unknownFields.GetHashCode();
|
||||||
}
|
}
|
||||||
@ -184,9 +185,9 @@ namespace Pb {
|
|||||||
output.WriteRawTag(18);
|
output.WriteRawTag(18);
|
||||||
output.WriteString(Method);
|
output.WriteString(Method);
|
||||||
}
|
}
|
||||||
if (Data.Length != 0) {
|
if (data_ != null) {
|
||||||
output.WriteRawTag(26);
|
output.WriteRawTag(26);
|
||||||
output.WriteBytes(Data);
|
output.WriteMessage(Data);
|
||||||
}
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(output);
|
_unknownFields.WriteTo(output);
|
||||||
@ -206,9 +207,9 @@ namespace Pb {
|
|||||||
output.WriteRawTag(18);
|
output.WriteRawTag(18);
|
||||||
output.WriteString(Method);
|
output.WriteString(Method);
|
||||||
}
|
}
|
||||||
if (Data.Length != 0) {
|
if (data_ != null) {
|
||||||
output.WriteRawTag(26);
|
output.WriteRawTag(26);
|
||||||
output.WriteBytes(Data);
|
output.WriteMessage(Data);
|
||||||
}
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(ref output);
|
_unknownFields.WriteTo(ref output);
|
||||||
@ -226,8 +227,8 @@ namespace Pb {
|
|||||||
if (Method.Length != 0) {
|
if (Method.Length != 0) {
|
||||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Method);
|
size += 1 + pb::CodedOutputStream.ComputeStringSize(Method);
|
||||||
}
|
}
|
||||||
if (Data.Length != 0) {
|
if (data_ != null) {
|
||||||
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
|
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Data);
|
||||||
}
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
size += _unknownFields.CalculateSize();
|
size += _unknownFields.CalculateSize();
|
||||||
@ -237,7 +238,7 @@ namespace Pb {
|
|||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public void MergeFrom(RpcMessage other) {
|
public void MergeFrom(BattleRpcMessage other) {
|
||||||
if (other == null) {
|
if (other == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -247,8 +248,11 @@ namespace Pb {
|
|||||||
if (other.Method.Length != 0) {
|
if (other.Method.Length != 0) {
|
||||||
Method = other.Method;
|
Method = other.Method;
|
||||||
}
|
}
|
||||||
if (other.Data.Length != 0) {
|
if (other.data_ != null) {
|
||||||
Data = other.Data;
|
if (data_ == null) {
|
||||||
|
Data = new global::Google.Protobuf.WellKnownTypes.Any();
|
||||||
|
}
|
||||||
|
Data.MergeFrom(other.Data);
|
||||||
}
|
}
|
||||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
@ -274,7 +278,10 @@ namespace Pb {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26: {
|
case 26: {
|
||||||
Data = input.ReadBytes();
|
if (data_ == null) {
|
||||||
|
Data = new global::Google.Protobuf.WellKnownTypes.Any();
|
||||||
|
}
|
||||||
|
input.ReadMessage(Data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -301,7 +308,236 @@ namespace Pb {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26: {
|
case 26: {
|
||||||
Data = input.ReadBytes();
|
if (data_ == null) {
|
||||||
|
Data = new global::Google.Protobuf.WellKnownTypes.Any();
|
||||||
|
}
|
||||||
|
input.ReadMessage(Data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed partial class BattleTestMessage : pb::IMessage<BattleTestMessage>
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
, pb::IBufferMessage
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
private static readonly pb::MessageParser<BattleTestMessage> _parser = new pb::MessageParser<BattleTestMessage>(() => new BattleTestMessage());
|
||||||
|
private pb::UnknownFieldSet _unknownFields;
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public static pb::MessageParser<BattleTestMessage> Parser { get { return _parser; } }
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
|
get { return global::Pb.CommReflection.Descriptor.MessageTypes[1]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||||
|
get { return Descriptor; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public BattleTestMessage() {
|
||||||
|
OnConstruction();
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnConstruction();
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public BattleTestMessage(BattleTestMessage other) : this() {
|
||||||
|
id_ = other.id_;
|
||||||
|
msg_ = other.msg_;
|
||||||
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public BattleTestMessage Clone() {
|
||||||
|
return new BattleTestMessage(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Field number for the "id" field.</summary>
|
||||||
|
public const int IdFieldNumber = 1;
|
||||||
|
private string id_ = "";
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public string Id {
|
||||||
|
get { return id_; }
|
||||||
|
set {
|
||||||
|
id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Field number for the "msg" field.</summary>
|
||||||
|
public const int MsgFieldNumber = 2;
|
||||||
|
private string msg_ = "";
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public string Msg {
|
||||||
|
get { return msg_; }
|
||||||
|
set {
|
||||||
|
msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override bool Equals(object other) {
|
||||||
|
return Equals(other as BattleTestMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public bool Equals(BattleTestMessage other) {
|
||||||
|
if (ReferenceEquals(other, null)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (ReferenceEquals(other, this)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (Id != other.Id) return false;
|
||||||
|
if (Msg != other.Msg) return false;
|
||||||
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override int GetHashCode() {
|
||||||
|
int hash = 1;
|
||||||
|
if (Id.Length != 0) hash ^= Id.GetHashCode();
|
||||||
|
if (Msg.Length != 0) hash ^= Msg.GetHashCode();
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
hash ^= _unknownFields.GetHashCode();
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override string ToString() {
|
||||||
|
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void WriteTo(pb::CodedOutputStream output) {
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
output.WriteRawMessage(this);
|
||||||
|
#else
|
||||||
|
if (Id.Length != 0) {
|
||||||
|
output.WriteRawTag(10);
|
||||||
|
output.WriteString(Id);
|
||||||
|
}
|
||||||
|
if (Msg.Length != 0) {
|
||||||
|
output.WriteRawTag(18);
|
||||||
|
output.WriteString(Msg);
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
_unknownFields.WriteTo(output);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||||
|
if (Id.Length != 0) {
|
||||||
|
output.WriteRawTag(10);
|
||||||
|
output.WriteString(Id);
|
||||||
|
}
|
||||||
|
if (Msg.Length != 0) {
|
||||||
|
output.WriteRawTag(18);
|
||||||
|
output.WriteString(Msg);
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
_unknownFields.WriteTo(ref output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public int CalculateSize() {
|
||||||
|
int size = 0;
|
||||||
|
if (Id.Length != 0) {
|
||||||
|
size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
|
||||||
|
}
|
||||||
|
if (Msg.Length != 0) {
|
||||||
|
size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
size += _unknownFields.CalculateSize();
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void MergeFrom(BattleTestMessage other) {
|
||||||
|
if (other == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (other.Id.Length != 0) {
|
||||||
|
Id = other.Id;
|
||||||
|
}
|
||||||
|
if (other.Msg.Length != 0) {
|
||||||
|
Msg = other.Msg;
|
||||||
|
}
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void MergeFrom(pb::CodedInputStream input) {
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
input.ReadRawMessage(this);
|
||||||
|
#else
|
||||||
|
uint tag;
|
||||||
|
while ((tag = input.ReadTag()) != 0) {
|
||||||
|
switch(tag) {
|
||||||
|
default:
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
Id = input.ReadString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
Msg = input.ReadString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||||
|
uint tag;
|
||||||
|
while ((tag = input.ReadTag()) != 0) {
|
||||||
|
switch(tag) {
|
||||||
|
default:
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||||
|
break;
|
||||||
|
case 10: {
|
||||||
|
Id = input.ReadString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
Msg = input.ReadString();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user