We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test] public void IsPatternBool() { var testCode = @" namespace RoslynSandbox { using System; using System.Globalization; using System.Windows; using System.Windows.Data; using System.Windows.Markup; [MarkupExtensionReturnType(typeof(BooleanToVisibilityConverterExtension))] [ValueConversion(typeof(bool?), typeof(Visibility))] public class BooleanToVisibilityConverterExtension : MarkupExtension, IValueConverter { public Visibility WhenTrue { get; set; } public Visibility WhenFalse { get; set; } public Visibility WhenNull { get; set; } public override object ProvideValue(IServiceProvider serviceProvider) => this; public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is bool isTrue) { return isTrue ? this.WhenTrue : this.WhenFalse; } return this.WhenNull; } object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }"; AnalyzerAssert.Valid(Analyzer, testCode); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: