private IXDBroadcaster CreateNetworkBroadcaster()
        {
            var settings        = AmazonAccountSettings.GetInstance();
            var amazonSnsFacade = new AmazonSnsFacade(settings);
            var respository     = new TopicRepository(settings, amazonSnsFacade);
            var publishService  = new PublisherService(amazonSnsFacade);

            return(new XDAmazonBroadcaster(serializer, publishService, respository));
        }
Example #2
0
        public void GivenAmazonSettingsThenShouldResolveSuccess()
        {
            // arrange
            var client = new XDMessagingClient().WithAmazonSettings("xx", "xx");

            // act
            var accessKey  = AmazonAccountSettings.GetInstance().AccessKey;
            var accessKey2 = client.Broadcasters.Container.Resolve <AmazonAccountSettings>().AccessKey;


            // assert
            Assert.That(accessKey, Is.EqualTo("xx"));
            Assert.That(accessKey2, Is.EqualTo("xx"));
        }
Example #3
0
        private IXDListener CreateNetworkListener(IIdentityProvider provider)
        {
            var settings        = AmazonAccountSettings.GetInstance();
            var amazonSnsFacade = new AmazonSnsFacade(settings);
            var amazonSqsFacade = new AmazonSqsFacade(settings);
            var queuePoller     = new QueuePoller(amazonSqsFacade);

            var resourceCounter      = new ResourceCounter();
            var respository          = new TopicRepository(AmazonAccountSettings.GetInstance(), amazonSnsFacade);
            var subscriberRepository = new SubscriberRepository(settings, amazonSqsFacade);
            var subscriptionService  = new SubscriptionService(
                resourceCounter,
                amazonSnsFacade,
                amazonSqsFacade,
                subscriberRepository,
                queuePoller);

            return(new XDAmazonListener(provider, serializer, respository, subscriberRepository, subscriptionService));
        }
Example #4
0
 internal static AmazonAccountSettings GetSettings()
 {
     return(AmazonAccountSettings.GetInstance());
 }