You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
717 B
31 lines
717 B
#nullable enable
|
|
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace Jellyfin.Api.Helpers
|
|
{
|
|
/// <summary>
|
|
/// Request Helpers.
|
|
/// </summary>
|
|
public static class RequestHelpers
|
|
{
|
|
/// <summary>
|
|
/// Get Guid array from string.
|
|
/// </summary>
|
|
/// <param name="value">String value.</param>
|
|
/// <returns>Guid array.</returns>
|
|
public static Guid[] GetGuids(string? value)
|
|
{
|
|
if (value == null)
|
|
{
|
|
return Array.Empty<Guid>();
|
|
}
|
|
|
|
return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
|
.Select(i => new Guid(i))
|
|
.ToArray();
|
|
}
|
|
}
|
|
}
|