Пример #1
0
        public string ToTreeString(int depth = 0)
        {
            string res = "";

            for (int i = 0; i < depth; i++)
            {
                res += "  ";
            }
            res += "{" + TagType.GetNotchName() + "}";

            if (Name != null)
            {
                res += " " + Name + ":";
            }
            res += Environment.NewLine;

            foreach (sbyte b in Values)
            {
                for (int i = 0; i < depth + 1; i++)
                {
                    res += "  ";
                }
                res += b.ToString("X2") + Environment.NewLine;
            }

            return(res.TrimEnd('\n'));
        }
Пример #2
0
        public override string ToString()
        {
            string res = "{" + TagType.GetNotchName() + "} ";

            if (Name != null)
            {
                res += Name + ": ";
            }
            res += Values.Count.ToString() + " Bytes";

            return(res);
        }
Пример #3
0
        public override string ToString()
        {
            string res = "{" + TagType.GetNotchName() + "} ";

            if (Name != null)
            {
                res += Name + ": ";
            }
            res += Children.Count.ToString() + " Items";

            return(res);
        }
Пример #4
0
        public string ToTreeString(int depth = 0)
        {
            string res = "";

            for (int i = 0; i < depth; i++)
            {
                res += "  ";
            }
            res += "{" + TagType.GetNotchName() + "}";

            if (Name != null)
            {
                res += " " + Name + ":";
            }
            res += Environment.NewLine;

            foreach (INamedBinaryTag tag in Children)
            {
                res += tag.ToTreeString(depth + 1) + Environment.NewLine;
            }

            return(res.TrimEnd('\n'));
        }