InfinityQSV2
This commit is contained in:
@ -33,4 +33,26 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
|
||||
|
||||
string IAppSettingsRepository<Models.Binder.AppSettings>.GetBuildNumberAndGitCommitSeven() => GetBuildNumberAndGitCommitSeven();
|
||||
|
||||
internal void VerifyConnectionStrings()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
||||
throw new NotSupportedException();
|
||||
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
|
||||
throw new NotSupportedException();
|
||||
#if DEBUG
|
||||
if (!_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
if (!_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
#endif
|
||||
#if !DEBUG
|
||||
if (_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
if (_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
|
||||
void IAppSettingsRepository<Models.Binder.AppSettings>.VerifyConnectionStrings() => VerifyConnectionStrings();
|
||||
|
||||
}
|
Reference in New Issue
Block a user