コード例 #1
0
ファイル: ResponseContent.cs プロジェクト: isoundy000/wzry-1
 public TdrError.ErrorType visualize(ref TdrVisualBuf destBuf, int indent, char separator)
 {
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     object[]           args = new object[] { this.dwDataLen };
     type = TdrBufUtil.printVariable(ref destBuf, indent, separator, "[dwDataLen]", "{0:d}", args);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         if (0x100000 < this.dwDataLen)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         type = TdrBufUtil.printArray(ref destBuf, indent, separator, "[szData]", (long)this.dwDataLen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         for (int i = 0; i < this.dwDataLen; i++)
         {
             object[] objArray2 = new object[] { this.szData[i] };
             type = destBuf.sprintf("0x{0:x2}", objArray2);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         object[] objArray3 = new object[] { separator };
         type = destBuf.sprintf("{0}", objArray3);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }
コード例 #2
0
        public TdrError.ErrorType visualize(ref TdrVisualBuf destBuf, int indent, char separator)
        {
            TdrError.ErrorType errorType = TdrBufUtil.printVariable(ref destBuf, indent, separator, "[dwDataLen]", "{0:d}", new object[]
            {
                this.dwDataLen
            });
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (1048576u < this.dwDataLen)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            errorType = TdrBufUtil.printArray(ref destBuf, indent, separator, "[szData]", (long)((ulong)this.dwDataLen));
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = 0;

            while ((long)num < (long)((ulong)this.dwDataLen))
            {
                errorType = destBuf.sprintf("0x{0:x2}", new object[]
                {
                    this.szData[num]
                });
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
                num++;
            }
            errorType = destBuf.sprintf("{0}", new object[]
            {
                separator
            });
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }