public IObservable <CreateTablesResult> CreateTablesAsync(params Type[] types) { return(_pool.EnqueueConnectionOp(conn => { var result = new CreateTablesResult(); foreach (Type type in types) { int aResult = conn.CreateTable(type); result.Results[type] = aResult; } return result; })); }
public CreateTablesResult CreateTables(params Type[] types) { CreateTablesResult result = new CreateTablesResult(); var conn = GetConnection(); using (conn.Lock()) { foreach (Type type in types) { int aResult = conn.CreateTable(type); result.Results [type] = aResult; } } return(result); }
public Task<CreateTablesResult> CreateTablesAsync (params Type[] types) { return Task.Factory.StartNew (() => { CreateTablesResult result = new CreateTablesResult (); var conn = GetConnection (); using (conn.Lock ()) { foreach (Type type in types) { int aResult = conn.CreateTable (type); result.Results[type] = aResult; } } return result; }); }
public Task <CreateTablesResult> CreateTablesAsync(string contextName = null, CreateFlags createFlags = CreateFlags.None, params Type[] types) { return(Task.Factory.StartNew(() => { CreateTablesResult result = new CreateTablesResult(); var conn = GetConnection(); using (conn.Lock()) { foreach (Type type in types) { int aResult = conn.CreateTable(type, contextName, createFlags); result.Results[type] = aResult; } } return result; })); }