public TenantHandle[] CreateTenants(string prefix, int count) { TenantHandle[] handles = new TenantHandle[count]; for (int i = 1; i <= count; i++) { handles[i - 1] = CreateTenantInternal(String.Format("{0}{1}", prefix, i)); } return(handles); }
public void BeginTransaction(TenantHandle tenant = default(TenantHandle)) { if (tenant == default(TenantHandle)) { tenant = DefaultTenant; } if (DefaultTenant == TenantHandle.Empty) { throw new InvalidOperationException("please specify a tenant on which to begin a transaction"); } if (CurrentTransaction != null) { throw new InvalidOperationException("please commit or discard the current transaction before beginning a new one"); } CurrentTransaction = new Transaction(DefaultTenant); }
public string GetTenantName(TenantHandle handle) { return(GetTenantNameInternal(handle)); }
protected abstract string GetTenantNameInternal(TenantHandle handle);
public Transaction(TenantHandle tenant) { Tenant = tenant; }