diff --git a/src/client/spark/core/GlobalExtensions/GlobalExtensions.cs b/src/client/spark/core/GlobalExtensions/GlobalExtensions.cs index 9c89c3d8b..fdd0f0c5b 100644 --- a/src/client/spark/core/GlobalExtensions/GlobalExtensions.cs +++ b/src/client/spark/core/GlobalExtensions/GlobalExtensions.cs @@ -400,17 +400,21 @@ namespace mbts return -1; } - #region Curry - public static Func> curry(Func fn) { - return a => b => fn(a, b); + public static void ignore(this Task t) { } + + public static Google.Protobuf.WellKnownTypes.Timestamp ToGoogleTime(this DateTime self) { + return Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(self); } - public static Func>> curry(Func fn) { - return a => b => c => fn(a, b, c); + + public static bool TryGetValue(this ILookup self, TKey key, out IEnumerable value) { + bool has_value = self.Contains(key); + if (has_value) { + value = self[key]; + } + else { value = Enumerable.Empty(); } + return has_value; } - public static Func>>> curry(this Func fn) { - return a => b => c => d => fn(a, b, c, d); - } - #endregion + } } diff --git a/src/client/spark/mspark/Core/SparkTags.cs b/src/client/spark/mspark/Core/SparkTags.cs index fa75b6259..e99fcd5dc 100644 --- a/src/client/spark/mspark/Core/SparkTags.cs +++ b/src/client/spark/mspark/Core/SparkTags.cs @@ -7,10 +7,9 @@ namespace mbts.spark { private class SparkTag : ITag { private readonly string Name; public SparkTag(string name) { Name = name; } } #region Core Data - public static ITag ExchangeSecuritiesTag { get; } = new SparkTag("ExchangeSecuritiesTag"); public static ITag> SecuritiesTag { get; } = new SparkTag>("Securities"); public static ITag SyntheticSecuritiesTag { get; } = new SparkTag("SyntheticSecuritiesTag"); - public static ITag OrderBookTag = new SparkTag("OrderBookTag"); + public static ITag OrderBookTag { get; } = new SparkTag("OrderBookTag"); public static ITag PositionsTag { get; } = new SparkTag(nameof(PositionsTag)); #endregion diff --git a/src/client/spark/mspark/Shell/MarketModule.cs b/src/client/spark/mspark/Shell/MarketModule.cs index d37de5341..e5571436f 100644 --- a/src/client/spark/mspark/Shell/MarketModule.cs +++ b/src/client/spark/mspark/Shell/MarketModule.cs @@ -178,7 +178,7 @@ namespace mbts.spark } else show_synthetic_editor(msg.data.CloneToMutable(), ses.ExecutionStrategy); } private void show_synthetic_editor_warning(string warn_msg) { - BTSMessageBox.Show(warn_msg, "Synthetic Strategy", MessageBoxButton.OK, MessageBoxImage.Exclamation, true, false, true); + BTSMessageBox.Show(warn_msg, "Synthetic Strategy", BTSMessageBoxButtons.OK, MessageBoxImage.Exclamation, true, false, true); } private void show_synthetic_editor(Security synthetic, ExecutionStrategy strategy) { var dialog = new SyntheticEditorDialog { DataContext = new SyntheticEditorVM(_bus, synthetic, strategy) }.Show(-200, -300, true); diff --git a/src/client/spark/uicore/Images/Vector/Icons.xaml b/src/client/spark/uicore/Images/Vector/Icons.xaml index 347cfe9be..58dec4d7e 100644 --- a/src/client/spark/uicore/Images/Vector/Icons.xaml +++ b/src/client/spark/uicore/Images/Vector/Icons.xaml @@ -454,6 +454,18 @@ M0,0L63.999001,0 63.999001,48.792999 0,48.792999z"> + + + + + + + + + + +