Use SymbolCache
This commit is contained in:
@@ -18,6 +18,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Command;
|
||||
using TradeBlotter.Model;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -201,7 +202,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
private void HandleSelectedWatchList()
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else
|
||||
{
|
||||
symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
|
||||
@@ -15,6 +15,7 @@ using MarketData.MarketDataModel;
|
||||
using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Command;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -107,7 +108,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ using TradeBlotter.Model;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -247,7 +248,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
private void HandleSelectedWatchList()
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else
|
||||
{
|
||||
symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
|
||||
@@ -15,6 +15,7 @@ using TradeBlotter.Command;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.UIUtils;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -162,7 +163,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Command;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -145,7 +146,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Command;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -117,7 +118,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -416,7 +416,8 @@ namespace TradeBlotter.ViewModels
|
||||
{
|
||||
semaphorePool[Tasks.SelectedWatchList].WaitOne();
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, "OnOptionsViewModelPropertyChanged:SelectedWatchList");
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
symbols = OptionsDA.GetOptionsSymbolIn(symbols);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
|
||||
@@ -17,6 +17,7 @@ using MarketData.MarketDataModel;
|
||||
using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Command;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -158,7 +159,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Command;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -120,7 +121,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Command;
|
||||
using TradeBlotter.Model;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -96,7 +97,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using MarketData.DataAccess;
|
||||
using MarketData.MarketDataModel;
|
||||
using MarketData.Utils;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -101,7 +102,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ using TradeBlotter.Command;
|
||||
using TradeBlotter.Model;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.UIUtils;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -235,7 +236,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
private void HandleSelectedWatchList()
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else
|
||||
{
|
||||
symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
|
||||
@@ -16,6 +16,7 @@ using TradeBlotter.DataAccess;
|
||||
using TradeBlotter.Model;
|
||||
using TradeBlotter.Command;
|
||||
using Microsoft.Research.DynamicDataDisplay.DataSources;
|
||||
using TradeBlotter.Cache;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
@@ -114,7 +115,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
}
|
||||
|
||||
@@ -85,7 +85,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
else if (eventArgs.PropertyName.Equals("SelectedWatchList"))
|
||||
{
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
// if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = PricingDA.GetSymbols();
|
||||
if (selectedWatchList.Equals(Constants.CONST_ALL)) symbols = SymbolCache.GetInstance().GetSymbols();
|
||||
else symbols = WatchListDA.GetWatchList(selectedWatchList);
|
||||
base.OnPropertyChanged("Symbols");
|
||||
selectedSymbolIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user