Exemplo n.º 1
0
        public LineMatchProxy(LineMatch match, IThemeProvider themeProvider)
        {
            _match = match;
            IconKind = _match.Icon.ParseEnum<PackIconKind>().ValueOr(() => PackIconKind.ArrowRightBold);

            var defaultHue = themeProvider.Accent.Select(hue => match.Hue == Hue.NotSpecified ? hue : _match.Hue);

            Foreground = defaultHue.Select(h => h.ForegroundBrush).ForBinding();
            Background = defaultHue.Select(h => h.BackgroundBrush).ForBinding();

            _cleanUp = new CompositeDisposable(Foreground, Background);
        }
Exemplo n.º 2
0
 public LineMatchCollection(LineMatch[] matches)
 {
     Matches    = matches;
     FirstMatch = matches.FirstOrDefault();
 }
 public LineMatchCollection(LineMatch[] matches)
 {
     Matches = matches;
     FirstMatch = matches.FirstOrDefault();
 }