public EventProxy()
        {
            this.typeFinder = GlobalHost.DependencyResolver.Resolve<ITypeFinder>();
            var eventAggregator = GlobalHost.DependencyResolver.Resolve<IEventAggregator>();
            subscriptions = typeFinder
                .ListEventTypes()
                .ToDictionary(t => t, t => new List<EventSubscription>());

            userSubscriptions = new Dictionary<string, List<Type>>();

            eventAggregator.Subscribe(Handle);
        }
        public EventProxy()
        {
            this.typeFinder = GlobalHost.DependencyResolver.Resolve <ITypeFinder>();
            var eventAggregator = GlobalHost.DependencyResolver.Resolve <IEventAggregator>();

            subscriptions = new Dictionary <Guid, List <Subscription> >(typeFinder
                                                                        .ListEventTypes()
                                                                        .ToDictionary(t => t.GUID, t => new List <Subscription>()));

            userSubscriptions = new Dictionary <string, List <Subscription> >();

            eventAggregator.Subscribe(Handle);
        }
        public EventProxy()
        {
            this.typeFinder = GlobalHost.DependencyResolver.Resolve<ITypeFinder>();
            var eventAggregator = GlobalHost.DependencyResolver.Resolve<IEventAggregator>();
            hubContext = GlobalHost.DependencyResolver.Resolve<IConnectionManager>().GetHubContext<EventAggregatorProxyHub>();

            subscriptions = new Dictionary<Guid, List<Subscription>>(typeFinder
                .ListEventTypes()
                .ToDictionary(t => t.GUID, t => new List<Subscription>()));

            userSubscriptions = new Dictionary<string, List<Subscription>>();

            eventAggregator.Subscribe(Handle);
        }
        public EventProxy(ITypeFinder typefinder, IEventAggregator eventAggregator, IHubContext <EventAggregatorProxyHub> hubContext, IServiceProvider serviceProvider, ILogger <EventProxy> logger)
        {
            this.typeFinder      = typefinder;
            this.hubContext      = hubContext;
            this.serviceProvider = serviceProvider;
            this.logger          = logger;

            subscriptions = new Dictionary <Guid, List <Subscription> >(typeFinder
                                                                        .ListEventTypes()
                                                                        .ToDictionary(t => t.GUID, t => new List <Subscription>()));

            userSubscriptions = new Dictionary <string, List <Subscription> >();

            eventAggregator.Subscribe(Handle);
        }