public ReplicationDestination[] GetForDatabase(string databaseName) { if (forDatabases.Keys.Contains(databaseName) == false || forDatabases[databaseName] == null) return null; var result = new ReplicationDestination[forDatabases[databaseName].Count]; forDatabases[databaseName].CopyTo(result); return result; }
protected bool Equals(ReplicationDestination other) { return string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && string.Equals(Domain, other.Domain) && string.Equals(ApiKey, other.ApiKey) && string.Equals(Database, other.Database) && TransitiveReplicationBehavior == other.TransitiveReplicationBehavior && IgnoredClient.Equals(other.IgnoredClient) && Disabled.Equals(other.Disabled) && string.Equals(ClientVisibleUrl, other.ClientVisibleUrl); }
protected bool Equals(ReplicationDestination other) { return(string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && string.Equals(Domain, other.Domain) && string.Equals(ApiKey, other.ApiKey) && string.Equals(Database, other.Database) && TransitiveReplicationBehavior == other.TransitiveReplicationBehavior && IgnoredClient.Equals(other.IgnoredClient) && Disabled.Equals(other.Disabled) && string.Equals(ClientVisibleUrl, other.ClientVisibleUrl)); }
public bool IsEqualTo(ReplicationDestination other) { return(string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && string.Equals(Domain, other.Domain) && string.Equals(ApiKey, other.ApiKey) && string.Equals(Database, other.Database, StringComparison.InvariantCultureIgnoreCase) && TransitiveReplicationBehavior == other.TransitiveReplicationBehavior && IgnoredClient.Equals(other.IgnoredClient) && Disabled.Equals(other.Disabled) && ((string.Equals(Url, other.Url, StringComparison.InvariantCultureIgnoreCase) && string.IsNullOrWhiteSpace(ClientVisibleUrl)) || (!string.IsNullOrWhiteSpace(ClientVisibleUrl) && string.Equals(ClientVisibleUrl, other.ClientVisibleUrl, StringComparison.InvariantCultureIgnoreCase)))); }
public bool IsEqualTo(ReplicationDestination other) { return(string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && string.Equals(Domain, other.Domain) && string.Equals(ApiKey, other.ApiKey) && string.Equals(Database, other.Database, StringComparison.OrdinalIgnoreCase) && TransitiveReplicationBehavior == other.TransitiveReplicationBehavior && IgnoredClient.Equals(other.IgnoredClient) && Disabled.Equals(other.Disabled) && ((string.Equals(Url, other.Url, StringComparison.OrdinalIgnoreCase) && string.IsNullOrWhiteSpace(ClientVisibleUrl)) || (!string.IsNullOrWhiteSpace(ClientVisibleUrl) && string.Equals(ClientVisibleUrl, other.ClientVisibleUrl, StringComparison.OrdinalIgnoreCase))) && Extensions.DictionaryExtensions.ContentEquals(SpecifiedCollections, other.SpecifiedCollections)); }
private void SetupDB(IDocumentStore store, string dbName, bool addReplicationTarget, string targetDbName) { DeleteDatabase(store, dbName, true); var databaseDocument = new DatabaseDocument { Id = dbName, Settings = { { "Raven/ActiveBundles", "Replication" }, { "Raven/DataDir", "~\\Databases\\" + dbName } } }; store.DatabaseCommands.EnsureDatabaseDocumentExists(databaseDocument); if (addReplicationTarget) { var replicationDestination = new Raven.Abstractions.Replication.ReplicationDestination() { Url = SecondaryDocumentStore.Url, TransitiveReplicationBehavior = TransitiveReplicationOptions.None, Database = targetDbName }; var newReplicationDocument = new Raven.Abstractions.Replication.ReplicationDocument() { Destinations = new List <ReplicationDestination>() { replicationDestination } }; using (var session = store.OpenSession(dbName)) { session.Store(newReplicationDocument, @"Raven/Replication/Destinations"); session.SaveChanges(); } } new RavenDocumentsByEntityName().Execute( store.DatabaseCommands.ForDatabase(dbName), store.Conventions ); new DocsIndex().Execute( store.DatabaseCommands.ForDatabase(dbName), store.Conventions ); }
public bool IsEqualTo(ReplicationDestination other) { return string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && string.Equals(Domain, other.Domain) && string.Equals(ApiKey, other.ApiKey) && string.Equals(Database, other.Database, StringComparison.OrdinalIgnoreCase) && TransitiveReplicationBehavior == other.TransitiveReplicationBehavior && IgnoredClient.Equals(other.IgnoredClient) && Disabled.Equals(other.Disabled) && ((string.Equals(Url, other.Url, StringComparison.OrdinalIgnoreCase) && string.IsNullOrWhiteSpace(ClientVisibleUrl)) || (!string.IsNullOrWhiteSpace(ClientVisibleUrl) && string.Equals(ClientVisibleUrl, other.ClientVisibleUrl, StringComparison.OrdinalIgnoreCase))); }
protected bool Equals(ReplicationDestination other) { return IsEqualTo(other); }
protected bool Equals(ReplicationDestination other) { return(IsEqualTo(other)); }