private static IAsyncDatabaseCommands SetupCommandsAsync(IAsyncDatabaseCommands databaseCommands, string database, ICredentials credentialsForSession) { if (database != null) { databaseCommands = databaseCommands.ForDatabase(database); } if (credentialsForSession != null) { databaseCommands = databaseCommands.With(credentialsForSession); } return(databaseCommands); }
private static IAsyncDatabaseCommands SetupCommandsAsync(IAsyncDatabaseCommands 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); }
private static IAsyncDatabaseCommands SetupCommandsAsync(IAsyncDatabaseCommands 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; }