Ejemplo n.º 1
0
 public static Task <SdbResult> RunAsyncWith(this SdbRequest SdbRequest, SdbQueue dbQueue)
 {
     return(dbQueue.ExecuteAsync(SdbRequest));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This is direct approach, without Producer/Consumer pattern
 /// </summary>
 /// <param name="dbConn"></param>
 /// <returns></returns>
 public static SdbResult RunWith(this SdbRequest SdbRequest, SdbConnection dbConn)
 {
     return(SdbRequestRunner.ExecuteDbRequest(dbConn.Connection, SdbRequest, dbConn.dbConfig));
 }
Ejemplo n.º 3
0
 public SdbResult Execute(SdbRequest dbRequest)
 {
     dbRequest.TaskCompletionSource = new TaskCompletionSource <SdbResult>();
     Enqueue(dbRequest);
     return(dbRequest.TaskCompletionSource.Task.GetAwaiter().GetResult());
 }
Ejemplo n.º 4
0
 public static SdbResult RunWith(this SdbRequest SdbRequest, SdbQueue dbQueue)
 {
     return(dbQueue.Execute(SdbRequest));
 }
Ejemplo n.º 5
0
 public Task <SdbResult> ExecuteAsync(SdbRequest dbRequest)
 {
     dbRequest.TaskCompletionSource = new TaskCompletionSource <SdbResult>();
     Enqueue(dbRequest);
     return(dbRequest.TaskCompletionSource.Task);
 }