Пример #1
0
 protected void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (null != ParentOffset)
         {
             ParentOffset = null;
         }
         if (HasChildList())
         {
             ChildOffsets.Dispose();
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Constructs object values into a serialized string
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(Position);
            if (EndPosition > 0)
            {
                sb.Append(Delimiters.NUMBER_RANGE).Append(EndPosition);
            }
            sb.Append(Delimiters.NUMBER_TO_TYPE).Append(this.OffsetKey);
            if (this.HasChildList())
            {
                sb.Append(Delimiters.CHILDLIST_START);

                ChildOffsets.WriteToString(sb);

                sb.Append(Delimiters.CHILDLIST_END);
            }

            return(sb.ToString());
        }