public static string HtmlHeader() { var columnNames = new List <string>() { "Resort", "Snowfall (in)" }; StringBuilder builder = new StringBuilder(); builder.Append("<h2>T + 24 Hr Snowfall</h2>"); builder.AppendLine(); builder.Append("<h3>"); builder.Append(RangeStartTime.ToString("d")); builder.Append(" - "); builder.Append(RangeStopTime.ToString("d")); builder.Append("</h3>"); builder.AppendLine(); builder.Append("<table style=\"width:100%\">"); builder.AppendLine(); builder.Append("<tr>"); builder.AppendLine(); foreach (var name in columnNames) { builder.AppendFormat("<th>{0}</th>", name); builder.AppendLine(); } builder.Append("</tr>"); builder.AppendLine(); return(builder.ToString()); }
/// <summary> /// Returns a formatted string with information about this buffer. /// </summary> /// <returns>The formatted string.</returns> internal string Debug() { lock (SyncLock) { return($"{MediaType,-12} - CAP: {Capacity,10} | FRE: {PoolBlocks.Count,7} | " + $"USD: {PlaybackBlocks.Count,4} | RNG: {RangeStartTime.Format(),8} to {RangeEndTime.Format().Trim()}"); } }
/// <summary> /// Returns a formatted string with information about this buffer /// </summary> /// <returns></returns> internal string Debug() { lock (SyncRoot) return($"{MediaType,-12} - CAP: {Capacity,10} | FRE: {PoolBlocks.Count,7} | USD: {PlaybackBlocks.Count,4} | TM: {RangeStartTime.Debug(),8} to {RangeEndTime.Debug().Trim()}"); }