public SubscriptionsController(
     ILogger <AppointmentsController> logger,
     ISubscriptionStore subscriptionStore)
 {
     _logger            = logger;
     _subscriptionStore = subscriptionStore;
 }
 public DefaultAsyncEventPublisher(ISubscriptionStore subscriptionStore, IMessageTransport messageTransport, IMessageSerializer messageSerializer, ILoggerFactory loggerFactory)
 {
     _subscriptionStore = subscriptionStore;
     _messageTransport  = messageTransport;
     _messageSerializer = messageSerializer;
     _logger            = loggerFactory.Create("EventSourcing.DefaultAsyncEventPublisher");
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsStore"/> class.
        /// </summary>
        /// <param name="subscriptionStore">
        /// The subscription store.
        /// </param>
        public SettingsStore(ISubscriptionStore subscriptionStore)
        {
            this.subscriptionStore = subscriptionStore;
            var allSubscriptions = this.subscriptionStore.GetSubsriptions();
            var subscriptions = allSubscriptions.ToList();

            if (this.SubscriptionSettings != null)
            {
                subscriptions = subscriptions.Where(s => this.SubscriptionSettings.All(ss => ss.Id != s.Id)).ToList();
            }
            else
            {
                this.subscriptionSettings = new ObservableCollection<SubscriptionSettings>();
            }

            this.subscriptionSettings.AddRange(
                subscriptions.Select(s => new SubscriptionSettings
                    {
                        Id = s.Id,
                        ToastNotifications = true,
                        ShowNewLinks = true,
                        StreamKey = s.Stream.Key,
                        StreamName = s.Stream.Name
                    }));

            // Remove any stragglers
            this.subscriptionSettings.Remove(ss => allSubscriptions.All(s => s.Id != ss.Id));

            this.SaveSubscriptionSettings();
        }
 public DefaultAsyncEventPublisher(ISubscriptionStore subscriptionStore, IMessageTransport messageTransport, IMessageSerializer messageSerializer, ILoggerFactory loggerFactory)
 {
     _subscriptionStore = subscriptionStore;
     _messageTransport = messageTransport;
     _messageSerializer = messageSerializer;
     _logger = loggerFactory.Create("EventSourcing.DefaultAsyncEventPublisher");
 }
Esempio n. 5
0
 public MessageProcessor(IMessageSource msgSource, IMessageMatcher matcher, ISubscriptionStore store, IConfigurationSource cfg)
 {
     LiveMessageSource = msgSource;
     MessageMatcher    = matcher;
     SubscriptionStore = store;
     TaskDelay         = cfg.Get <int>(this, DefaultDelayKey, DefaultDelay);
 }
Esempio n. 6
0
 /// <summary>
 /// Instantiates a new <see cref="ReceiveDataProcessor" />
 /// </summary>
 /// <param name="deserializer"></param>
 /// <param name="subscriptionStore"></param>
 /// <param name="taskManager"></param>
 public ReceiveDataProcessor(IDeserializer deserializer,
                             ISubscriptionStore subscriptionStore, ITaskManager taskManager)
 {
     _deserializer      = deserializer;
     _subscriptionStore = subscriptionStore;
     _taskManager       = taskManager;
 }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Hub" /> class.
        /// </summary>
        /// <param name="hubLocation">The hub address.</param>
        /// <param name="subscriptionStore">The subscription store.</param>
        /// <param name="cryptoFunctions">The challenge generator.</param>
        /// <param name="queue">The queue.</param>
        /// <param name="messageHandler">The message handler.</param>
        /// <exception cref="ArgumentNullException">
        /// </exception>
        public Hub(
            Uri hubLocation,
            ISubscriptionStore subscriptionStore,
            ICryptoFunctions cryptoFunctions,
            IPublishQueue queue,
            HttpMessageHandler messageHandler)
        {
            if (subscriptionStore == null)
            {
                throw new ArgumentNullException(nameof(subscriptionStore));
            }

            if (cryptoFunctions == null)
            {
                throw new ArgumentNullException(nameof(cryptoFunctions));
            }

            _hubLocation         = hubLocation;
            _subscriptionStore   = subscriptionStore;
            _cryptoFunctions     = cryptoFunctions;
            _notificationService = new NotificationService(this, queue ?? new InMemoryPublishQueue());

            _httpClient = messageHandler == null
                ? new HttpClient()
                : new HttpClient(messageHandler);

            _notificationService.Start();
        }
Esempio n. 8
0
 public void SetUp()
 {
     this.subscriptionStore = new LocalSubscriptionStore();
     this.subscriptionManager = new SubscriptionManager(
                                     this.subscriptionStore,
                                     new LocalSubscriptionBroker());
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Hub" /> class.
 /// </summary>
 /// <param name="hubLocation">The hub address.</param>
 /// <param name="subscriptionStore">The subscription store.</param>
 /// <param name="cryptoFunctions">The challenge generator.</param>
 public Hub(
     Uri hubLocation,
     ISubscriptionStore subscriptionStore,
     ICryptoFunctions cryptoFunctions)
     : this(hubLocation, subscriptionStore, cryptoFunctions, null, null)
 {
 }
Esempio n. 10
0
 public MessageProcessor(IMessageSource msgSource, IMessageMatcher matcher, ISubscriptionStore store, IConfigurationSource cfg)
 {
     LiveMessageSource = msgSource;
     MessageMatcher = matcher;
     SubscriptionStore = store;
     TaskDelay = cfg.Get<int>(this, DefaultDelayKey, DefaultDelay);
 }
        /// <inheritdoc />
        public IConfigureThisJitney SetSubscriptionStore(ISubscriptionStore store)
        {
            Guard.NotNull(() => store);

            this.subscriptionStore = store;
            return(this);
        }
Esempio n. 12
0
        public EventProxy(
            IEventAggregator <TProxyEvent> eventAggregator,
            string hubUrl,
            Action <IHubConnection> configureConnection,
            Action <Exception> faultedConnectingAction,
            Action <Exception, IList <Subscription> > faultedSubscriptionActionm,
            Action connectedAction)
        {
            typeFinder        = new TypeFinder <TProxyEvent>();
            subscriptionQueue = new List <Subscription>();

            this.eventAggregator           = eventAggregator;
            this.faultedConnectingAction   = faultedConnectingAction;
            this.faultedSubscriptionAction = faultedSubscriptionActionm;
            this.connectedAction           = connectedAction;

            throttleHandler = DependencyResolver.Global.Get <ISubscriptionThrottleHandler>();
            throttleHandler.Init(() => SendQueuedSubscriptions());
            subscriptionStore = DependencyResolver.Global.Get <ISubscriptionStore>();
            proxy             = DependencyResolver.Global.Get <IHubProxyFactory>()
                                .Create(hubUrl, configureConnection, p =>
            {
                SendQueuedSubscriptions();
                p.On <Message>("onEvent", OnEvent);
            },
                                        Reconnected, FaultedConnection, ConnectionComplete);
        }
Esempio n. 13
0
 public void SetUp()
 {
     this.subscriptionStore   = new LocalSubscriptionStore();
     this.subscriptionManager = new SubscriptionManager(
         this.subscriptionStore,
         new LocalSubscriptionBroker());
 }
		public void TestInitialize()
		{
			priceFeedGenerator = Substitute.For<IPriceFeedGenerator>();
			priceFeedSubscriber = Substitute.For<IPriceFeedSubscriber>();
			subscriptionStore = Substitute.For<ISubscriptionStore>();

			subscriptionManagerUnderTest = new GroupSubscriptionManager(priceFeedGenerator, priceFeedSubscriber, subscriptionStore);
		}
 public SubscriptionController(ISubscriptionStore subscriptionStore,
                               IOptions <AppSettings> optionsAccessor,
                               ITokenAcquisition tokenAcquisition)
 {
     this.subscriptionStore = subscriptionStore;
     appSettings            = optionsAccessor.Value;
     this.tokenAcquisition  = tokenAcquisition;
 }
 public SubscriptionController(ISDKHelper sdkHelper,
                               ISubscriptionStore subscriptionStore,
                               IOptions <AppSettings> optionsAccessor)
 {
     this.sdkHelper         = sdkHelper;
     this.subscriptionStore = subscriptionStore;
     appSettings            = optionsAccessor.Value;
 }
Esempio n. 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Hub" /> class.
 /// </summary>
 /// <param name="hubLocation">The hub address.</param>
 /// <param name="subscriptionStore">The subscription store.</param>
 /// <param name="cryptoFunctions">The challenge generator.</param>
 /// <param name="queue">The queue.</param>
 public Hub(
     Uri hubLocation,
     ISubscriptionStore subscriptionStore,
     ICryptoFunctions cryptoFunctions,
     IPublishQueue queue)
     : this(hubLocation, subscriptionStore, cryptoFunctions, queue, null)
 {
 }
Esempio n. 18
0
 public SubscriptionManager(ISubscriptionStore store, ISubscriptionBroker broker)
 {
     this.store = store;
     this.broker = broker;
     this.cache = new Dictionary<string, SubscriptionSet>();
     this.cacheLock = new object();
     this.initializationTask = new Lazy<Task>(() => Initialize());
 }
        public ProxyEventAggregator(ISubscriptionStore subscriptionStore, EventProxy eventProxy, ITypeFinder typerFinder, IOptions options)
        {
            this.subscriptionStore = subscriptionStore;
            this.eventProxy        = eventProxy;
            this.typerFinder       = typerFinder;

            (options as OptionsBuilder).ConfigureProxy(eventProxy, this);
        }
Esempio n. 20
0
 public SubscriptionManager(ISubscriptionStore store, ISubscriptionBroker broker)
 {
     this.store              = store;
     this.broker             = broker;
     this.cache              = new Dictionary <string, SubscriptionSet>();
     this.cacheLock          = new object();
     this.initializationTask = new Lazy <Task>(() => Initialize());
 }
Esempio n. 21
0
        /// <summary>
        ///     Create the initial schema for Data Stores that require it
        /// </summary>
        /// <param name="store"></param>
        public static void InitSchema(this ISubscriptionStore store)
        {
            var requiresSchema = store as IRequiresSchema;

            if (requiresSchema != null)
            {
                requiresSchema.InitSchema();
            }
        }
Esempio n. 22
0
 public NotificationProcessor(
     ISubscriptionStore subscriptionStore,
     INotificationStore notificationStore,
     ISmsProvider smsProvider)
 {
     _subscriptionStore = subscriptionStore;
     _notificationStore = notificationStore;
     _smsProvider       = smsProvider;
 }
Esempio n. 23
0
 public void SetUp()
 {
     this.resolver            = new DefaultDependencyResolver();
     this.subscriptionStore   = new LocalSubscriptionStore();
     this.subscriptionBroker  = new LocalSubscriptionBroker();
     this.subscriptionManager = new SubscriptionManager(this.subscriptionStore, this.subscriptionBroker);
     this.transportFactory    = new LocalTransportFactory();
     this.bus = new MessageBus(this.subscriptionManager, this.transportFactory.CreateOutboundTransport(), NullLoggerFactory.Instance);
 }
 public NotificationController(ISDKHelper sdkHelper,
                               ISubscriptionStore subscriptionStore,
                               IConnectionManager connectionManager,
                               ILogger <NotificationController> logger)
 {
     this.sdkHelper         = sdkHelper;
     this.subscriptionStore = subscriptionStore;
     this.connectionManager = connectionManager;
     this.logger            = logger;
 }
Esempio n. 25
0
            public void InitializeContext()
            {
                appHost = new AppHostForAzureTesting();
                appHost.Init();
                appHost.Start(BaseUrl);

                client             = new JsonServiceClient(BaseUrl);
                subscriptionsStore = appHost.Resolve <ISubscriptionStore>();
                eventSink          = appHost.Resolve <IEventSink>();
            }
 public DefaultAsyncEventSubscriberEndpoint(IAsyncEventHandlerProvider asyncEventHandlerProvider, ISubscriptionStore subscriptionStore, IMessageTransport messageTransport, IMessageSerializer messageSerializer, ILoggerFactory loggerFactory)
 {
     _asyncEventHandlerProvider = asyncEventHandlerProvider;
     _subscriptionStore = subscriptionStore;
     _messageTransport = messageTransport;
     _messageSerializer = messageSerializer;
     _logger = loggerFactory.Create("EventSourcing.DefaultAsyncEventSubscriberEndpoint");
     _messageReceiveWorker = new WorkerThread(ReceiveMessage);
     _started = false;
 }
Esempio n. 27
0
 public NotificationController(ISubscriptionStore subscriptionStore,
                               IHubContext <NotificationHub> notificationHub,
                               ILogger <NotificationController> logger,
                               ITokenAcquisition tokenAcquisition)
 {
     this.subscriptionStore = subscriptionStore;
     this.notificationHub   = notificationHub;
     this.logger            = logger;
     this.tokenAcquisition  = tokenAcquisition;
 }
Esempio n. 28
0
 public DefaultAsyncEventSubscriberEndpoint(IAsyncEventHandlerProvider asyncEventHandlerProvider, ISubscriptionStore subscriptionStore, IMessageTransport messageTransport, IMessageSerializer messageSerializer, ILoggerFactory loggerFactory)
 {
     _asyncEventHandlerProvider = asyncEventHandlerProvider;
     _subscriptionStore         = subscriptionStore;
     _messageTransport          = messageTransport;
     _messageSerializer         = messageSerializer;
     _logger = loggerFactory.Create("EventSourcing.DefaultAsyncEventSubscriberEndpoint");
     _messageReceiveWorker = new WorkerThread(ReceiveMessage);
     _started = false;
 }
 /// <summary>
 /// Instantiates a new <see cref="BrokerClient" />
 /// </summary>
 /// <remarks>This object is recommended to be created using <see cref="BrokerClientFactory" /></remarks>
 /// <param name="payloadFactory">The <see cref="IPayloadFactory" /></param>
 /// <param name="connectionManager">The <see cref="IConnectionManager" /></param>
 /// <param name="sendDataProcessor">The <see cref="ISendDataProcessor" /></param>
 /// <param name="subscriptionStore">The <see cref="ISubscriptionStore" /></param>
 /// <param name="serializer">The <see cref="ISerializer" /></param>
 /// <param name="taskManager">The <see cref="ITaskManager" /></param>
 public BrokerClient(IPayloadFactory payloadFactory, IConnectionManager connectionManager,
                     ISendDataProcessor sendDataProcessor, ISubscriptionStore subscriptionStore, ISerializer serializer,
                     ITaskManager taskManager)
 {
     _payloadFactory    = payloadFactory;
     ConnectionManager  = connectionManager;
     _subscriptionStore = subscriptionStore;
     _sendDataProcessor = sendDataProcessor;
     _serializer        = serializer;
     _taskManager       = taskManager;
 }
Esempio n. 30
0
 public UsersController(
     IIntegrationManager integrationManager,
     IUserStore userStore,
     IUserNotificationStore userNotificationStore,
     ISubscriptionStore subscriptionStore)
 {
     this.integrationManager    = integrationManager;
     this.userStore             = userStore;
     this.userNotificationStore = userNotificationStore;
     this.subscriptionStore     = subscriptionStore;
 }
Esempio n. 31
0
        public EventProxy(IHubProxyFactory hubProxyFactory, ISubscriptionThrottleHandler throttleHandler, ISubscriptionStore subscriptionStore, ITypeFinder typeFinder)
        {
            this.typeFinder   = typeFinder;
            subscriptionQueue = new List <Subscription>();

            this.hubProxyFactory = hubProxyFactory;

            this.throttleHandler = throttleHandler;
            throttleHandler.Init(() => SendQueuedSubscriptions());
            this.subscriptionStore = subscriptionStore;
        }
Esempio n. 32
0
 public SubscriptionController(ISubscriptionStore subscriptionStore,
                               ITokenAcquisition tokenAcquisition,
                               KeyVaultManager keyVaultManager,
                               IOptions <SubscriptionOptions> subscriptionOptions,
                               IOptions <AppSettings> appSettings)
 {
     this.subscriptionStore   = subscriptionStore;
     this.tokenAcquisition    = tokenAcquisition;
     this.keyVaultManager     = keyVaultManager ?? throw new ArgumentNullException(nameof(keyVaultManager));
     this.subscriptionOptions = subscriptionOptions ?? throw new ArgumentNullException(nameof(subscriptionOptions));
     this.appSettings         = appSettings ?? throw new ArgumentNullException(nameof(appSettings));
 }
        /// <summary>
        /// Creates a new instance of <see cref="AbstractJitneyConfiguration"/>
        /// </summary>
        /// <param name="handlerRegistry">Dependency injection for <see cref="AbstractHandlerRegistry"/></param>
        protected AbstractJitneyConfiguration(AbstractHandlerRegistry handlerRegistry)
        {
            this.configurationItems  = new Dictionary <string, object>();
            this.contractMap         = new Dictionary <Type, EndpointAddress>();
            this.jitneySubscriptions = new JitneySubscriptions(handlerRegistry, new HandlerInvocationCache());

            this.incommingEnvelopeSteps = new List <IncommingEnvelopeStep>();
            this.incommingMessageSteps  = new List <IncommingMessageStep>();
            this.outgoingMessageSteps   = new List <OutgoingMessageStep>();
            this.outgoingEnvelopeSteps  = new List <OutgoingEnvelopeStep>();

            this.subscriptionStore = new InMemorySubscriptionStore();
        }
 public SubscriptionController(ISubscriptionStore subscriptionStore,
                               ITokenAcquisition tokenAcquisition,
                               KeyVaultManager keyVaultManager,
                               IOptions <SubscriptionOptions> subscriptionOptions,
                               IOptions <DownstreamApiSettings> appSettings,
                               GraphServiceClient graphServiceClient)
 {
     this.subscriptionStore   = subscriptionStore;
     this.tokenAcquisition    = tokenAcquisition;
     this.keyVaultManager     = keyVaultManager ?? throw new ArgumentNullException(nameof(keyVaultManager));
     this.subscriptionOptions = subscriptionOptions ?? throw new ArgumentNullException(nameof(subscriptionOptions));
     this.appSettings         = appSettings ?? throw new ArgumentNullException(nameof(appSettings));
     this.graphServiceClient  = graphServiceClient ?? throw new ArgumentNullException(nameof(graphServiceClient));
 }
Esempio n. 35
0
 public UserEventPublisher(ICounterService counters, ISemanticLog log, ILogStore logStore,
                           IEventStore eventStore,
                           ISubscriptionStore subscriptionStore,
                           ITemplateStore templateStore,
                           IUserEventProducer userEventProducer)
 {
     this.subscriptionStore = subscriptionStore;
     this.counters          = counters;
     this.eventStore        = eventStore;
     this.log               = log;
     this.logStore          = logStore;
     this.templateStore     = templateStore;
     this.userEventProducer = userEventProducer;
 }
Esempio n. 36
0
        private void AddTestSubscriptions()
        {
            ISubscriptionStore store = Factory.Instantiate <ISubscriptionStore>();

            if (store.Count() == 0)
            {
                Topic t = new Topic {
                    Name = "Test", UniqueId = Guid.NewGuid().ToString(), Description = "Testing topic only"
                };
                // No frills subscription
                Subscription subs = new Subscription {
                    Topic              = t,
                    ChannelMonicker    = "Test",
                    UniqueId           = "_TEST_",
                    Sink               = new ConsoleMessageSink(),
                    QualityConstraints = QualityAttributes.Default,
                    Name               = "Simple",
                    Description        = "Lossy subscription"
                };
                Assert.True(store.Add(subs).Success, () => "Could not add subscription");
                // Reliable http, with 10 second backoff
                var quality = QualityAttributes.Default;
                quality.SinkQuality = new SinkQualityAttributes {
                    RequestTimeout = 5000
                };
                quality.GuaranteeDelivery = true;
                quality.MaxRetry          = 3;
                quality.BackOffPeriod     = 10000;
                quality.EndureQuietude    = 2000;
                subs = new Subscription {
                    Topic           = t,
                    ChannelMonicker = "ReliableRemoteClient",
                    UniqueId        = Guid.NewGuid().ToString(),
                    Sink            = new HttpMessageSink {
                        Target = new Uri("http://localhost:8080/api/demo"), MimeType = "application/json"
                    },
                    QualityConstraints = quality,
                    Name        = "Reliable",
                    Description = "Lossless subscription"
                };
                Assert.True(store.Add(subs).Success, () => "Could not add subscription");
            }

            //var s = store.FindById("_TEST_").Containee;
            //s.QualityConstraints.EndureQuietude = 667;
            //s.QualityConstraints.SinkQuality.RequestTimeout = 1;
            //store.Update(s);
        }
Esempio n. 37
0
 public NotificationController(ISubscriptionStore subscriptionStore,
                               IHubContext <NotificationHub> notificationHub,
                               ILogger <NotificationController> logger,
                               ITokenAcquisition tokenAcquisition,
                               IOptions <MicrosoftIdentityOptions> identityOptions,
                               KeyVaultManager keyVaultManager,
                               IOptions <AppSettings> appSettings,
                               IOptions <SubscriptionOptions> subscriptionOptions)
 {
     this.subscriptionStore   = subscriptionStore;
     this.notificationHub     = notificationHub;
     this.logger              = logger;
     this.tokenAcquisition    = tokenAcquisition;
     this.identityOptions     = identityOptions ?? throw new ArgumentNullException(nameof(identityOptions));
     this.keyVaultManager     = keyVaultManager ?? throw new ArgumentNullException(nameof(keyVaultManager));
     this.appSettings         = appSettings ?? throw new ArgumentNullException(nameof(appSettings));
     this.subscriptionOptions = subscriptionOptions ?? throw new ArgumentNullException(nameof(subscriptionOptions));
 }
Esempio n. 38
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShareLinkViewModel"/> class.
        /// </summary>
        /// <param name="subscriptionStore">
        /// The subscription store.
        /// </param>
        /// <param name="streamStore">
        /// The stream Store.
        /// </param>
        public ShareLinkViewModel(ISubscriptionStore subscriptionStore, IStreamStore streamStore)
        {
            this.streamStore = streamStore;
            this.Subscriptions = new ObservableCollection<SubscriptionViewModel>();
            var subscriptions = subscriptionStore.GetSubsriptions();

            var mappedSubscriptions = new List<SubscriptionViewModel>();
            mappedSubscriptions = Mapper.Map(subscriptions, mappedSubscriptions);

            this.Subscriptions.AddRange(mappedSubscriptions);

            subscriptions.CollectionChanged += (sender, args)  =>
                {
                    var newItems = new List<SubscriptionViewModel>();
                    newItems = Mapper.Map(args.NewItems, newItems);
                    this.Subscriptions.AddRange(newItems);

                    var oldItems = new List<SubscriptionViewModel>();
                    oldItems = Mapper.Map(args.NewItems, oldItems);
                    this.Subscriptions.RemoveRange(oldItems);
                };
        }
Esempio n. 39
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsViewModel"/> class.
        /// </summary>
        /// <param name="settingsStore">
        /// The settings store.
        /// </param>
        private SettingsViewModel(ISettingsStore settingsStore, ISubscriptionStore subscriptionStore)
        {
            this.settingsStore = settingsStore;
            this.subscriptionStore = subscriptionStore;

            var settings = this.settingsStore.SubscriptionSettings;

            this.SubscriptionSettings =
                new ObservableCollection<SubscriptionSettingsViewModel>(
                    settings.Select(s => new SubscriptionSettingsViewModel(s, this.settingsStore)));

            this.DeleteSubscription = new RelayCommand(async model =>
                    {
                        var dialog = new MessageDialog("Do you really want to remove this subscription?");
                        dialog.Commands.Add(
                            new UICommand(
                                "Yes",
                                command =>
                                    {
                                        var setting = model as SubscriptionSettingsViewModel;

                                        if (setting == null)
                                        {
                                            return;
                                        }

                                        this.SubscriptionSettings.Remove(s => s.Id == setting.Id);

                                        this.subscriptionStore.Delete(setting.StreamKey);
                                        this.settingsStore.RemoveSubscriptionSetting(setting.Id);
                                    }));
                        dialog.Commands.Add(new UICommand("No"));
                        
                        await dialog.ShowAsync();
                    });
        }
        public void Setup()
        {
            this.store = CreateSubscriptionStore();

            this.OnSetUp();
        }
Esempio n. 41
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Home"/> class.
        /// </summary>
        /// <param name="accountStore">
        /// The account Store.
        /// </param>
        /// <param name="newSlapStore">
        /// The new Slap Store.
        /// </param>
        /// <param name="subscriptionStore">
        /// The subscription repository.
        /// </param>
        /// <param name="settingsStore">
        /// The settings Store.
        /// </param>
        public Home(IAccountStore accountStore, INewSlapsStore newSlapStore, ISubscriptionStore subscriptionStore, ISettingsStore settingsStore)
        {
            this.accountStore = accountStore;
            this.newSlapStore = newSlapStore;
            this.subscriptionStore = subscriptionStore;
            this.settingsStore = settingsStore;
            this.InitializeComponent();

            this.viewModel = this.DataContext as HomeViewModel;
        }
 public ISubscription MatchSubscription(ISubscriptionStore store, IMessage message)
 {
     return store.FindByMonicker(message.ChannelMonicker);
 }
		public GroupSubscriptionManager(IPriceFeedGenerator priceFeedGenerator, IPriceFeedSubscriber priceFeedSubscriber, ISubscriptionStore subscriptionStore)
		{
			this.priceFeedGenerator = priceFeedGenerator;
			this.priceFeedSubscriber = priceFeedSubscriber;
			this.subscriptionStore = subscriptionStore;
		}