Refactor Api-Client
Add Exceptionhandler, AlertService JSON-Converter AppSettings via DI Reformat Code
This commit is contained in:
@@ -2,20 +2,21 @@
|
||||
|
||||
/// Gib true zurück, wenn die Collection Werte enthält
|
||||
namespace Jugenddienst_Stunden.Converter {
|
||||
internal class CollectionVisibilityConverter : IValueConverter {
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
||||
if (value is IEnumerable<object> collection) {
|
||||
if ((string)parameter == "Invert")
|
||||
return !collection.Any();
|
||||
return collection.Any();
|
||||
}
|
||||
if ((string)parameter == "Invert")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
internal class CollectionVisibilityConverter : IValueConverter {
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
||||
if (value is IEnumerable<object> collection) {
|
||||
if ((string)parameter == "Invert")
|
||||
return !collection.Any();
|
||||
return collection.Any();
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((string)parameter == "Invert")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user