添加项目文件。
This commit is contained in:
28
Szmedi.AIScriptRunner/RvScript/CodeActionsConverter.cs
Normal file
28
Szmedi.AIScriptRunner/RvScript/CodeActionsConverter.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
using Microsoft.CodeAnalysis.CodeActions;
|
||||
|
||||
using RoslynPad.Roslyn.CodeActions;
|
||||
|
||||
namespace Szmedi.AIScriptRunner.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user