using System; namespace ET { public class C2M_StartSynthesisHandler: AMActorLocationRpcHandler { protected override async ETTask Run(Unit unit, C2M_StartSynthesis request, M2C_StartSynthesis response, Action reply) { try { var err = SynthesisOperate.StartSynthesis(unit, request.ConfigId, request.MaxAmount); response.Error = err; reply(); } catch (Exception e) { response.Message = e.ToString(); response.Error = ErrorCode.ERR_SynthesisError; reply(); } await ETTask.CompletedTask; } } }