AutoCSer.Net.TcpServer.AwaiterBoxReference <int> addAwaiter(int left, int right) { AutoCSer.Net.TcpServer.AwaiterBoxReference <int> _awaiter_ = new AutoCSer.Net.TcpServer.AwaiterBoxReference <int>(); AutoCSer.Net.TcpInternalStreamServer.ClientSocketSender _socket_ = _TcpClient_.Sender; if (_socket_ != null) { TcpInternalStreamServer._p1 _inputParameter_ = new TcpInternalStreamServer._p1 { p0 = left, p1 = right, }; AutoCSer.Net.TcpServer.ReturnType _returnType_; AutoCSer.Net.TcpServer.AwaiterReturnValueBoxReference <int> _outputParameter_ = default(AutoCSer.Net.TcpServer.AwaiterReturnValueBoxReference <int>); _returnType_ = _socket_.GetAwaiter <TcpInternalStreamServer._p1, AutoCSer.Net.TcpServer.AwaiterReturnValueBoxReference <int> >(_a0, _awaiter_, ref _inputParameter_, ref _outputParameter_); if (_returnType_ != AutoCSer.Net.TcpServer.ReturnType.Success) { _awaiter_.Call(_returnType_); } } else { _awaiter_.Call(AutoCSer.Net.TcpServer.ReturnType.ClientException); } return(_awaiter_); }
async System.Threading.Tasks.Task <AutoCSer.Net.TcpServer.ReturnValue <int> > addAsync(int left, int right) { AutoCSer.Net.TcpInternalStreamServer.ClientSocketSender _socket_ = _TcpClient_.Sender; if (_socket_ != null) { AutoCSer.Net.TcpServer.TaskAsyncReturnValue <TcpInternalStreamServer._p2> _wait_ = new AutoCSer.Net.TcpServer.TaskAsyncReturnValue <TcpInternalStreamServer._p2>(); TcpInternalStreamServer._p1 _inputParameter_ = new TcpInternalStreamServer._p1 { p0 = left, p1 = right, }; AutoCSer.Net.TcpServer.ReturnType _returnType_; TcpInternalStreamServer._p2 _outputParameter_ = new TcpInternalStreamServer._p2 { }; if ((_returnType_ = _socket_.GetAsync <TcpInternalStreamServer._p1, TcpInternalStreamServer._p2>(_a0, _wait_, ref _inputParameter_, ref _outputParameter_)) == AutoCSer.Net.TcpServer.ReturnType.Success) { AutoCSer.Net.TcpServer.ReturnValue <TcpInternalStreamServer._p2> _returnOutputParameter_ = await _wait_; return(new AutoCSer.Net.TcpServer.ReturnValue <int> { Type = _returnOutputParameter_.Type, Value = _returnOutputParameter_.Value.Return }); } return(new AutoCSer.Net.TcpServer.ReturnValue <int> { Type = _returnType_ }); } return(new AutoCSer.Net.TcpServer.ReturnValue <int> { Type = AutoCSer.Net.TcpServer.ReturnType.ClientException }); }
AutoCSer.Net.TcpServer.ReturnValue <int> add(int left, int right) { AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpInternalStreamServer._p2> _wait_ = AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpInternalStreamServer._p2> .Pop(); try { AutoCSer.Net.TcpInternalStreamServer.ClientSocketSender _socket_ = _TcpClient_.Sender; if (_socket_ != null) { TcpInternalStreamServer._p1 _inputParameter_ = new TcpInternalStreamServer._p1 { p0 = left, p1 = right, }; TcpInternalStreamServer._p2 _outputParameter_ = new TcpInternalStreamServer._p2 { }; AutoCSer.Net.TcpServer.ReturnType _returnType_ = _socket_.WaitGet <TcpInternalStreamServer._p1, TcpInternalStreamServer._p2>(_c0, ref _wait_, ref _inputParameter_, ref _outputParameter_); return(new AutoCSer.Net.TcpServer.ReturnValue <int> { Type = _returnType_, Value = _outputParameter_.Return }); } } finally { if (_wait_ != null) { AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpInternalStreamServer._p2> .PushNotNull(_wait_); } } return(new AutoCSer.Net.TcpServer.ReturnValue <int> { Type = AutoCSer.Net.TcpServer.ReturnType.ClientException }); }