Record
public record LazyParseEntry : System.IEquatable<Moka.Blazor.Json.Models.LazyParseEntry>

Namespace: Moka.Blazor.Json.Models

A single parse operation entry for diagnostics.

Inheritance

Implements: System.IEquatable<Moka.Blazor.Json.Models.LazyParseEntry>

Constructors

NameDescription
LazyParseEntry(…) A single parse operation entry for diagnostics.

LazyParseEntry(string Path, long Bytes, TimeSpan Duration)

LazyParseEntry.LazyParseEntry(string Path, long Bytes, TimeSpan Duration)

A single parse operation entry for diagnostics.

Properties

NameDescription
Bytes
Duration
Path

Methods

NameDescription
ToString() override
Type Relationships
classDiagram
                    style LazyParseEntry fill:#f9f,stroke:#333,stroke-width:2px
                    LazyParseEntry ..|> LazyParseEntry~ : implements
                
View Source
/// <summary>A single parse operation entry for diagnostics.</summary>
public sealed record LazyParseEntry(string Path, long Bytes, TimeSpan Duration)
{
    /// <inheritdoc/>
    public override string ToString()
    {
        string size = Bytes switch
        {
            < 1024 => $"{Bytes} B",
            < 1024 * 1024 => $"{Bytes / 1024.0:F1} KB",
            _ => $"{Bytes / (1024.0 * 1024):F1} MB"};
        return $"{Path} ({size}, {Duration.TotalMilliseconds:F1}ms)";
    }
}
Was this page helpful?