Просмотр исходного кода

Fixed Matcher-type converters and Added BooleanToBooleanConverter to invert boolean values if required

Frank van den Bos 1 год назад
Родитель
Сommit
9e8af5932e

+ 13 - 0
InABox.Mobile/InABox.Mobile.Shared/Converters/BooleanToBooleanConverter.cs

@@ -0,0 +1,13 @@
+namespace InABox.Mobile
+{
+    public class BooleanToBooleanConverter: AbstractConverter<bool,bool>
+    {
+        
+        public bool Invert { get; set; }
+
+        protected override bool Convert(bool value, object? parameter = null)
+        {
+            return Invert ? !value : value; 
+        }
+    }
+}

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Converters/MultiConverters/Matcher/AbstractMatcher.cs

@@ -1,7 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 
-namespace InABox.Mobile.Any
+namespace InABox.Mobile
 {
 
     public enum MatchComparison

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Converters/MultiConverters/Matcher/BooleanMatcher.cs

@@ -1,4 +1,4 @@
-namespace InABox.Mobile.Any
+namespace InABox.Mobile
 {
     public class BooleanMatcher : AbstractMatcher<bool> { }
 }

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Converters/MultiConverters/Matcher/DoubleMatcher.cs

@@ -1,4 +1,4 @@
-namespace InABox.Mobile.Any
+namespace InABox.Mobile
 {
     public class DoubleMatcher : AbstractMatcher<double> { }
 }

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Converters/MultiConverters/Matcher/GuidMatcher.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace InABox.Mobile.Any
+namespace InABox.Mobile
 {
     public class GuidMatcher : AbstractMatcher<Guid> { }
 }

+ 1 - 1
InABox.Mobile/InABox.Mobile.Shared/Converters/MultiConverters/Matcher/IntegerMatcher.cs

@@ -1,4 +1,4 @@
-namespace InABox.Mobile.Any
+namespace InABox.Mobile
 {
     public class IntegerMatcher : AbstractMatcher<int> { }
 }