public static void Connect(this IConnectableConnection connection, CancellationToken?cancellationToken = null)
 {
     TaskUtilities.ExecuteSynchronously(() => connection.ConnectAsync(cancellationToken));
 }
 public static T Run <T>(this IConnection connection, IScalarQuery <T> queryObject, IQueryConverter queryConverter = null, CancellationToken?cancellationToken = null)
 {
     return(TaskUtilities.ExecuteSynchronously(() => connection.RunAsync <T>(queryObject, queryConverter, cancellationToken)));
 }
 public static IConnection Get(this IConnectionFactory connectionFactory)
 {
     return(TaskUtilities.ExecuteSynchronously(() => connectionFactory.GetAsync()));
 }