Пример #1
0
                /// <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
                /*AT:IsInternalClient*/
                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
                            TcpInternalSimpleServer.@InputParameterTypeName _inputParameter_ = new TcpInternalSimpleServer.@InputParameterTypeName
                            {
                                #region LOOP InputParameters
                                /*PUSH:Parameter*/
                                @ParameterName /*PUSH:Parameter*/ = /*NOTE*/ (FullName)(object)/*NOTE*//*PUSH:MethodParameter*/ @ParameterName /*PUSH:MethodParameter*/,
                                #endregion LOOP InputParameters
                            };
                            #endregion IF InputParameterIndex
                            TcpInternalSimpleServer.@OutputParameterTypeName _outputParameter_ = default(TcpInternalSimpleServer.@OutputParameterTypeName);
                            AutoCSer.Net.TcpServer.ReturnType _returnType_ = _TcpClient_.Get </*IF:InputParameterIndex*/ TcpInternalSimpleServer.@InputParameterTypeName, /*IF:InputParameterIndex*/ TcpInternalSimpleServer.@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)
                        {
                            TcpInternalSimpleServer.@InputParameterTypeName _inputParameter_ = new TcpInternalSimpleServer.@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
                }
Пример #2
0
                /// <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 Method.ReturnXmlDocument
                /// <returns>@Method.ReturnXmlDocument</returns>
                #endregion IF Method.ReturnXmlDocument
                /*AT:IsInternalClient*/
                AutoCSer.Net.TcpServer.ReturnValue /*IF:MethodIsReturn*/ <@MethodReturnType.FullName> /*IF:MethodIsReturn*/ /*PUSH:Method*/ @MethodName/*PUSH:Method*/ (/*LOOP:InputParameters*//*PUSH:MethodParameter*/ @ParameterTypeRefName @ParameterJoinName /*PUSH:MethodParameter*//*LOOP:InputParameters*/)
                {
                    #region IF Attribute.IsExpired
                    #region LOOP InputParameters
                    #region PUSH MethodParameter
                    #region IF IsOut
                    @ParameterName = default(@ParameterType.FullName);
                    #endregion IF IsOut
                    #endregion PUSH MethodParameter
                    #endregion LOOP InputParameters
                    return(new AutoCSer.Net.TcpServer.ReturnValue /*IF:MethodIsReturn*/ <@MethodReturnType.FullName> /*IF:MethodIsReturn*/ {
                        Type = AutoCSer.Net.TcpServer.ReturnType.VersionExpired
                    });

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

                        #endregion IF OutputParameterIndex
                        #region NOT OutputParameterIndex
                        return(new AutoCSer.Net.TcpServer.ReturnValue /*IF:MethodIsReturn*/ <@MethodReturnType.FullName> /*IF:MethodIsReturn*/ {
                            Type = _TcpClient_.Call(@MethodIdentityCommand /*IF:InputParameterIndex*/, ref _inputParameter_ /*IF:InputParameterIndex*/)
                        });

                        #endregion NOT OutputParameterIndex
                    }
                    #region LOOP InputParameters
                    #region PUSH MethodParameter
                    #region IF IsOut
                    @ParameterName = default(@ParameterType.FullName);
                    #endregion IF IsOut
                    #endregion PUSH MethodParameter
                    #endregion LOOP InputParameters
                    return(new AutoCSer.Net.TcpServer.ReturnValue /*IF:MethodIsReturn*/ <@MethodReturnType.FullName> /*IF:MethodIsReturn*/ {
                        Type = AutoCSer.Net.TcpServer.ReturnType.ClientException
                    });

                    #endregion NOT Attribute.IsExpired
                }