mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
fix SA1503 for one line if statements
This commit is contained in:
@@ -45,11 +45,21 @@ namespace Rssdp.Infrastructure
|
||||
/// <param name="message">Either a <see cref="HttpResponseMessage"/> or <see cref="HttpRequestMessage"/> to assign the parsed values to.</param>
|
||||
protected override void ParseStatusLine(string data, HttpRequestMessage message)
|
||||
{
|
||||
if (data == null) throw new ArgumentNullException(nameof(data));
|
||||
if (message == null) throw new ArgumentNullException(nameof(message));
|
||||
if (data == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(data));
|
||||
}
|
||||
|
||||
if (message == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(message));
|
||||
}
|
||||
|
||||
var parts = data.Split(' ');
|
||||
if (parts.Length < 2) throw new ArgumentException("Status line is invalid. Insufficient status parts.", nameof(data));
|
||||
if (parts.Length < 2)
|
||||
{
|
||||
throw new ArgumentException("Status line is invalid. Insufficient status parts.", nameof(data));
|
||||
}
|
||||
|
||||
message.Method = new HttpMethod(parts[0].Trim());
|
||||
Uri requestUri;
|
||||
|
||||
Reference in New Issue
Block a user