Files
Needlework.Net/Needlework.Net.Desktop/ViewModels/PropertyEnumViewModel.cs
2024-08-15 17:06:17 -05:00

17 lines
470 B
C#

using Microsoft.OpenApi.Any;
using System.Collections.Generic;
using System.Linq;
namespace Needlework.Net.Desktop.ViewModels
{
public class PropertyEnumViewModel
{
public string Type { get; } = "Enum";
public string Values { get; }
public PropertyEnumViewModel(IList<IOpenApiAny> enumValue)
{
Values = $"[{string.Join(", ", enumValue.Select(x => $"\"{((OpenApiString)x).Value}\"").ToList())}]";
}
}
}