public NormalizedDatabaseConnectionInfo(DatabaseConnectionInfoHolder holder) { if (!String.IsNullOrEmpty(holder.ProviderString)) { ConnectionStringTool.SplitProviderString(holder.ProviderString, out ProviderName, out holder.ConnectionString); } if (!String.IsNullOrEmpty(holder.ProviderName)) { ProviderName = holder.ProviderName; } if (!String.IsNullOrEmpty(holder.ConnectionString)) { LocalDatabaseName = ConnectionStringTool.ExtractDatabaseName(holder.ConnectionString); ServerConnectionString = ConnectionStringTool.RemoveDatabaseName(holder.ConnectionString); } if (!String.IsNullOrEmpty(holder.LinkedDatabaseName)) { LinkedDatabaseName = holder.LinkedDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedServerName)) { LinkedServerName = holder.LinkedServerName; } if (!String.IsNullOrEmpty(holder.ExplicitDatabaseName)) { LocalDatabaseName = holder.ExplicitDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.LinkedDatabaseName)) { LinkedDatabaseName = holder.LinkedInfo?.LinkedDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.LinkedServerName)) { LinkedServerName = holder.LinkedInfo?.LinkedServerName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.ExplicitDatabaseName)) { LocalDatabaseName = holder.LinkedInfo?.ExplicitDatabaseName; } // fix if (String.IsNullOrEmpty(LinkedServerName)) { LinkedDatabaseName = null; } if (String.IsNullOrEmpty(LinkedDatabaseName)) { LinkedServerName = null; } if (!String.IsNullOrEmpty(LinkedServerName)) { LocalDatabaseName = null; } }
public NormalizedDatabaseConnectionInfo(DatabaseConnectionInfoHolder holder) { if (!String.IsNullOrEmpty(holder.ProviderString)) { ConnectionStringTool.SplitProviderString(holder.ProviderString, out ProviderName, out holder.ConnectionString); } if (!String.IsNullOrEmpty(holder.ProviderName)) { ProviderName = holder.ProviderName; } if (!String.IsNullOrEmpty(holder.ConnectionString)) { LocalDatabaseName = ConnectionStringTool.ExtractDatabaseName(holder.ConnectionString); ServerConnectionString = ConnectionStringTool.RemoveDatabaseName(holder.ConnectionString); } if (!String.IsNullOrEmpty(holder.LinkedDatabaseName)) { LinkedDatabaseName = holder.LinkedDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedServerName)) { LinkedServerName = holder.LinkedServerName; } if (!String.IsNullOrEmpty(holder.ExplicitDatabaseName)) { LocalDatabaseName = holder.ExplicitDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.LinkedDatabaseName)) { LinkedDatabaseName = holder.LinkedInfo?.LinkedDatabaseName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.LinkedServerName)) { LinkedServerName = holder.LinkedInfo?.LinkedServerName; } if (!String.IsNullOrEmpty(holder.LinkedInfo?.ExplicitDatabaseName)) { LocalDatabaseName = holder.LinkedInfo?.ExplicitDatabaseName; } // fix if (String.IsNullOrEmpty(LinkedServerName)) LinkedDatabaseName = null; if (String.IsNullOrEmpty(LinkedDatabaseName)) LinkedServerName = null; if (!String.IsNullOrEmpty(LinkedServerName)) LocalDatabaseName = null; }