提交 ada34441 编写于 作者: T tanghai

漏掉了几个Task没改成ETTask

上级 e7ac247a
...@@ -12,7 +12,7 @@ namespace ETHotfix ...@@ -12,7 +12,7 @@ namespace ETHotfix
session.Send(message); session.Send(message);
} }
public static async Task<IActorResponse> Call(this ActorMessageSender self, IActorRequest message) public static async ETTask<IActorResponse> Call(this ActorMessageSender self, IActorRequest message)
{ {
Session session = Game.Scene.GetComponent<NetInnerComponent>().Get(self.Address); Session session = Game.Scene.GetComponent<NetInnerComponent>().Get(self.Address);
message.ActorId = self.ActorId; message.ActorId = self.ActorId;
......
...@@ -139,7 +139,7 @@ namespace ETHotfix ...@@ -139,7 +139,7 @@ namespace ETHotfix
} }
} }
private static async Task RunTask(this ActorLocationSender self, ActorTask task) private static async ETTask RunTask(this ActorLocationSender self, ActorTask task)
{ {
ActorMessageSender actorMessageSender = Game.Scene.GetComponent<ActorMessageSenderComponent>().Get(self.ActorId); ActorMessageSender actorMessageSender = Game.Scene.GetComponent<ActorMessageSenderComponent>().Get(self.ActorId);
IActorResponse response = await actorMessageSender.Call(task.ActorRequest); IActorResponse response = await actorMessageSender.Call(task.ActorRequest);
......
...@@ -55,7 +55,7 @@ namespace ETHotfix ...@@ -55,7 +55,7 @@ namespace ETHotfix
} }
} }
public static async Task Send(this WebSocketBenchmarkComponent self, Session session, int j) public static async ETTask Send(this WebSocketBenchmarkComponent self, Session session, int j)
{ {
try try
{ {
......
...@@ -8,7 +8,7 @@ namespace ETHotfix ...@@ -8,7 +8,7 @@ namespace ETHotfix
{ {
public static class UnitPathComponentHelper public static class UnitPathComponentHelper
{ {
public static async Task MoveAsync(this UnitPathComponent self, List<Vector3> path) public static async ETTask MoveAsync(this UnitPathComponent self, List<Vector3> path)
{ {
if (path.Count == 0) if (path.Count == 0)
{ {
......
...@@ -35,7 +35,7 @@ namespace ETHotfix ...@@ -35,7 +35,7 @@ namespace ETHotfix
} }
[Get] // url-> /GetRechargeRecord [Get] // url-> /GetRechargeRecord
public async Task<HttpResult> GetRechargeRecord(long id) public async ETTask<HttpResult> GetRechargeRecord(long id)
{ {
// var db = Game.Scene.GetComponent<DBProxyComponent>(); // var db = Game.Scene.GetComponent<DBProxyComponent>();
......
...@@ -235,7 +235,7 @@ namespace ETModel ...@@ -235,7 +235,7 @@ namespace ETModel
// 自动把返回值,以json方式响应。 // 自动把返回值,以json方式响应。
object resp = methodInfo.Invoke(httpHandler, args); object resp = methodInfo.Invoke(httpHandler, args);
object result = resp; object result = resp;
if (resp is Task t) if (resp is ETTask t)
{ {
await t; await t;
result = t.GetType().GetProperty("Result").GetValue(t, null); result = t.GetType().GetProperty("Result").GetValue(t, null);
......
...@@ -58,7 +58,7 @@ namespace ETModel ...@@ -58,7 +58,7 @@ namespace ETModel
this.request = null; this.request = null;
} }
public async Task<UnityEngine.Object[]> LoadAllAssetsAsync() public async ETTask<UnityEngine.Object[]> LoadAllAssetsAsync()
{ {
await InnerLoadAllAssetsAsync(); await InnerLoadAllAssetsAsync();
return this.request.allAssets; return this.request.allAssets;
......
...@@ -95,7 +95,7 @@ namespace ETModel ...@@ -95,7 +95,7 @@ namespace ETModel
/// </summary> /// </summary>
/// <param name="stream"></param> /// <param name="stream"></param>
/// <returns></returns> /// <returns></returns>
public async Task ReadAsync(Stream stream) public async ETTask ReadAsync(Stream stream)
{ {
long buffLength = this.Length; long buffLength = this.Length;
int sendSize = this.ChunkSize - this.FirstIndex; int sendSize = this.ChunkSize - this.FirstIndex;
...@@ -178,7 +178,7 @@ namespace ETModel ...@@ -178,7 +178,7 @@ namespace ETModel
/// </summary> /// </summary>
/// <param name="stream"></param> /// <param name="stream"></param>
/// <returns></returns> /// <returns></returns>
public async Task<int> WriteAsync(Stream stream) public async ETTask<int> WriteAsync(Stream stream)
{ {
int size = this.ChunkSize - this.LastIndex; int size = this.ChunkSize - this.LastIndex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册