public void UseMockAdapter(Adapter adapter) { _openDefault = _openFile = _openConnection = _openNamedConnection = ignore => new Database(adapter); _open = (ignore1, ignore2) => new Database(adapter); _openNamedConnectionAndSchema = _openConnectionWithProvider = (ignore1, ignore2) => new Database(adapter); _openConnectionWithProviderAndSchema = (ignore1, ignore2, ignore3) => new Database(adapter); }
public static void UseMockAdapter(Adapter mockAdapter) { Data.DatabaseOpener.UseMockAdapter(mockAdapter); }
public static void UseMockAdapter(Adapter adapter) { _openDefault = () => new Database(adapter); _openFile = _openConnection = _openNamedConnection = (ignore) => new Database(adapter); _open = (ignore1, ignore2) => new Database(adapter); _openConnectionWithProvider = (ignore1, ignore2) => new Database(adapter); }
private Database(Database copy) : base(copy) { _adapter = copy._adapter; _databaseRunner = copy._databaseRunner; }
/// <summary> /// Initializes a new instance of the <see cref="Database"/> class. /// </summary> /// <param name="adapter">The adapter to use for data access.</param> internal Database(Adapter adapter) { _adapter = adapter; _databaseRunner = new DatabaseRunner(_adapter); }
public static void UseMockAdapter(Adapter adapter) { OpenMethods.UseMockAdapter(adapter); }
public virtual Func<object[], IDictionary<string, object>> CreateFindOneDelegate(Adapter adapter, string tableName, SimpleExpression criteria) { return adapter.CreateFindOneDelegate(tableName, criteria); }
public DatabaseRunner(Adapter adapter) { _adapter = adapter; }
public virtual Func<object[], IDictionary<string,object>> CreateGetDelegate(Adapter adapter, string tableName, object[] keyValues) { return args => adapter.Get(tableName, args); }
public virtual Func <object[], IDictionary <string, object> > CreateFindOneDelegate(Adapter adapter, string tableName, SimpleExpression criteria) { return(adapter.CreateFindOneDelegate(tableName, criteria)); }
public virtual Func <object[], IDictionary <string, object> > CreateGetDelegate(Adapter adapter, string tableName, object[] keyValues) { return(args => adapter.Get(tableName, args)); }
/// <summary> /// Initializes a new instance of the <see cref="Database"/> class. /// </summary> /// <param name="adapter">The adapter to use for data access.</param> internal Database(Adapter adapter) { _adapter = adapter; }
public static void UseMockAdapter(Adapter adapter) { _openDefault = () => new Database(adapter); _openFile = _openConnection = (ignore) => new Database(adapter); }
public AdapterMethodDynamicInvoker(Adapter adapter) { _adapter = adapter; }