protected internal SelfBalancingOrgService(IRoutingService routingService) : base(null)
        {
            routingService.Require(nameof(routingService));
            RoutingService = routingService;

            RoutingService.Stats.OperationStatusChanged += (s, a) => InnerOperationStatusChanged?.Invoke(this, a);
            RoutingService.Stats.OperationFailed        += (s, a) => InnerOperationFailed?.Invoke(this, a);
        }
Exemple #2
0
        protected internal void Propagate()
        {
            if (InnerOperationStatusChanged != null)
            {
                foreach (var invocation in InnerOperationStatusChanged.GetInvocationList()
                         .OfType <EventHandler <IEnhancedOrgService, OperationStatusEventArgs> >().ToArray())
                {
                    OperationStatusChanged += invocation;
                }
            }

            if (InnerOperationFailed != null)
            {
                foreach (var invocation in InnerOperationFailed.GetInvocationList()
                         .OfType <EventHandler <IEnhancedOrgService, OperationFailedEventArgs> >().ToArray())
                {
                    OperationFailed += invocation;
                }
            }
        }