public AutoCSer.Net.TcpServer.ReturnValue <int> this[int index]
            {
                get
                {
                    if (_isDisposed_ == 0)
                    {
                        TcpOpenSimpleServer._p2 _inputParameter_ = new TcpOpenSimpleServer._p2
                        {
                            index = index,
                        };
                        TcpOpenSimpleServer._p1           _outputParameter_ = default(TcpOpenSimpleServer._p1);
                        AutoCSer.Net.TcpServer.ReturnType _returnType_      = _TcpClient_.Get <TcpOpenSimpleServer._p2, TcpOpenSimpleServer._p1>(_c1, ref _inputParameter_, ref _outputParameter_);
                        return(new AutoCSer.Net.TcpServer.ReturnValue <int> {
                            Type = _returnType_, Value = _outputParameter_.Return
                        });
                    }
                    return(new AutoCSer.Net.TcpServer.ReturnValue <int> {
                        Type = AutoCSer.Net.TcpServer.ReturnType.ClientException
                    });
                }
                set
                {
                    if (_isDisposed_ == 0)
                    {
                        TcpOpenSimpleServer._p3 _inputParameter_ = new TcpOpenSimpleServer._p3
                        {
                            index = index,

                            value = value,
                        };
                        AutoCSer.Net.TcpServer.ReturnType _returnType_ = _TcpClient_.Call(_c2, ref _inputParameter_);
                        if (_returnType_ == AutoCSer.Net.TcpServer.ReturnType.Success)
                        {
                            return;
                        }
                        throw new Exception(_returnType_.ToString());
                    }
                    throw new Exception(AutoCSer.Net.TcpServer.ReturnType.ClientException.ToString());
                }
            }
                /// <summary>
                /// @Method.XmlDocument/*IF:Attribute.IsExpired*/ [ Expired ]/*IF:Attribute.IsExpired*/
                /// </summary>
                #endregion IF Method.XmlDocument
                #region LOOP InputParameters
                #region PUSH MethodParameter
                #region IF XmlDocument
                /// <param name="@ParameterName">@XmlDocument</param>
                #endregion IF XmlDocument
                #endregion PUSH MethodParameter
                #endregion LOOP InputParameters
                #region IF InputParameterIndex
                public AutoCSer.Net.TcpServer.ReturnValue <@MethodReturnType.FullName> this[/*LOOP:InputParameters*//*PUSH:MethodParameter*/ @ParameterTypeRefName @ParameterJoinName /*PUSH:MethodParameter*//*LOOP:InputParameters*/]
                {
                    get
                    {
                        #region NAME GetProperty
                        #region IF Attribute.IsExpired
                        return(new AutoCSer.Net.TcpServer.ReturnValue <@MethodReturnType.FullName> {
                            Type = AutoCSer.Net.TcpServer.ReturnType.VersionExpired
                        });

                        #endregion IF Attribute.IsExpired
                        #region NOT Attribute.IsExpired
                        if (_isDisposed_ == 0)
                        {
                            #region IF InputParameterIndex
                            TcpOpenSimpleServer.@InputParameterTypeName _inputParameter_ = new TcpOpenSimpleServer.@InputParameterTypeName
                            {
                                #region LOOP InputParameters
                                /*PUSH:Parameter*/
                                @ParameterName /*PUSH:Parameter*/ = /*NOTE*/ (FullName)(object)/*NOTE*//*PUSH:MethodParameter*/ @ParameterName /*PUSH:MethodParameter*/,
                                #endregion LOOP InputParameters
                            };
                            #endregion IF InputParameterIndex
                            TcpOpenSimpleServer.@OutputParameterTypeName _outputParameter_ = default(TcpOpenSimpleServer.@OutputParameterTypeName);
                            AutoCSer.Net.TcpServer.ReturnType            _returnType_      = _TcpClient_.Get </*IF:InputParameterIndex*/ TcpOpenSimpleServer.@InputParameterTypeName, /*IF:InputParameterIndex*/ TcpOpenSimpleServer.@OutputParameterTypeName>(@MethodIdentityCommand /*IF:InputParameterIndex*/, ref _inputParameter_ /*IF:InputParameterIndex*/, ref _outputParameter_);
                            return(new AutoCSer.Net.TcpServer.ReturnValue <@MethodReturnType.FullName> {
                                Type = _returnType_, Value = _outputParameter_.Return
                            });
                        }
                        return(new AutoCSer.Net.TcpServer.ReturnValue <@MethodReturnType.FullName> {
                            Type = AutoCSer.Net.TcpServer.ReturnType.ClientException
                        });

                        #endregion NOT Attribute.IsExpired
                        #endregion NAME GetProperty
                    }
                    #region PUSH SetMethod
                    set
                    {
                        #region NAME SetProperty
                        #region IF Attribute.IsExpired
                        throw new Exception(AutoCSer.Net.TcpServer.ReturnType.VersionExpired.ToString());
                        #endregion IF Attribute.IsExpired
                        #region NOT Attribute.IsExpired
                        if (_isDisposed_ == 0)
                        {
                            TcpOpenSimpleServer.@InputParameterTypeName _inputParameter_ = new TcpOpenSimpleServer.@InputParameterTypeName
                            {
                                #region LOOP InputParameters
                                /*PUSH:Parameter*/
                                @ParameterName /*PUSH:Parameter*/ = /*NOTE*/ (FullName)(object)/*NOTE*//*PUSH:MethodParameter*/ @ParameterName /*PUSH:MethodParameter*/,
                                #endregion LOOP InputParameters
                            };
                            AutoCSer.Net.TcpServer.ReturnType _returnType_ = _TcpClient_.Call(@MethodIdentityCommand, ref _inputParameter_);
                            if (_returnType_ == AutoCSer.Net.TcpServer.ReturnType.Success)
                            {
                                return;
                            }
                            throw new Exception(_returnType_.ToString());
                        }
                        throw new Exception(AutoCSer.Net.TcpServer.ReturnType.ClientException.ToString());
                        #endregion NOT Attribute.IsExpired
                        #endregion NAME SetProperty
                    }
                    #endregion PUSH SetMethod
                }
