Skip to content

Commit c76d5cd

Browse files
committed
[升级] 升级新的框架版本
1 parent 1933a49 commit c76d5cd

17 files changed

+112
-120
lines changed

GameFrameX.Apps/CacheStateTypeManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using GameFrameX.Utility.Extensions;
1+
using GameFrameX.Foundation.Hash;
2+
using GameFrameX.Utility.Extensions;
23

34
namespace GameFrameX.Apps;
45

@@ -20,7 +21,7 @@ public static void Init()
2021
var isImplWithInterface = type.IsImplWithInterface(typeof(ICacheState));
2122
if (isImplWithInterface)
2223
{
23-
HashMap.TryAdd(Hash.XXHash.Hash32(type.ToString()), type);
24+
HashMap.TryAdd(XxHashHelper.Hash32(type.ToString()), type);
2425
BsonClassMapHelper.RegisterClass(type);
2526
}
2627
}

GameFrameX.Apps/GameFrameX.Apps.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta18" />
21-
<PackageReference Include="GameFrameX.Monitor" Version="1.2.0-beta18" />
20+
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta21" />
21+
<PackageReference Include="GameFrameX.Monitor" Version="1.2.0-beta21" />
2222
</ItemGroup>
2323
</Project>

GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta18" />
20+
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta21" />
2121
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
2222
<PrivateAssets>all</PrivateAssets>
2323
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

GameFrameX.Config/GameFrameX.Config.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="GameFrameX.Core.Config" Version="1.2.0-beta18" />
17-
<PackageReference Include="GameFrameX.Utility" Version="1.2.0-beta18" />
16+
<PackageReference Include="GameFrameX.Core.Config" Version="1.2.0-beta21" />
17+
<PackageReference Include="GameFrameX.Utility" Version="1.2.0-beta21" />
1818
</ItemGroup>
1919

2020
</Project>

GameFrameX.Hotfix/GameFrameX.Hotfix.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<ProjectReference Include="..\GameFrameX.CodeGenerator\GameFrameX.CodeGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
24+
<ProjectReference Include="..\GameFrameX.Apps\GameFrameX.Apps.csproj" />
2525
<ProjectReference Include="..\GameFrameX.Launcher\GameFrameX.Launcher.csproj" />
26+
<ProjectReference Include="..\GameFrameX.CodeGenerator\GameFrameX.CodeGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2627
</ItemGroup>
2728

2829
<ItemGroup>
29-
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta18" />
30-
<PackageReference Include="GameFrameX.SuperSocket.ClientEngine" Version="1.0.1" />
30+
<PackageReference Include="GameFrameX.Core" Version="1.2.0-beta21" />
31+
<PackageReference Include="GameFrameX.SuperSocket.ClientEngine" Version="1.0.3" />
3132
</ItemGroup>
3233

3334
<ItemGroup>

GameFrameX.Hotfix/Logic/Http/GetOnlinePlayerHttpHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using GameFrameX.Apps.Common.Session;
2+
using GameFrameX.Foundation.Http.Normalization;
23
using GameFrameX.NetWork.HTTP;
34

45
namespace GameFrameX.Hotfix.Logic.Http;
@@ -20,7 +21,7 @@ public override Task<string> Action(string ip, string url, Dictionary<string, ob
2021
{
2122
var response = new GetOnlinePlayerResponse();
2223
response.Count = SessionManager.Count();
23-
var res = HttpResult.CreateOk($"当前在线人数:{response.Count}", JsonHelper.Serialize(response));
24+
var res = HttpJsonResult.SuccessString($"当前在线人数:{response.Count}", JsonHelper.Serialize(response));
2425
return Task.FromResult(res);
2526
}
2627

GameFrameX.Hotfix/Logic/Http/GetOnlinePlayerListHttpHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using GameFrameX.Apps.Common.Session;
2+
using GameFrameX.Foundation.Http.Normalization;
23
using GameFrameX.NetWork.HTTP;
34

45
namespace GameFrameX.Hotfix.Logic.Http;
@@ -24,7 +25,7 @@ public override Task<string> Action(string ip, string url, Dictionary<string, ob
2425
var pageIndex = string.IsNullOrEmpty(pageIndexStr?.ToString()) ? 0 : Convert.ToInt32(pageIndexStr);
2526

2627
var response = SessionManager.GetPageList(pageSize, pageIndex);
27-
var res = HttpResult.CreateOk("当前在线玩家", JsonHelper.Serialize(response));
28+
var res = HttpJsonResult.SuccessString("当前在线玩家", JsonHelper.Serialize(response));
2829
return Task.FromResult(res);
2930
}
3031
}

GameFrameX.Hotfix/Logic/Http/KickOffLineByUserIdPlayerHttpHandler.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using GameFrameX.Apps.Common.Session;
2+
using GameFrameX.Foundation.Http.Normalization;
23
using GameFrameX.NetWork.HTTP;
34

45
namespace GameFrameX.Hotfix.Logic.Http;
@@ -22,10 +23,10 @@ public override Task<string> Action(string ip, string url, Dictionary<string, ob
2223
{
2324
SessionManager.KickOffLineByUserId(Convert.ToInt64(roleId));
2425

25-
return Task.FromResult(HttpResult.CreateOk());
26+
return Task.FromResult(HttpJsonResult.SuccessString());
2627
}
2728

28-
var res = HttpResult.CreateErrorParam("角色ID异常");
29+
var res = HttpJsonResult.ParamErrorString();
2930
return Task.FromResult(res);
3031
}
3132
}

GameFrameX.Hotfix/Logic/Http/ReloadHttpHandler.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using GameFrameX.Foundation.Http.Normalization;
12
using GameFrameX.NetWork.HTTP;
23

34
namespace GameFrameX.Hotfix.Logic.Http;
@@ -20,11 +21,9 @@ public override async Task<string> Action(string ip, string url, Dictionary<stri
2021
if (parameters.TryGetValue("version", out var version))
2122
{
2223
await HotfixManager.LoadHotfixModule(null, version.ToString());
23-
return Task.FromResult(HttpResult.CreateOk()).Result;
24+
return HttpJsonResult.SuccessString();
2425
}
2526

26-
var result = HttpResult.CreateErrorParam($"参数错误 {nameof(version)}");
27-
28-
return Task.FromResult(result).Result;
27+
return HttpJsonResult.ParamErrorString();
2928
}
3029
}

GameFrameX.Hotfix/Logic/Http/TestHttpHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using GameFrameX.Foundation.Http.Normalization;
12
using GameFrameX.NetWork.HTTP;
23

34
namespace GameFrameX.Hotfix.Logic.Http;
@@ -25,7 +26,7 @@ public override Task<string> Action(string ip, string url, Dictionary<string, ob
2526
};
2627
response.TestInfo.Age = 18;
2728
response.TestInfo.Name = "leeveel";
28-
return Task.FromResult(HttpResult.Create(JsonHelper.Serialize(response)));
29+
return Task.FromResult(HttpJsonResult.SuccessString(response));
2930
}
3031

3132
public class HttpTestRes

0 commit comments

Comments
 (0)