#nullable enable
using System;
using System.Linq;
namespace Jellyfin.Api.Helpers
{
///
/// Request Helpers.
///
public static class RequestHelpers
{
///
/// Get Guid array from string.
///
/// String value.
/// Guid array.
public static Guid[] GetGuids(string? value)
{
if (value == null)
{
return Array.Empty();
}
return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select(i => new Guid(i))
.ToArray();
}
}
}