示例#1
0
 public static TdrError.ErrorType printVariable(ref TdrVisualBuf buf, int indent, char sep, string variable, int arrIdx, bool withSep)
 {
     TdrError.ErrorType errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         if (withSep)
         {
             errorType = buf.sprintf("{0}[{1:d}]{2}", new object[]
             {
                 variable,
                 arrIdx,
                 sep
             });
         }
         else
         {
             errorType = buf.sprintf("{0}[{1:d}]: ", new object[]
             {
                 variable,
                 arrIdx
             });
         }
     }
     return(errorType);
 }
示例#2
0
        public static TdrError.ErrorType printString(ref TdrVisualBuf buf, int indent, char sep, string variable, int arrIdx, byte[] bStr)
        {
            TdrError.ErrorType errorType = TdrError.ErrorType.TDR_NO_ERROR;
            string             text      = string.Empty;
            int num = TdrTypeUtil.cstrlen(bStr);

            if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
            {
                errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
            }
            if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
            {
                text = Encoding.get_ASCII().GetString(bStr, 0, num);
            }
            if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
            {
                errorType = buf.sprintf("{0}[{1:d}]: {2}{3}", new object[]
                {
                    variable,
                    arrIdx,
                    text,
                    sep
                });
            }
            return(errorType);
        }
示例#3
0
 public static TdrError.ErrorType printArray(ref TdrVisualBuf buf, int indent, char sep, string variable, long count)
 {
     TdrError.ErrorType errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}[0:{1:d}]: ", new object[]
         {
             variable,
             count
         });
     }
     return(errorType);
 }
示例#4
0
 public static TdrError.ErrorType printVariable(ref TdrVisualBuf buf, int indent, char sep, string variable, string format, params object[] args)
 {
     TdrError.ErrorType errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}: ", new object[]
         {
             variable
         });
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf(format, args);
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}", new object[]
         {
             sep
         });
     }
     return(errorType);
 }
示例#5
0
 public static TdrError.ErrorType printTdrDateTime(ref TdrVisualBuf buf, int indent, char sep, string variable, ulong datetime)
 {
     TdrError.ErrorType errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}: ", new object[]
         {
             variable
         });
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = TdrTypeUtil.tdrDateTime2Str(ref buf, datetime);
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}", new object[]
         {
             sep
         });
     }
     return(errorType);
 }
示例#6
0
 public static TdrError.ErrorType printTdrTime(ref TdrVisualBuf buf, int indent, char sep, string variable, int arrIdx, uint time)
 {
     TdrError.ErrorType errorType = TdrBufUtil.printMultiStr(ref buf, "    ", indent);
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}[{1:d}]: ", new object[]
         {
             variable,
             arrIdx
         });
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = TdrTypeUtil.tdrTime2Str(ref buf, time);
     }
     if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
     {
         errorType = buf.sprintf("{0}", new object[]
         {
             sep
         });
     }
     return(errorType);
 }