Exemple #3
0
            public AutoCSer.Net.TcpServer.ReturnValue <int> this[int index]
            {
                get
                {
                    AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpOpenStreamServer._p1> _wait_ = AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpOpenStreamServer._p1> .Pop();

                    try
                    {
                        AutoCSer.Net.TcpOpenStreamServer.ClientSocketSender _socket_ = _TcpClient_.Sender;
                        if (_socket_ != null)
                        {
                            TcpOpenStreamServer._p2 _inputParameter_ = new TcpOpenStreamServer._p2
                            {
                                index = index,
                            };
                            AutoCSer.Net.TcpServer.ReturnValue <TcpOpenStreamServer._p1> _outputParameter_ = _socket_.WaitGet <TcpOpenStreamServer._p2, TcpOpenStreamServer._p1>(_c1, ref _wait_, ref _inputParameter_);
                            return(new AutoCSer.Net.TcpServer.ReturnValue <int> {
                                Type = _outputParameter_.Type, Value = _outputParameter_.Value.Return
                            });
                        }
                    }
                    finally
                    {
                        if (_wait_ != null)
                        {
                            AutoCSer.Net.TcpServer.AutoWaitReturnValue <TcpOpenStreamServer._p1> .PushNotNull(_wait_);
                        }
                    }
                    return(new AutoCSer.Net.TcpServer.ReturnValue <int> {
                        Type = AutoCSer.Net.TcpServer.ReturnType.ClientException
                    });
                }
                set
                {
                    AutoCSer.Net.TcpServer.AutoWaitReturnValue _wait_ = AutoCSer.Net.TcpServer.AutoWaitReturnValue.Pop();
                    try
                    {
                        AutoCSer.Net.TcpOpenStreamServer.ClientSocketSender _socket_ = _TcpClient_.Sender;
                        if (_socket_ != null)
                        {
                            TcpOpenStreamServer._p3 _inputParameter_ = new TcpOpenStreamServer._p3
                            {
                                index = index,

                                value = value,
                            };
                            AutoCSer.Net.TcpServer.ReturnType _returnType_ = _socket_.WaitCall(_c2, ref _wait_, ref _inputParameter_);
                            if (_returnType_ == AutoCSer.Net.TcpServer.ReturnType.Success)
                            {
                                return;
                            }
                            throw new Exception(_returnType_.ToString());
                        }
                    }
                    finally
                    {
                        if (_wait_ != null)
                        {
                            AutoCSer.Net.TcpServer.AutoWaitReturnValue.PushNotNull(_wait_);
                        }
                    }
                    throw new Exception(AutoCSer.Net.TcpServer.ReturnType.ClientException.ToString());
                }
            }