Skip to content

Commit

Permalink
Periscope updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitz committed Apr 20, 2021
1 parent 7063212 commit dec43e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Debuggee/Periscope.Debuggee
1 change: 1 addition & 0 deletions Serialization/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public override ConfigDiffStates Diff(Config baseline) =>
BclIds.SetEquals(baseline.BclIds) && TzdbIds.SetEquals(baseline.TzdbIds) ?
ConfigDiffStates.NoAction :
ConfigDiffStates.NeedsWrite;
public DateTime? Value { get; set; } // workaround for https://github.com/zspitz/DateTimeVisualizer/issues/7
#else
public class Config {
#endif
Expand Down
8 changes: 3 additions & 5 deletions UI/Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ public override object Convert(object[] values, Type targetType, object paramete
}

public class UpperConverter : ReadOnlyConverterBase {
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
if (value is null) { return UnsetValue; }
return value.ToString().ToUpper();
}
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) =>
value?.ToString()?.ToUpper() ?? UnsetValue;
}

public class FilterStateConverter : ReadOnlyConverterBase {
Expand All @@ -81,7 +79,7 @@ public override object Convert(object value, Type targetType, object parameter,
return filterState == DescendantMatched ? Brushes.Gray : UnsetValue;
} else if (targetType == typeof(Visibility)) {
if (filterState == null) { return UnsetValue; }
return filterState.In(Matched, DescendantMatched) ? Visibility.Visible : Visibility.Collapsed;
return filterState.Value.In(Matched, DescendantMatched) ? Visibility.Visible : Visibility.Collapsed;
} else if (targetType == typeof(FontWeight)) {
return filterState == Matched ? FontWeights.Bold : UnsetValue;
}
Expand Down
2 changes: 1 addition & 1 deletion Visualizer/Periscope
3 changes: 2 additions & 1 deletion _testNoRef/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System;
using System.Diagnostics;

namespace _testNoRef {
class Program {
static void Main(string[] args) {
var dte = new DateTime(2001, 1, 1, 1, 1, 1, DateTimeKind.Unspecified);
Console.ReadKey(true);
Debugger.Break();
}
}
}

0 comments on commit dec43e8

Please sign in to comment.