Ejemplo n.º 1
0
 public MaillingCommunication(DataSourceBase dataSource, TemplateMessage message, DataSchema schema)
 {
     State = SendingState.Stopped;
     this.dataSource = dataSource;
     this.message = message;
     dataSchema = schema;
     sendResults = new ConcurrentBag<SendResult>();
     PostModifiers = new List<IModifier<MailMessage>>();
     PreModifiers = new List<IModifier<TemplateMessage>>();
 }
Ejemplo n.º 2
0
        public MaillingCommunication(DataSourceBase dataSource, TemplateMessage message, long maxSpeed, DataSchema schema)
        {
            if (maxSpeed < 0)
                throw new ArgumentOutOfRangeException("maxSpeed", maxSpeed, "Maximum speed must be positive");

            State = SendingState.Stopped;
            this.dataSource = dataSource;
            this.message = message;
            dataSchema = schema;
            MaxSendSpeed = maxSpeed;
            sendResults = new ConcurrentBag<SendResult>();
            PostModifiers = new List<IModifier<MailMessage>>();
            PreModifiers = new List<IModifier<TemplateMessage>>();
        }