Example #1
0
        /// <summary>
        /// Reeturns a string representation of <paramref name="count"/> blocks having indices starting from <paramref name="fromBlock"/>.
        /// </summary>
        public string ToDisplayString(int fromBlock, int count)
        {
            var sb = StringBuilderPool.Acquire();

            for (int i = Math.Max(0, fromBlock), c = Math.Min(fromBlock + count, blockDb.BlockCount); i < c; ++i)
            {
                sb.AppendLine(JsonConvert.SerializeObject(blockDb.GetBlock(i), Formatting.Indented));
            }
            return(StringBuilderPool.GetStringAndRelease(sb));
        }