v9.7.2018.0421   支持运行时修改DAL连接字符串
大石头 authored at 2018-04-21 14:00:47
980.00 B
X
using System;
using System.Collections.Generic;

namespace NewLife.Queue.Broker
{
    public class BatchMessageLogRecord
    {
        private readonly IEnumerable<MessageLogRecord> _records;
        private readonly Action<BatchMessageLogRecord, object> _callback;
        private readonly object _parameter;

        public IEnumerable<MessageLogRecord> Records
        {
            get { return _records; }
        }
        public Action<BatchMessageLogRecord, object> Callback
        {
            get { return _callback; }
        }

        public BatchMessageLogRecord(IEnumerable<MessageLogRecord> records, Action<BatchMessageLogRecord, object> callback, object parameter)
        {
            _records = records;
            _callback = callback;
            _parameter = parameter;
        }

        public void OnPersisted()
        {
            if (_callback != null)
            {
                _callback(this, _parameter);
            }
        }
    }
}