ToString() private method

private ToString ( int code ) : string
code int
return string
Ejemplo n.º 1
0
 private void ThrowTypeException(Type type, byte header)
 {
     throw new MessageTypeException(
               String.Format(
                   CultureInfo.CurrentCulture,
                   this._source.CanSeek
                                 ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}."
                                 : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.",
                   type,
                   header,
                   MessagePackCode.ToString(header),
                   this._offset
                   )
               );
 }
Ejemplo n.º 2
0
        private void ThrowTypeException(Type type, byte header)
        {
            long offsetOrPosition;
            var  isRealOffset = this.GetPreviousPosition(out offsetOrPosition);

            throw new MessageTypeException(
                      String.Format(
                          CultureInfo.CurrentCulture,
                          isRealOffset
                                        ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}."
                                        : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.",
                          type,
                          header,
                          MessagePackCode.ToString(header),
                          offsetOrPosition
                          )
                      );
        }