Exemplo n.º 1
0
        /// <summary>
        /// 异步操作数据
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        internal async Task <AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> > OperationAsynchronousAwaiter(ShortPath.Parameter.Node node)
        {
            ShortPath.Node shortPath  = node.ShortPath;
            ReturnType     returnType = shortPath.Check(MasterClient);

            if (returnType == ReturnType.Success)
            {
                AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> value = await MasterClient.OperationAsynchronousAwaiter(new OperationParameter.ShortPathOperationNode {
                    Node = node
                });

                if (value.Type == Net.TcpServer.ReturnType.Success && shortPath.ReCreate(MasterClient, ref value.Value.Parameter.ReturnType))
                {
                    return(await MasterClient.OperationAsynchronousAwaiter(new OperationParameter.ShortPathOperationNode {
                        Node = node
                    }));
                }
                return(value);
            }
            return(new ReturnParameter(returnType));
        }
Exemplo n.º 2
0
 internal AutoCSer.Net.TcpServer.AwaiterBox <ReturnParameter> OperationAsynchronousAwaiter(DataStructure.Abstract.Node node)
 {
     return(MasterClient.OperationAsynchronousAwaiter(new OperationParameter.OperationNode {
         Node = node
     }));
 }