Ejemplo n.º 1
0
 public static void UseSqlServerInLeaseModeAsOneWayClient(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.UseSqlServerInLeaseModeAsOneWayClient(new SqlServerLeaseTransportOptions(connectionFactory))
     .SetLeaseInterval(leaseInterval)
     .SetLeaseTolerance(leaseTolerance)
     .SetAutomaticLeaseRenewal(automaticallyRenewLeases, leaseAutoRenewInterval)
     .SetLeasedByFactory(leasedByFactory);
 }
Ejemplo n.º 2
0
 public static void UseSqlServerInLeaseModeAsOneWayClient(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.UseSqlServerInLeaseModeAsOneWayClient(new SqlServerLeaseTransportOptions(connectionString, enlistInAmbientTransaction))
     .SetEnsureTablesAreCreated(ensureTablesAreCreated)
     .SetLeaseInterval(leaseAutoRenewInterval)
     .SetLeaseTolerance(leaseTolerance)
     .SetAutomaticLeaseRenewal(automaticallyRenewLeases, leaseAutoRenewInterval)
     .SetLeasedByFactory(leasedByFactory);
 }