Files
SzmediTools/Szmedi.RvKits/RvScript/CodeActionsConverter.cs
2025-09-16 16:06:41 +08:00

29 lines
772 B
C#

using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;
using Microsoft.CodeAnalysis.CodeActions;
using RoslynPad.Roslyn.CodeActions;
namespace Szmedi.RvKits.RvScript
{
internal sealed class CodeActionsConverter : MarkupExtension, IValueConverter
{
public override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return ((CodeAction)value).GetCodeActions();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}