Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlMessageSender"/> class.
        /// </summary>
        /// <param name="configuration">The associated <see cref="SqlMessageQueueConfiguration">SQL queue configuration</see>.</param>
        public SqlMessageSender(SqlMessageQueueConfiguration configuration)
        {
            Arg.NotNull(configuration, nameof(configuration));

            Configuration     = configuration;
            messageSerializer = configuration.MessageSerializer;
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlMessageSender"/> class.
        /// </summary>
        /// <param name="connectionString">The connection string used by the message receiver.</param>
        public SqlMessageSender(string connectionString)
        {
            Arg.NotNullOrEmpty(connectionString, nameof(connectionString));

            var builder = new SqlMessageQueueConfigurationBuilder().HasConnectionString(connectionString);

            Configuration     = builder.CreateConfiguration();
            messageSerializer = Configuration.MessageSerializer;
        }
Esempio n. 3
0
        SqlMessagePump(Guid subscriptionId, DateTimeOffset from, SqlMessageQueueConfiguration configuration, IObserver <IMessageDescriptor> observer)
        {
            Contract.Requires(configuration != null);
            Contract.Requires(observer != null);

            this.subscriptionId = subscriptionId;
            this.from           = from;
            this.configuration  = configuration;
            this.observer       = observer;
            messageSerializer   = configuration.MessageSerializer;
        }