private void VerifyMessageIsTransmitable()

in src/ServiceProfiler.EventPipe.Otel/Microsoft.ApplicationInsights.Profiler.Shared/Services/IPC/DuplexNamedPipeService.cs [236:247]


    private void VerifyMessageIsTransmitable(string message)
    {
        if (string.IsNullOrEmpty(message))
        {
            throw new UnsupportedPayloadContentException("Can't transfer emtpy message over the namedpipe.");
        }

        if (message.Contains(Environment.NewLine))
        {
            throw new UnsupportedPayloadContentException("Do not support newline in message over the namedpipe.");
        }
    }