private static IDatabaseCommands SetupCommands(IDatabaseCommands databaseCommands, string database, ICredentials credentialsForSession, OpenSessionOptions options) { if (database != null) { databaseCommands = databaseCommands.ForDatabase(database); } if (credentialsForSession != null) { databaseCommands = databaseCommands.With(credentialsForSession); } if (options.ForceReadFromMaster) { databaseCommands.ForceReadFromMaster(); } return(databaseCommands); }
public IAsyncDatabaseCommands With(ICredentials credentialsForSession) { return(new EmbeddedAsyncServerClient(databaseCommands.With(credentialsForSession))); }
private static IDatabaseCommands SetupCommands(IDatabaseCommands databaseCommands, string database, ICredentials credentialsForSession, OpenSessionOptions options) { if (database != null) databaseCommands = databaseCommands.ForDatabase(database); if (credentialsForSession != null) databaseCommands = databaseCommands.With(credentialsForSession); if (options.ForceReadFromMaster) databaseCommands.ForceReadFromMaster(); return databaseCommands; }