public static void UseMySqlInLeaseModeAsOneWayClient(this StandardConfigurer <ITransport> configurer, Func <Task <IDbConnection> > connectionFactory, TimeSpan?leaseInterval = null, TimeSpan?leaseTolerance = null, bool automaticallyRenewLeases = false, TimeSpan?leaseAutoRenewInterval = null, Func <string> leasedByFactory = null) { configurer.UseMySqlInLeaseModeAsOneWayClient(new MySqlLeaseTransportOptions(connectionFactory)) .SetLeaseInterval(leaseInterval) .SetLeaseTolerance(leaseTolerance) .SetAutomaticLeaseRenewal(automaticallyRenewLeases, leaseAutoRenewInterval) .SetLeasedByFactory(leasedByFactory); }
public static void UseMySqlInLeaseModeAsOneWayClient(this StandardConfigurer <ITransport> configurer, string connectionString, TimeSpan?leaseInterval = null, TimeSpan?leaseTolerance = null, bool automaticallyRenewLeases = false, TimeSpan?leaseAutoRenewInterval = null, Func <string> leasedByFactory = null, bool enlistInAmbientTransaction = false, bool ensureTablesAreCreated = true) { configurer.UseMySqlInLeaseModeAsOneWayClient(new MySqlLeaseTransportOptions(connectionString, enlistInAmbientTransaction)) .SetEnsureTablesAreCreated(ensureTablesAreCreated) .SetLeaseInterval(leaseAutoRenewInterval) .SetLeaseTolerance(leaseTolerance) .SetAutomaticLeaseRenewal(automaticallyRenewLeases, leaseAutoRenewInterval) .SetLeasedByFactory(leasedByFactory); }