Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/ValueStoreConverter.cs @ 13398

Last change on this file since 13398 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 688 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Data;
6using System.Globalization;
7
8namespace Microsoft.Research.DynamicDataDisplay
9{
10  public sealed class ValueStoreConverter : IValueConverter
11  {
12
13    #region IValueConverter Members
14
15    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16    {
17      ValueStore store = (ValueStore)value;
18      string key = (string)parameter;
19
20      return store[key];
21    }
22
23    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24    {
25      throw new NotSupportedException();
26    }
27
28    #endregion
29  }
30}
Note: See TracBrowser for help on using the repository browser.