コード例 #1
0
 /// <summary>
 /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
 /// </returns>
 public override String ToString()
 {
     return("propNum: " + PropertyNumber
            + ", RAW: 0x" + HexDump.ToHex(Id)
            + ", propName: " + EscherProperties.GetPropertyName(PropertyNumber)
            + ", complex: " + IsComplex
            + ", blipId: " + IsBlipId
            + ", value: " + propertyValue + " (0x" + HexDump.ToHex(propertyValue) + ")");
 }
コード例 #2
0
        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override String ToString()
        {
            String dataStr;

            using (MemoryStream b = new MemoryStream())
            {
                try
                {
                    HexDump.Dump(this.complexData, 0, b, 0);
                    dataStr = b.ToString();
                }
                catch (Exception e)
                {
                    dataStr = e.ToString();
                }
            }
            return("propNum: " + PropertyNumber
                   + ", propName: " + EscherProperties.GetPropertyName(PropertyNumber)
                   + ", complex: " + IsComplex
                   + ", blipId: " + IsBlipId
                   + ", data: " + Environment.NewLine + dataStr);
        }
コード例 #3
0
        /// <summary>
        /// Retrieves the string representation for this property.
        /// </summary>
        /// <returns></returns>
        public override String ToString()
        {
            String nl = Environment.NewLine;

            StringBuilder results = new StringBuilder();

            results.Append("    {EscherArrayProperty:" + nl);
            results.Append("     Num Elements: " + NumberOfElementsInArray + nl);
            results.Append("     Num Elements In Memory: " + NumberOfElementsInMemory + nl);
            results.Append("     Size of elements: " + SizeOfElements + nl);
            for (int i = 0; i < NumberOfElementsInArray; i++)
            {
                results.Append("     Element " + i + ": " + HexDump.ToHex(GetElement(i)) + nl);
            }
            results.Append("}" + nl);

            return("propNum: " + PropertyNumber
                   + ", propName: " + EscherProperties.GetPropertyName(PropertyNumber)
                   + ", complex: " + IsComplex
                   + ", blipId: " + IsBlipId
                   + ", data: " + nl + results.ToString());
        }