Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="queueName">Name of the queue to be connected to.</param>
        /// <param name="storageConnectionString">Connection string for the Azure storage account used to host this table.</param>
        public AzureQueueDataManager(string queueName, string storageConnectionString)
        {
            AzureStorageUtils.ValidateQueueName(queueName);

            logger           = TraceLogger.GetLogger(this.GetType().Name, TraceLogger.LoggerType.Runtime);
            QueueName        = queueName;
            connectionString = storageConnectionString;

            queueOperationsClient = AzureStorageUtils.GetCloudQueueClient(
                connectionString,
                AzureQueueDefaultPolicies.QueueOperationRetryPolicy,
                AzureQueueDefaultPolicies.QueueOperationTimeout,
                logger);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="queueName">Name of the queue to be connected to.</param>
        /// <param name="storageConnectionString">Connection string for the Azure storage account used to host this table.</param>
        /// <param name="visibilityTimeout">A TimeSpan specifying the visibility timeout interval</param>
        public AzureQueueDataManager(string queueName, string storageConnectionString, TimeSpan?visibilityTimeout = null)
        {
            AzureStorageUtils.ValidateQueueName(queueName);

            logger                   = LogManager.GetLogger(this.GetType().Name, LoggerType.Runtime);
            QueueName                = queueName;
            connectionString         = storageConnectionString;
            messageVisibilityTimeout = visibilityTimeout;

            queueOperationsClient = AzureStorageUtils.GetCloudQueueClient(
                connectionString,
                AzureQueueDefaultPolicies.QueueOperationRetryPolicy,
                AzureQueueDefaultPolicies.QueueOperationTimeout,
                logger);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="loggerFactory">logger factory to use</param>
        /// <param name="queueName">Name of the queue to be connected to.</param>
        /// <param name="storageConnectionString">Connection string for the Azure storage account used to host this table.</param>
        /// <param name="visibilityTimeout">A TimeSpan specifying the visibility timeout interval</param>
        public AzureQueueDataManager(ILoggerFactory loggerFactory, string queueName, string storageConnectionString, TimeSpan?visibilityTimeout = null)
        {
            AzureStorageUtils.ValidateQueueName(queueName);

            logger                   = new LoggerWrapper <AzureQueueDataManager>(loggerFactory);
            QueueName                = queueName;
            connectionString         = storageConnectionString;
            messageVisibilityTimeout = visibilityTimeout;

            queueOperationsClient = AzureStorageUtils.GetCloudQueueClient(
                connectionString,
                AzureQueueDefaultPolicies.QueueOperationRetryPolicy,
                AzureQueueDefaultPolicies.QueueOperationTimeout,
                logger);
        }