Merged with master

This commit is contained in:
Pedro Pinto committed 2019-03-04 08:55:06 -05:00
commit cc381d605c
3 files changed
+16 -3

No files matched your search

+3
View File
@@ -4,6 +4,9 @@ weight = 3
sort_by = "weight"
insert_anchor_links = "right"
+++
## 1.5.3
- Avoided logging when warming up cache
## 1.5.2
- Added better logging to AlgoDefinitionService
@@ -25,20 +25,28 @@ namespace bts.shell {
}
static class NotificationServiceExtensions {
/// TODO: remove this extension and force callers to use the appropriate 'link' method in <see cref="INotificationService"/> (it is smelly, and is NOT ACTUALLY STRONGLY TYPED)
public static IDisposable link<T>(this INotificationService notification_service, IPredicate<T> predicate, SoundNotification sound) {
if (predicate is IPredicate<OrderTuple> orp)
return notification_service.link_to_order(orp, sound);
if (predicate is IPredicate<OrderSecurity> osp) {
// Note: watch out for implicit types as generic type arguments (although OrderSecurity can be implicitly cast to OrderTuple, IPredicate<OrderSecurity> CANNOT be implicitly cast to IPredicate<OrderTuple>)
return notification_service.link_to_order(PredicateBuilder.create<OrderTuple>(ot => osp.trigger(new OrderSecurity(ot.Item1, ot.Item2))), sound);
}
if (predicate is IPredicate<Activity> ap)
return notification_service.link_to_activity(ap, sound);
throw new ArgumentException(nameof(predicate));
Log.Ui.error($"Unable to activate sound-trigger (unrecognized predicate type '{typeof(T)}').");
return Disposable.empty;
}
/// TODO: remove this extension and force callers to use the appropriate 'link' method in <see cref="INotificationService"/> (it is smelly, and is NOT ACTUALLY STRONGLY TYPED)
public static IDisposable link<T>(this INotificationService notification_service, INotificationPredicate<T> toast_notification_predicate) {
if (toast_notification_predicate is INotificationPredicate<OrderTuple> orp)
return notification_service.link_to_order(orp);
if (toast_notification_predicate is INotificationPredicate<Activity> ap)
return notification_service.link_to_activity(ap);
throw new ArgumentException(nameof(toast_notification_predicate));
Log.Ui.error($"Unable to activate toast-notification-trigger (unrecognized predicate type '{typeof(T)}').");
return Disposable.empty;
}
}
+3 -1
View File
@@ -43,7 +43,9 @@ class NativeOrder : public Order {
void on_cancel_reject(const CancelRejectEvent &);
void on_gateway_status(const GatewayStatusChangeEvent &);
void report_state();
OrderOpResult _on_activate(Price p, Quantity q,
OrderOpResult _on_activate(log::Level reject_level,
log::Level transition_level,
Price p, Quantity q,
bts::orderman::OrderServices &services);
void init_fix();
void add_exchange_order_id_to_fix();