Example #1
0
        public MongoEventStore(string connectionString)
        {
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException("connectionString");
            }

            _connectionString = connectionString;

            _eventCollectionNameProvider = ObjectContainer.Resolve <IEventCollectionNameProvider>();
            _binarySerializer            = ObjectContainer.Resolve <IBinarySerializer>();
            _aggregateRootTypeProvider   = ObjectContainer.Resolve <IAggregateRootTypeProvider>();
        }
Example #2
0
        /// <summary>Parameterized constructor.
        /// </summary>
        /// <param name="connectionString"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public MongoEventStore(string connectionString)
        {
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException("connectionString");
            }

            _connectionString = connectionString;

            _eventCollectionNameProvider = ObjectContainer.Resolve<IEventCollectionNameProvider>();
            _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
            _aggregateRootTypeProvider = ObjectContainer.Resolve<IAggregateRootTypeProvider>();
        }