示例#1
0
        private Database(Type connectionType, params object[] arguments) : this()
        {
            var constructor = ReflectionHelper.GetConstructor(connectionType, arguments);

            _createConnection = () => (IDbConnection)constructor.Invoke(arguments);
            Variant           = DetermineVariant(connectionType);
        }
示例#2
0
            public IDatabaseBuilder UseConnection <T>(params object[] arguments)
                where T : IDbConnection
            {
                var constructor = ReflectionHelper.GetConstructor(typeof(T), arguments);

                CreateConnection = () => (T)constructor.Invoke(arguments);
                Variant          = DetermineVariant(typeof(T));
                return(this);
            }