internal bool TryParseMemInfoValue()

in src/ServiceProfiler.EventPipe.Otel/Microsoft.ApplicationInsights.Profiler.Shared/Orchestrations/MetricsProviders/MemInfoItemParser.cs [31:47]


    internal bool TryParseMemInfoValue(string input, out ulong value, out string? unit)
    {
        input = input.Trim();
        value = default;
        unit = default;
        string[] tokens = input.Split([' '], StringSplitOptions.RemoveEmptyEntries);
        if (tokens?.Length == 2)
        {
            if (ulong.TryParse(tokens[0], out value))
            {
                unit = tokens[1].Trim();
                return true;
            }
        }

        return false;
    }