コード例 #1
0
        public SqsTestContext(object fixture)
        {
            Address = new Address(fixture.GetType().Name, Environment.MachineName);
			ConnectionConfiguration = 
				SqsConnectionStringParser.Parse(ConfigurationManager.AppSettings["TestConnectionString"]);

            S3Client = AwsClientFactory.CreateS3Client(ConnectionConfiguration);
            SqsClient = AwsClientFactory.CreateSqsClient(ConnectionConfiguration);

			Creator = new SqsQueueCreator
			{
				ConnectionConfiguration = ConnectionConfiguration,
				SqsClient = SqsClient,
                S3Client = S3Client
			};
	        
            _receivedMessages = new Subject<TransportMessage>();
            _exceptionsThrownByReceiver = new Subject<Exception>();

			QueueUrlCache = new SqsQueueUrlCache
			{
                SqsClient = SqsClient,
				ConnectionConfiguration = ConnectionConfiguration
			};


            Sender = new SqsQueueSender
            {
	            ConnectionConfiguration = ConnectionConfiguration,
	            SqsClient = SqsClient,
                S3Client = S3Client,
	            QueueUrlCache = QueueUrlCache,
				QueueCreator = Creator
            };

	        DequeueStrategy = new SqsDequeueStrategy(null)
	        {
		        ConnectionConfiguration = ConnectionConfiguration,
                SqsClient = SqsClient,
                S3Client = S3Client
            };
	        
        }
コード例 #2
0
        public SqsTestContext(object fixture)
        {
            Address = new Address(fixture.GetType().Name, Environment.MachineName);
            ConnectionConfiguration =
                SqsConnectionStringParser.Parse(ConfigurationManager.AppSettings["TestConnectionString"]);

            S3Client  = AwsClientFactory.CreateS3Client(ConnectionConfiguration);
            SqsClient = AwsClientFactory.CreateSqsClient(ConnectionConfiguration);

            Creator = new SqsQueueCreator
            {
                ConnectionConfiguration = ConnectionConfiguration,
                SqsClient = SqsClient,
                S3Client  = S3Client
            };

            _receivedMessages           = new Subject <TransportMessage>();
            _exceptionsThrownByReceiver = new Subject <Exception>();

            QueueUrlCache = new SqsQueueUrlCache
            {
                SqsClient = SqsClient,
                ConnectionConfiguration = ConnectionConfiguration
            };


            Sender = new SqsQueueSender
            {
                ConnectionConfiguration = ConnectionConfiguration,
                SqsClient     = SqsClient,
                S3Client      = S3Client,
                QueueUrlCache = QueueUrlCache,
                QueueCreator  = Creator
            };

            DequeueStrategy = new SqsDequeueStrategy(null)
            {
                ConnectionConfiguration = ConnectionConfiguration,
                SqsClient = SqsClient,
                S3Client  = S3Client
            };
        }
コード例 #3
0
 public override Queue CreateQueue(string endpoint)
 {
     return(SqsQueueCreator.Create(endpoint));
 }